private void OnExecuteenterpriseSelectionChangedCommand() { EntSiteInfoList?.Clear(); EntAreaInfoList?.Clear(); this.EntProductionLineInfoModel.EntSite_Id = Guid.Empty; this.EntProductionLineInfoModel.EntArea_Id = Guid.Empty; getPageData1(); }
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 getPageData1() { #if DEBUG System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); stopwatch.Start(); #endif enterpriseModel.Id = EntProductionLineInfo.Enterprise_Id; var result = Utility.Http.HttpClientHelper.PostResponse <OperationResult <PageResult <EntSiteInfoModel> > >(GlobalData.ServerRootUri + "EntSiteInfo/GetEntSiteListByEnterpriseID", Utility.JsonHelper.ToJson(enterpriseModel)); #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); EntSiteInfoList = new ObservableCollection <EntSiteInfoModel>(result.Data.Data); TotalCounts = result.Data.Total; } else { EntSiteInfoList?.Clear(); TotalCounts = 0; Application.Current.Resources["UiMessage"] = "未找到数据"; } } else { //操作失败,显示错误信息 EntSiteInfoList = new ObservableCollection <EntSiteInfoModel>(); Application.Current.Resources["UiMessage"] = result?.Message ?? "查询厂区信息失败,请联系管理员!"; } }
/// <summary> /// 执行下拉列表改变事件 /// </summary> private void OnExecuteSelectionChangedCommand() { EntSiteInfoList?.Clear(); this.EntEmployeeInfoModel.DepartmentCode = Guid.Empty; getPageData1(); }