174 |
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 |
|
|
|
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 |
|
|
|
20 |
import java.awt.event.ActionEvent;
|
|
|
21 |
|
|
|
22 |
import javax.swing.AbstractAction;
|
|
|
23 |
|
|
|
24 |
public abstract class ComptaContactSQLElement extends ContactSQLElementBase {
|
|
|
25 |
|
|
|
26 |
static public class ContactFournisseurSQLElement extends ComptaContactSQLElement {
|
|
|
27 |
public ContactFournisseurSQLElement() {
|
|
|
28 |
super("CONTACT_FOURNISSEUR");
|
|
|
29 |
}
|
|
|
30 |
}
|
|
|
31 |
|
|
|
32 |
static public class ContactSalarieSQLElement extends ComptaContactSQLElement {
|
|
|
33 |
public ContactSalarieSQLElement() {
|
|
|
34 |
super("CONTACT_SALARIE");
|
|
|
35 |
}
|
|
|
36 |
}
|
|
|
37 |
|
|
|
38 |
static public class ContactAdministratifSQLElement extends ComptaContactSQLElement {
|
|
|
39 |
public ContactAdministratifSQLElement() {
|
|
|
40 |
super("CONTACT_ADMINISTRATIF");
|
|
|
41 |
}
|
|
|
42 |
}
|
|
|
43 |
|
|
|
44 |
static public class ContactSQLElement extends ComptaContactSQLElement {
|
|
|
45 |
public ContactSQLElement() {
|
|
|
46 |
super("CONTACT");
|
|
|
47 |
}
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
protected ComptaContactSQLElement(String tableName) {
|
|
|
51 |
super(tableName);
|
|
|
52 |
PredicateRowAction action = new PredicateRowAction(new AbstractAction() {
|
|
|
53 |
|
|
|
54 |
@Override
|
|
|
55 |
public void actionPerformed(ActionEvent e) {
|
|
|
56 |
sendMail(IListe.get(e).getSelectedRows());
|
|
|
57 |
|
|
|
58 |
}
|
|
|
59 |
}, true, "customerrelationship.customer.email.send");
|
|
|
60 |
action.setPredicate(IListeEvent.getNonEmptySelectionPredicate());
|
|
|
61 |
getRowActions().add(action);
|
|
|
62 |
}
|
|
|
63 |
}
|