按钮权限升级

This commit is contained in:
sgwp 2025-02-17 13:56:52 +08:00
parent 23fc907a7c
commit 53dbd16c52
2 changed files with 9 additions and 1 deletions

View File

@ -2910,12 +2910,13 @@ begin
mfromName := GetParentForm(TControl(cxGrid.GetParentComponent), true).Name; mfromName := GetParentForm(TControl(cxGrid.GetParentComponent), true).Name;
mGridName := cxGrid.GetParentComponent.Name + '.' + cxGrid.name; mGridName := cxGrid.GetParentComponent.Name + '.' + cxGrid.name;
// showmessage(mGridName);
//////////////////////////////// ////////////////////////////////
// //
try try
mADOCmd := TADOQuery.Create(nil); mADOCmd := TADOQuery.Create(nil);
mADOCmd.ConnectionString := DConString; mADOCmd.ConnectionString := DConString;
mADOCmd.LockType:=ltBatchOptimistic;
with mADOCmd do with mADOCmd do
begin begin
close; close;
@ -2971,7 +2972,9 @@ begin
post; post;
end; end;
end; end;
mADOCmd.UpdateBatch();
finally finally
// showMessage('3');
mADOCmd.close; mADOCmd.close;
mADOCmd.Free; mADOCmd.Free;
end; end;

View File

@ -966,6 +966,8 @@ end;
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
/// ///
function TWindowFormDeSign.geUsertFormButtons(ADOQueryTmp:TADOQuery;mFormId:integer;mFormCaption:string;moduleId:string;moduleSubId:string):string; function TWindowFormDeSign.geUsertFormButtons(ADOQueryTmp:TADOQuery;mFormId:integer;mFormCaption:string;moduleId:string;moduleSubId:string):string;
var
mformButtons:string;
begin begin
try try
result:=''; result:='';
@ -1001,6 +1003,7 @@ begin
exit; exit;
end; end;
end; end;
mformButtons:= trim(ADOQueryTmp.fieldByName('formButtons').AsString) ;
with ADOQueryTmp do with ADOQueryTmp do
begin begin
close; close;
@ -1011,6 +1014,8 @@ begin
sql.Add(',@UserId='+quotedstr(dCode)); sql.Add(',@UserId='+quotedstr(dCode));
open; open;
fFormRightButtons := trim(fieldByName('rightButtons').AsString) ; fFormRightButtons := trim(fieldByName('rightButtons').AsString) ;
if fFormRightButtons='' then
fFormRightButtons:=mformButtons;
result:= fFormRightButtons; result:= fFormRightButtons;
end; end;
finally finally