[0:0:FSal1p01:Docs] .Parent=Forms group:5 .BasedOn=FSal1p01 .Caption=FSal1p01:Docs Caption=Архив удаленных документов .type.Caption=String Active=true .type.Active=Boolean .defValue.Active=true DLL ID=8101 .type.DLL ID=Int DLL FormName=FSal1p01 .type.DLL FormName=String .Form= SagiTable=TMDB_DOCS_Backup .type.SagiTable=String SQL_Delete=.MEMO.0:0:FSal1p01:Docs.SQL_Delete .type.SQL_Delete=Memo [.MEMO.0:0:FSal1p01:Docs.SQL_Delete] BEGIN UN4DOC_BACKUP.DROP_DOC(UN4DOC_BACKUP.modTABLE,USER,:COD); END [0:0:FSal1p01:Docs:Action2] .Parent=0:0:FSal1p01:Docs .BasedOn=0:0:FSal1p01:Docs:Action2 .Caption=FSal1p01:Docs:Action2 .FormAction= ID=1 .type.ID=Int Caption=Удалить документ из архива .type.Caption=String Visible=true .type.Visible=Boolean .defValue.Visible=true RefreshNeed=true .type.RefreshNeed=Boolean SQL1=.MEMO.0:0:FSal1p01:Docs:Action2.SQL1 .type.SQL1=Memo ActionType=1 .type.ActionType=String .listValue.ActionType=0,1 .listTextValue.ActionType=Internal,reserved [.MEMO.0:0:FSal1p01:Docs:Action2.SQL1] BEGIN UN4DOC_BACKUP.DROP_DOC(UN4DOC_BACKUP.modTABLE,USER,:inform_COD); END; [0:0:FSal1p01:Docs:Action1] .Parent=0:0:FSal1p01:Docs .BasedOn=0:0:FSal1p01:Docs:Action1 .Caption=FSal1p01:Docs:Action1 .FormAction= ID=1 .type.ID=Int Caption=Восстановить документ .type.Caption=String Visible=true .type.Visible=Boolean .defValue.Visible=true RefreshNeed=true .type.RefreshNeed=Boolean ActionType=1 .type.ActionType=String .listValue.ActionType=0,1 .listTextValue.ActionType=Internal,reserved SQL1=.MEMO.0:0:FSal1p01:Docs:Action1.SQL1 .type.SQL1=Memo [.MEMO.0:0:FSal1p01:Docs:Action1.SQL1] DECLARE nId NUMBER(10); BEGIN SELECT SYSFID INTO nId FROM TMDB_DOCS WHERE COD=:inform_COD; raise_application_error(-20000,'Document already exists! NrDoc: '||:inform_COD); EXCEPTION WHEN NO_DATA_FOUND THEN UN4DOC_BACKUP.RESTORE_DOC(UN4DOC_BACKUP.modTABLE,USER,:inform_COD); UN4DOC_BACKUP.DROP_DOC(UN4DOC_BACKUP.modTABLE,USER,:inform_COD); END;