Перенос.

This commit is contained in:
2023-09-17 22:13:42 +03:00
parent dd2e0ca7e0
commit 629d8b8477
1239 changed files with 61161 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
package Visual_DVM_2021.Passes;
import Common.Database.DBObject;
public abstract class AddObjectPass<D extends DBObject> extends ObjectPass<D> {
public AddObjectPass(Class<D> d_in) {
super(d_in);
}
public Class<? extends DBObject> getOwner() {
return null;
}
@Override
protected boolean canStart(Object... args) throws Exception {
target = d.newInstance();
return
((getOwner() == null) || (getDb().tables.get(getOwner()).CheckCurrent(Log))) &&
fillObjectFields();
}
protected boolean fillObjectFields() throws Exception {
return getTable().ShowAddObjectDialog(target);
}
@Override
public String getIconPath() {
return "/icons/RedAdd.png";
}
@Override
protected void body() throws Exception {
getDb().Insert(target);
}
@Override
protected void showDone() throws Exception {
getTable().ShowUI(target.getPK());
}
}