private void OnExecuteareaSelectionChangedCommand() { EntProductionLineInfoList?.Clear(); ProductionProcessInfoList?.Clear(); this.EntProductionLineInfo.Id = Guid.Empty; ProductionRuleItemInfo.ProductionProcess_Id = Guid.Empty; getPageData3(); }
private void OnExecutesiteSelectionChangedCommand() { EntAreaInfoList?.Clear(); EntProductionLineInfoList?.Clear(); this.EntProductionLineInfo.EntArea_Id = Guid.Empty; ProductionProcessInfo.EntProductionLine_Id = Guid.Empty; getPageData2(); }
private void OnExecuteenterpriseSelectionChangedCommand() { EntSiteInfoList?.Clear(); EntAreaInfoList?.Clear(); EntProductionLineInfoList?.Clear(); ProductionProcessInfoList?.Clear(); this.EntProductionLineInfo.EntSite_Id = Guid.Empty; this.EntProductionLineInfo.EntArea_Id = Guid.Empty; this.EntProductionLineInfo.Id = Guid.Empty; ProductionRuleItemInfo.ProductionProcess_Id = Guid.Empty; getPageData1(); }
/// <summary> /// 获取某一区域下的生产线列表 /// </summary> private void getPageData3() { #if DEBUG System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); stopwatch.Start(); #endif entareaModel.Id = EntProductionLineInfo.EntArea_Id; var result = Utility.Http.HttpClientHelper.PostResponse <OperationResult <PageResult <EntProductionLineInfoModel> > >(GlobalData.ServerRootUri + "EntProductionLineInfo/GetEntProductionLineListByEntAreaID", Utility.JsonHelper.ToJson(entareaModel)); #if DEBUG stopwatch.Stop(); Utility.LogHelper.Info("获取生产线信息用时(毫秒):" + stopwatch.ElapsedMilliseconds); Utility.LogHelper.Info("生产线信息内容:" + Utility.JsonHelper.ToJson(result)); #endif if (!Equals(result, null) && result.Successed) { Application.Current.Resources["UiMessage"] = result?.Message; LogHelper.Info(Application.Current.Resources["UiMessage"].ToString()); if (result.Data.Data.Any()) { //TotalCounts = result.Data.Total; //Messenger.Default.Send(LoginUser, MessengerToken.LoginSuccess); EntProductionLineInfoList = new ObservableCollection <EntProductionLineInfoModel>(result.Data.Data); TotalCounts = result.Data.Total; } else { EntProductionLineInfoList?.Clear(); TotalCounts = 0; Application.Current.Resources["UiMessage"] = "未找到数据"; } } else { //操作失败,显示错误信息 EntProductionLineInfoList = new ObservableCollection <EntProductionLineInfoModel>(); Application.Current.Resources["UiMessage"] = result?.Message ?? "查询生产线信息失败,请联系管理员!"; } }