OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 80 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 80 Rev 83
Line 11... Line 11...
11
 * When distributing the software, include this License Header Notice in each file.
11
 * When distributing the software, include this License Header Notice in each file.
12
 */
12
 */
13
 
13
 
14
 package org.openconcerto.erp.core.customerrelationship.customer.element;
14
 package org.openconcerto.erp.core.customerrelationship.customer.element;
15
 
15
 
-
 
16
import java.awt.event.ActionEvent;
-
 
17
 
-
 
18
import javax.swing.AbstractAction;
-
 
19
 
16
import org.openconcerto.erp.config.Gestion;
20
import org.openconcerto.erp.config.Gestion;
-
 
21
import org.openconcerto.sql.view.list.IListe;
-
 
22
import org.openconcerto.sql.view.list.IListeAction.IListeEvent;
-
 
23
import org.openconcerto.sql.view.list.RowAction.PredicateRowAction;
17
 
24
 
18
public class ContactSQLElement extends ContactSQLElementBase {
25
public class ContactSQLElement extends ContactSQLElementBase {
19
 
26
 
20
    static public class ContactFournisseurSQLElement extends ContactSQLElement {
27
    static public class ContactFournisseurSQLElement extends ContactSQLElement {
21
        public ContactFournisseurSQLElement() {
28
        public ContactFournisseurSQLElement() {
Line 29... Line 36...
29
        }
36
        }
30
    }
37
    }
31
 
38
 
32
    public ContactSQLElement() {
39
    public ContactSQLElement() {
33
        this("CONTACT");
40
        this("CONTACT");
-
 
41
 
34
    }
42
    }
35
 
43
 
36
    protected ContactSQLElement(String tableName) {
44
    protected ContactSQLElement(String tableName) {
37
        super(tableName);
45
        super(tableName);
38
        this.setL18nLocation(Gestion.class);
46
        this.setL18nLocation(Gestion.class);
-
 
47
        PredicateRowAction action = new PredicateRowAction(new AbstractAction() {
-
 
48
 
-
 
49
            @Override
-
 
50
            public void actionPerformed(ActionEvent e) {
-
 
51
                sendMail(IListe.get(e).getSelectedRows());
-
 
52
 
-
 
53
            }
-
 
54
        }, true, "customerrelationship.customer.email.send");
-
 
55
        action.setPredicate(IListeEvent.getNonEmptySelectionPredicate());
-
 
56
        getRowActions().add(action);
39
    }
57
    }
40
}
58
}