no message

This commit is contained in:
2024-10-12 00:17:51 +03:00
parent f317ab1aa1
commit c826b4a4bd
102 changed files with 372 additions and 520 deletions

View File

@@ -2,6 +2,7 @@ package _VisualDVM.Visual.Windows;
import Common.Utils.Utils_;
import Common.Visual.Windows.Dialog.Dialog;
import Common.Database.Objects.DBForm.DBForm;
import _VisualDVM.Global;
import _VisualDVM.GlobalData.GlobalDatabase;
//todo разобраться с DBform
public class ProfilesForm extends Dialog<Object, ProfilesFields> {
@@ -18,13 +19,13 @@ public class ProfilesForm extends Dialog<Object, ProfilesFields> {
}
@Override
public void Init(Object... params) {
if (((GlobalDatabase) Utils_.db).sapforProfiles.size() > 0) {
for (Object key : ((GlobalDatabase) Utils_.db).sapforProfiles.Data.keySet()) {
((GlobalDatabase) Utils_.db).sapforProfiles.ShowUI(key);
if ((Global.mainModule.getDb()).sapforProfiles.size() > 0) {
for (Object key : (Global.mainModule.getDb()).sapforProfiles.Data.keySet()) {
(Global.mainModule.getDb()).sapforProfiles.ShowUI(key);
return;
}
} else {
((GlobalDatabase) Utils_.db).sapforProfiles.ShowUI();
(Global.mainModule.getDb()).sapforProfiles.ShowUI();
}
}
@Override
@@ -58,8 +59,8 @@ public class ProfilesForm extends Dialog<Object, ProfilesFields> {
return "Profiles"; //можно было бы через имя класса
}
public void LoadWindowParameters() throws Exception {
if (((GlobalDatabase) Utils_.db).forms.Data.containsKey(getFormKey())) {
info = ((GlobalDatabase) Utils_.db).forms.Data.get(getFormKey());
if ((Global.mainModule.getDb()).forms.Data.containsKey(getFormKey())) {
info = (Global.mainModule.getDb()).forms.Data.get(getFormKey());
info.Apply(this);
return;
}
@@ -68,8 +69,8 @@ public class ProfilesForm extends Dialog<Object, ProfilesFields> {
public void SaveWindowParameters() throws Exception {
if (info != null) {
info.Init(this);
Utils_.db.Update(info);
Global.mainModule.getDb().Update(info);
} else
Utils_.db.Insert(new DBForm(getFormKey(), this));
Global.mainModule.getDb().Insert(new DBForm(getFormKey(), this));
}
}