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();
     this.EntProductionLineInfoModel.EntSite_Id = Guid.Empty;
     this.EntProductionLineInfoModel.EntArea_Id = Guid.Empty;
     getPageData1();
 }
示例#3
0
 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();
 }
示例#4
0
 private void OnExecuteenterpriseSelectionChangedCommand()
 {
     getPageData1();
     //
     if (MatWareHouseInfo != null)
     {
         EntProductionLineInfo.EntSite_Id = Guid.Empty;
         //
         MatWareHouseInfo.EntArea_Id = Guid.Empty;
         EntAreaInfoList?.Clear();
     }
     ;
 }
        /// <summary>
        /// 获取某一厂区下的区域列表
        /// </summary>
        private void getPageData2()
        {
#if DEBUG
            System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
            stopwatch.Start();
#endif

            entsiteModel.Id = EntProductionLineInfo.EntSite_Id;



            var result = Utility.Http.HttpClientHelper.PostResponse <OperationResult <PageResult <EntAreaInfoModel> > >(GlobalData.ServerRootUri + "EntAreaInfo/GetEntAreaListByEntSiteID", Utility.JsonHelper.ToJson(entsiteModel));

#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);
                    EntAreaInfoList = new ObservableCollection <EntAreaInfoModel>(result.Data.Data);
                    TotalCounts     = result.Data.Total;
                }
                else
                {
                    EntAreaInfoList?.Clear();
                    TotalCounts = 0;
                    Application.Current.Resources["UiMessage"] = "未找到数据";
                }
            }
            else
            {
                //操作失败,显示错误信息
                EntAreaInfoList = new ObservableCollection <EntAreaInfoModel>();
                Application.Current.Resources["UiMessage"] = result?.Message ?? "查询区域信息失败,请联系管理员!";
            }
        }