merge: 合并初始化缓存与资源释放优化

This commit is contained in:
2026-08-15 11:39:58 +08:00
27 changed files with 474 additions and 110 deletions
+3 -1
View File
@@ -624,6 +624,7 @@ namespace Lskj.PubBill
Task<MyControl> controlObjTask = cachesDic.AddTask(this, "ControlObj", new Task<MyControl>(() =>
{
MyControl myControl = new MyControl() { Model = dynamicModel };
myControl.MrpClickMenus = new DataTable();
myControl.OtherParams = dynamicModel.OtherParams();
cachesDic.AddTask(myControl, "DynamicModel", dynamicModelTask);
cachesDic.AddTask(myControl, "ControlsTable", controlLocationTask);
@@ -839,6 +840,7 @@ namespace Lskj.PubBill
string searchSql = model.SourceType == 1 ? Regex.Replace(model.DetailSql, "{speciesno}", "", RegexOptions.IgnoreCase) : model.SourceSql;
searchControl = new MyControl(searchSql, gridControl == null ? gridDetail : gridControl, treeView);
searchControl.Model = dynamicModel;
searchControl.MrpClickMenus = new DataTable();
searchControl.OtherParams = dynamicModel.OtherParams();
cachesDic.AddTask(searchControl, "DynamicModel", dynamicModelTask);
cachesDic.AddTask(searchControl, "ControlsTable", customQueryFieldsTask);
@@ -1126,7 +1128,7 @@ namespace Lskj.PubBill
}
if (this.BillModel.CanImport)
{
this.pmBillExp.AddItems(new BarItem[] { _itemImport, _itemImportUpdate });
this.pmBillExp.AddItems(new BarItem[] { _itemImport });//_itemImportUpdate
}
//分配
this.pmFP.AddItems(new BarItem[] { itemFPBatch });