|
我在查询按钮代码中执行了这个函数,查询时间就从1秒延长到10多秒,请各位老师指正.
procedure TMainForm.SWJLZZGSCKJL;
var
lComType: string;
begin
lComType := TCommonFunctionLib.GetCompanyType(context);
if lComType = '制造公司' then
begin
dsbMaster.DataSet.FieldByName('SWJLCKJL').ReadOnly := True;
dsbMaster.DataSet.FieldByName('ZRRID').ReadOnly := True;
dsbMaster.DataSet.FieldByName('HTBM').ReadOnly := False;
dsbMaster.DataSet.FieldByName('HTZJE').ReadOnly := False;
dsbMaster.DataSet.FieldByName('XSGSID').ReadOnly := False;
dsbMaster.DataSet.FieldByName('KHID').ReadOnly := False;
dsbMaster.DataSet.FieldByName('KHLXR').ReadOnly := False;
dsbMaster.DataSet.FieldByName('KHDH').ReadOnly := False;
dsbMaster.DataSet.FieldByName('XMID').ReadOnly := False;
dsbMaster.DataSet.FieldByName('FHSJ').ReadOnly := False;
dsbMaster.DataSet.FieldByName('FHJE').ReadOnly := False;
dsbMaster.DataSet.FieldByName('YDK').ReadOnly := False;
dsbMaster.DataSet.FieldByName('YQK').ReadOnly := False;
dsbMaster.DataSet.FieldByName('BYJHHL').ReadOnly := False;
dsbMaster.DataSet.FieldByName('SJHL').ReadOnly := False;
dsbMaster.DataSet.FieldByName('CY').ReadOnly := False;
dsbMaster.DataSet.FieldByName('XYJHHL').ReadOnly := False;
dsbMaster.DataSet.FieldByName('XXYJHHL').ReadOnly := False;
dsbMaster.DataSet.FieldByName('ZL').ReadOnly := False;
dsbMaster.DataSet.FieldByName('ZZGSCKJL').ReadOnly := False;
dsbMaster.DataSet.FieldByName('CYYYFX').ReadOnly := False;
dsbMaster.DataSet.FieldByName('HTTK').ReadOnly := False;
dsbXSY.DataSet.ReadOnly := False;
dsbXSY.DataSet.Edit;
end;
end; |
|