no message
This commit is contained in:
@@ -29,4 +29,11 @@ public class Subscriber extends DBObject {
|
||||
role = s.role;
|
||||
mailOn= s.mailOn;
|
||||
}
|
||||
//как объект будут называть по внешним ключам.
|
||||
public String getFKName() {
|
||||
return "email";
|
||||
}
|
||||
public Object getEmptyFK() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package Repository.Subscribes;
|
||||
import Common.Current;
|
||||
import Common.Database.DBTable;
|
||||
import Common.Database.*;
|
||||
import Common.UI.DataSetControlForm;
|
||||
import Common.UI.Windows.Dialog.DBObjectDialog;
|
||||
import GlobalData.Account.AccountRole;
|
||||
import Repository.SubscriberWorkspace.SubscriberWorkspace;
|
||||
import Repository.Subscribes.UI.SubscriberFields;
|
||||
import Repository.Subscribes.UI.SubscriberForm;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
public class SubsribersDBTable extends DBTable<String, Subscriber> {
|
||||
public SubsribersDBTable() {
|
||||
super(String.class, Subscriber.class);
|
||||
@@ -55,4 +58,11 @@ public class SubsribersDBTable extends DBTable<String, Subscriber> {
|
||||
public DBObjectDialog<Subscriber, SubscriberFields> getDialog() {
|
||||
return new SubscriberForm();
|
||||
}
|
||||
@Override
|
||||
public LinkedHashMap<Class<? extends DBObject>, FKBehaviour> getFKDependencies() {
|
||||
LinkedHashMap<Class<? extends DBObject>, FKBehaviour> res = new LinkedHashMap<>();
|
||||
//-
|
||||
res.put(SubscriberWorkspace.class, new FKBehaviour(FKDataBehaviour.DELETE, FKCurrentObjectBehaviuor.PASSIVE));
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,9 +27,6 @@ public class SubscriberForm extends DBObjectDialog<Subscriber, SubscriberFields>
|
||||
if (!title_text.equals("Регистрация") && (fields.tfAddress.isEditable() && Global.componentsServer.db.subscribers.Data.containsKey(fields.tfAddress.getText()))) {
|
||||
Log.Writeln_("Адрес электронной почты " + Utils.Brackets(fields.tfAddress.getText()) + " уже есть в списке.");
|
||||
}
|
||||
if (Result.role.equals(AccountRole.Admin) && !getSelectedRole().equals(AccountRole.Admin)) {
|
||||
Log.Writeln_("Администратор не может разжаловать сам себя.");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void fillFields() {
|
||||
|
||||
Reference in New Issue
Block a user