18 |
ilm |
1 |
/*
|
|
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
|
|
3 |
*
|
|
|
4 |
* Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
|
|
|
5 |
*
|
|
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
|
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
|
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
|
|
9 |
* language governing permissions and limitations under the License.
|
|
|
10 |
*
|
|
|
11 |
* When distributing the software, include this License Header Notice in each file.
|
|
|
12 |
*/
|
|
|
13 |
|
|
|
14 |
package org.openconcerto.erp.core.customerrelationship.customer.element;
|
|
|
15 |
|
156 |
ilm |
16 |
import org.openconcerto.sql.view.list.IListe;
|
|
|
17 |
import org.openconcerto.sql.view.list.IListeAction.IListeEvent;
|
|
|
18 |
import org.openconcerto.sql.view.list.RowAction.PredicateRowAction;
|
|
|
19 |
|
83 |
ilm |
20 |
import java.awt.event.ActionEvent;
|
|
|
21 |
|
|
|
22 |
import javax.swing.AbstractAction;
|
|
|
23 |
|
73 |
ilm |
24 |
public class ContactSQLElement extends ContactSQLElementBase {
|
18 |
ilm |
25 |
|
21 |
ilm |
26 |
static public class ContactFournisseurSQLElement extends ContactSQLElement {
|
|
|
27 |
public ContactFournisseurSQLElement() {
|
73 |
ilm |
28 |
super("CONTACT_FOURNISSEUR");
|
21 |
ilm |
29 |
}
|
|
|
30 |
}
|
|
|
31 |
|
41 |
ilm |
32 |
static public class ContactAdministratifSQLElement extends ContactSQLElement {
|
|
|
33 |
public ContactAdministratifSQLElement() {
|
73 |
ilm |
34 |
super("CONTACT_ADMINISTRATIF");
|
41 |
ilm |
35 |
}
|
|
|
36 |
}
|
|
|
37 |
|
18 |
ilm |
38 |
public ContactSQLElement() {
|
73 |
ilm |
39 |
this("CONTACT");
|
83 |
ilm |
40 |
|
18 |
ilm |
41 |
}
|
|
|
42 |
|
73 |
ilm |
43 |
protected ContactSQLElement(String tableName) {
|
|
|
44 |
super(tableName);
|
83 |
ilm |
45 |
PredicateRowAction action = new PredicateRowAction(new AbstractAction() {
|
|
|
46 |
|
|
|
47 |
@Override
|
|
|
48 |
public void actionPerformed(ActionEvent e) {
|
|
|
49 |
sendMail(IListe.get(e).getSelectedRows());
|
|
|
50 |
|
|
|
51 |
}
|
|
|
52 |
}, true, "customerrelationship.customer.email.send");
|
|
|
53 |
action.setPredicate(IListeEvent.getNonEmptySelectionPredicate());
|
|
|
54 |
getRowActions().add(action);
|
21 |
ilm |
55 |
}
|
18 |
ilm |
56 |
}
|