change - 入库任务加载问题修改

foamRearStore
wenjy 1 year ago
parent 6ae87cc309
commit ad83bc0b56

@ -204,15 +204,15 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
{ {
lock (string.Empty) lock (string.Empty)
{ {
#region 通过数据库获取数据进行刷新 try
var info = inStoreBusiness.GetInStoreTask();
if (info != null)
{ {
#region 通过数据库获取数据进行刷新
taskItems = new ObservableCollection<RealTaskInfo>(); var info = inStoreBusiness.GetInStoreTask();
try if (info != null)
{ {
if(info.Count > 0)
taskItems = new ObservableCollection<RealTaskInfo>();
try
{ {
info = info.Where(x => !string.IsNullOrEmpty(search) ? x.materialCode == search : 1 == 1).ToList(); info = info.Where(x => !string.IsNullOrEmpty(search) ? x.materialCode == search : 1 == 1).ToList();
App.Current.Dispatcher.BeginInvoke((Action)(() => App.Current.Dispatcher.BeginInvoke((Action)(() =>
@ -226,13 +226,16 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
InstoreTask = taskItems; InstoreTask = taskItems;
})); }));
} }
catch (Exception ex)
{
logHelper.Error("入库任务列表刷新异常", ex);
}
} }
catch (Exception ex) #endregion
{ } catch (Exception ex)
logHelper.Error("入库任务列表刷新异常", ex); {
} logHelper.Error("入库任务加载异常", ex);
} }
#endregion
} }
} }

Loading…
Cancel
Save