public ImproveIndexViewModel()
 {
     try
     {
         improveService = Resolver.Resolve <IImproveService>();
         _commonFun     = Resolver.Resolve <ICommonFun>();
         _commonHelper  = Resolver.Resolve <CommonHelper>();
         //MessagingCenter.Unsubscribe<ImproveIndexPage>(this, MessageConst.IMPROVE_RESULT_GET);
         //MessagingCenter.Subscribe<ImproveIndexPage>(this, MessageConst.IMPROVE_RESULT_GET, (c) =>
         // {
         //     GetImproveResultOrResultApproval();
         // });
         MessagingCenter.Unsubscribe <string>(this, MessageConst.IMPROVE_PLANLSTDATA_GET);
         MessagingCenter.Subscribe <string>(this, MessageConst.IMPROVE_PLANLSTDATA_GET, (c) =>
         {
             if (c == "A")
             {
                 GetImprovePlanOrPlanApproval();
             }
             else
             {
                 GetImproveResultOrResultApproval();
             }
         });
     }
     catch (Exception)
     {
         _commonFun.AlertLongText("操作异常,请重试。-->ImproveIndexViewModel");
         return;
     }
 }
예제 #2
0
 public TourService(Config.Config config)
 {
     _commonHelper = Resolver.Resolve <CommonHelper>();
     _commonFun    = Resolver.Resolve <ICommonFun>();
     _config       = config;
     baseUrl       = _config.Get <string>(Config.Config.Endpoints_BaseUrl);
 }
        public NotifiMngReaderListViewModel()
        {
            try
            {
                _commonFun        = Resolver.Resolve <ICommonFun>();
                _commonHelper     = Resolver.Resolve <CommonHelper>();
                _notifiMngService = Resolver.Resolve <INotifiMngService>();
                ItemTappedCommand = new RelayCommand(TappedCommand);

                //MessagingCenter.Unsubscribe<string>(this, MessageConst.NOTICE_READERLIST_SEARCH);
                //MessagingCenter.Subscribe<string>(this, MessageConst.NOTICE_READERLIST_SEARCH, (c) =>
                //{
                //    _paramNotice = c;
                //    SearchNoticeReadersList(c);
                //});
                MessagingCenter.Unsubscribe <string>(this, MessageConst.NOTICE_READERLIST_REFRESH);
                MessagingCenter.Subscribe <string>(this, MessageConst.NOTICE_READERLIST_REFRESH, (c) =>
                {
                    if (!string.IsNullOrWhiteSpace(_paramNotice) && _paramNotice != "0")
                    {
                        SearchNoticeReadersList(_paramNotice);
                    }
                });
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->NotifiMngReaderListViewModel");
                return;
            }
        }
예제 #4
0
        public CalendarIndexViewModel()
        {
            try
            {
                _commonFun       = Resolver.Resolve <ICommonFun>();
                _commonHelper    = Resolver.Resolve <CommonHelper>();
                _calendarService = Resolver.Resolve <ICalendarService>();
                EventDates       = new List <DateTime>();

                CalendarBydateList = new ObservableCollection <CalenderListAllDto>();

                MessagingCenter.Subscribe <string>(
                    this,
                    "SearchCalendarData",
                    (date) =>
                {
                    SearchCalendarData(date);
                });

                MessagingCenter.Subscribe <string>(
                    this,
                    "SearchDataByDate",
                    (date) =>
                {
                    SearchDataByDate(date);
                });
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->CalendarIndexViewModel");
                return;
            }
        }
예제 #5
0
        public NotifiFeedbackViewModel()
        {
            try
            {
                _commonFun        = Resolver.Resolve <ICommonFun>();
                _commonHelper     = Resolver.Resolve <CommonHelper>();
                _notifiMngService = Resolver.Resolve <INotifiMngService>();
                _tourService      = Resolver.Resolve <ITourService>();

                //Device.BeginInvokeOnMainThread(() =>
                //{
                //    GetNoticeApproalDetail(NotifiContentItem.NoticeReaderId);

                //});


                MessagingCenter.Unsubscribe <List <RequestParameter> >(this, MessageConst.CASEATTACH_DELETE);

                MessagingCenter.Subscribe <string>(
                    this,
                    MessageConst.CASEATTACH_DELETE,
                    (SeqNo) =>
                {
                    DeleteCaseAttach(SeqNo);
                });
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->NotifiFeedbackViewModel");
                return;
            }
        }
        public CustImproveViewModel()
        {
            try
            {
                _commonFun         = Resolver.Resolve <ICommonFun>();
                _commonHelper      = Resolver.Resolve <CommonHelper>();
                _localScoreService = Resolver.Resolve <ILocalScoreService>();

                Device.BeginInvokeOnMainThread(async() =>
                {
                    var cardType = await _localScoreService.LocalGetTypeFromHiddenCode("16");
                    if (cardType != null && cardType.Count > 0)
                    {
                        foreach (var item in cardType)
                        {
                            _dIcCardType.Add(item.Value, item.Name);
                        }
                    }
                    else
                    {
                    }
                });
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->LocalRegistScoreViewModel");
                return;
            }
        }
        public ReportSearchViewModel()
        {
            _commonFun    = Resolver.Resolve <ICommonFun>();
            _commonHelper = Resolver.Resolve <CommonHelper>();
            _caseService  = Resolver.Resolve <ICaseService>();
            _dIcSourceType.Add("0", "全部");

            Device.BeginInvokeOnMainThread(async() =>
            {
                var result = await _caseService.GetTypeFromHiddenCode("15");
                if (null != result && result.ResultCode == Module.ResultType.Success)
                {
                    var caseTypeList = JsonConvert.DeserializeObject <List <NameValueObject> >(result.Body);

                    if (caseTypeList != null && caseTypeList.Count > 0)
                    {
                        foreach (var item in caseTypeList)
                        {
                            _dIcSourceType.Add(item.Value, item.Name);
                        }
                    }
                    else
                    {
                    }
                }
            });
        }
        public CaseSearchViewModel()
        {
            _commonFun        = Resolver.Resolve <ICommonFun>();
            _commonHelper     = Resolver.Resolve <CommonHelper>();
            _caseService      = Resolver.Resolve <ICaseService>();
            ItemTappedCommand = new RelayCommand <CasesListDto>(TappedCommand);

            _dIcCaseType.Add("0", "全部");
            Device.BeginInvokeOnMainThread(async() =>
            {
                var result = await _caseService.GetTypeFromHiddenCode("12");
                if (null != result && result.ResultCode == Module.ResultType.Success)
                {
                    var caseTypeList = JsonConvert.DeserializeObject <List <NameValueObject> >(result.Body);

                    if (caseTypeList != null && caseTypeList.Count > 0)
                    {
                        foreach (var item in caseTypeList)
                        {
                            _dIcCaseType.Add(item.Value, item.Name);
                        }
                    }
                    else
                    {
                    }
                }
            });

            // 页面初始化,清空
            MessagingCenter.Subscribe <string>(this, "InitCaseSearchPage", (obj) =>
            {
                Init();
            });
        }
        public LocalRegistScoreViewModel()
        {
            try
            {
                _tourService       = Resolver.Resolve <ITourService>();
                _commonFun         = Resolver.Resolve <ICommonFun>();
                _commonHelper      = Resolver.Resolve <CommonHelper>();
                _localScoreService = Resolver.Resolve <ILocalScoreService>();
                _remoteService     = Resolver.Resolve <IRemoteService>();

                _tapCommand = new Command(ImageTaped);

                MessagingCenter.Subscribe <LocalRegistScorePage>(this, "CheckBoxChanged", (obj) =>
                {
                    if (CSList.Any(p => p.IsCheck == true))
                    {
                        CurrentScore        = "0";
                        CurrentSystem.Score = 0;
                    }
                    else
                    {
                        CurrentScore        = "1";
                        CurrentSystem.Score = 1;
                    }
                });

                MessagingCenter.Subscribe <StandardPic>(this, "DeleteLossImage", (obj) =>
                {
                    //删除失分照片
                    DeleteImage(obj);
                });

                MessagingCenter.Subscribe <PictureStandard>(this, "RegistScoreItemTapped", (obj) =>
                {
                    UploadStandPic(obj.StandardPicId);
                });

                MessagingCenter.Subscribe <PictureStandard>(this, "PreviewPlanAttechment", (obj) =>
                {
                    if (!string.IsNullOrEmpty(obj.Url))
                    {
                        PreviewStanderImage(obj.Url);
                    }
                });

                MessagingCenter.Subscribe <PictureStandard>(this, "DeletePlanAttechment", (obj) =>
                {
                    if (!string.IsNullOrEmpty(obj.Url))
                    {
                        DeleteStanderImage(obj);
                    }
                });
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->CustImproveViewModel");
                return;
            }
        }
예제 #10
0
        public SystemListViewModel()
        {
            try
            {
                _tourService = Resolver.Resolve <ITourService>();
                _commonFun   = Resolver.Resolve <ICommonFun>();

                if (CommonContext.Account.UserType == "S" || CommonContext.Account.UserType == "D")
                {
                    //cannot display the set button
                    IsSetVisible = false;
                }
                else
                {
                    IsSetVisible = true;
                }

                MessagingCenter.Subscribe <List <ItemOfTaskDto> >(this, "SendSystemList", (obj) =>
                {
                    _taskId = obj.FirstOrDefault().TPId.ToString();
                    Init(obj);
                });

                MessagingCenter.Subscribe <CommonMessage>(this, "ResetTaskID", (obj) =>
                {
                    if (obj.TaskID == "-1")
                    {
                        _refresh = false;
                    }
                    else
                    {
                        _refresh = true;
                    }
                });

                MessagingCenter.Subscribe <SystemListPage>(this, "RefreshSystem", (obj) =>
                {
                    if (_refresh)
                    {
                        RefreshPage(TaskId);
                    }
                });

                MessagingCenter.Subscribe <ItemOfTaskDto>(this, "GoRegisterPage", (obj) =>
                {
                    GoRegistScore(obj);
                });
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->SystemListViewModel");
                return;
            }
        }
예제 #11
0
        public CaseRegViewModel()
        {
            _tourService  = Resolver.Resolve <ITourService>();
            _commonFun    = Resolver.Resolve <ICommonFun>();
            _commonHelper = Resolver.Resolve <CommonHelper>();
            _caseService  = Resolver.Resolve <ICaseService>();
            IsLoading     = false;
            CaseType      = "请选择";

            MessagingCenter.Unsubscribe <List <RequestParameter> >(this, MessageConst.CASEATTACH_DELETE);

            MessagingCenter.Subscribe <string>(
                this,
                MessageConst.CASEATTACH_DELETE,
                (SeqNo) =>
            {
                DeleteCaseAttach(SeqNo);
            });

            MessagingCenter.Subscribe <List <RequestParameter> >(this, "GetCaseInfoDetail", (param) =>
            {
                if (param != null && param.Count > 0)
                {
                    paramList     = param;
                    string caseId = param.Find(p => p.Name == "caseId").Value;
                    GetCaseInfoDetail(caseId);
                }
            });

            MessagingCenter.Subscribe <string>(this, "InitCaseRegPage", (param) =>
            {
                Init(0);
            });

            Device.BeginInvokeOnMainThread(async() =>
            {
                var result = await _caseService.GetTypeFromHiddenCode("12");
                if (null != result && result.ResultCode == Module.ResultType.Success)
                {
                    var caseTypeList = JsonConvert.DeserializeObject <List <NameValueObject> >(result.Body);

                    if (caseTypeList != null && caseTypeList.Count > 0)
                    {
                        foreach (var item in caseTypeList)
                        {
                            _dIcCaseType.Add(item.Value, item.Name);
                        }
                    }
                    else
                    {
                    }
                }
            });
        }
예제 #12
0
        public LoginViewModel()
        {
            _accountService = Resolver.Resolve <IAccountService>();
            _commonFun      = Resolver.Resolve <ICommonFun>();
            _commonHelper   = Resolver.Resolve <CommonHelper>();

            //#if DEBUG
            //			UserName = "******";
            //			Password = "******";
            //#endif
        }
        public ReportSearchIndexViewModel()
        {
            _commonFun        = Resolver.Resolve <ICommonFun>();
            _commonHelper     = Resolver.Resolve <CommonHelper>();
            _reportService    = Resolver.Resolve <IReportService>();
            ItemTappedCommand = new RelayCommand <ReportAttachmentDto>(TappedCommand);

            MessagingCenter.Subscribe <Dictionary <string, string> >(this, "ReportSearchResult", (c) =>
            {
                InitParam(c);
                SearchReportLst();
            });
        }
 public CalendarRegViewModel()
 {
     try
     {
         _calendarService = Resolver.Resolve <ICalendarService>();
         _commonFun       = Resolver.Resolve <ICommonFun>();
     }
     catch (Exception)
     {
         _commonFun.AlertLongText("操作异常,请重试。-->CalendarRegViewModel");
         return;
     }
 }
예제 #15
0
 public UpdatePopViewModel()
 {
     try
     {
         _tourService = Resolver.Resolve <ITourService>();
         _commonFun   = Resolver.Resolve <ICommonFun>();
     }
     catch (Exception)
     {
         _commonFun.AlertLongText("操作异常,请重试。-->UpdatePopViewModel");
         return;
     }
 }
예제 #16
0
 public ChangePasswordViewModel()
 {
     try
     {
         _accountService = Resolver.Resolve <IAccountService>();
         _commonFun      = Resolver.Resolve <ICommonFun>();
         _commonHelper   = Resolver.Resolve <CommonHelper>();
     }
     catch (Exception)
     {
         _commonFun.AlertLongText("操作异常,请重试。-->ChangePasswordViewModel");
         return;
     }
 }
예제 #17
0
 public ReviewPlansViewModel()
 {
     try
     {
         _commonFun          = Resolver.Resolve <ICommonFun>();
         _commonHelper       = Resolver.Resolve <CommonHelper>();
         _reviewPlansService = Resolver.Resolve <IReviewPlansService>();
     }
     catch (Exception)
     {
         _commonFun.AlertLongText("操作异常,请重试。-->ReviewPlansViewModel");
         return;
     }
 }
예제 #18
0
 public NoticeApproalLogViewModel()
 {
     try
     {
         _commonFun        = Resolver.Resolve <ICommonFun>();
         _commonHelper     = Resolver.Resolve <CommonHelper>();
         _notifiMngService = Resolver.Resolve <INotifiMngService>();
     }
     catch (Exception)
     {
         _commonFun.AlertLongText("操作异常,请重试。-->NoticeApproalLogViewModel");
         return;
     }
 }
예제 #19
0
        int _noticeId = 0;//本通知Id

        #region constructor
        public NotifiMngViewModel()
        {
            try
            {
                _tourService      = Resolver.Resolve <ITourService>();
                _notifiMngService = Resolver.Resolve <INotifiMngService>();
                _commonHelper     = Resolver.Resolve <CommonHelper>();
                _commonFun        = Resolver.Resolve <ICommonFun>();

                #region MultiSelectDistributor
                MessagingCenter.Unsubscribe <List <MultiSelectDto> >(this, MessageConst.NOTICE_DISTRIBUTOR_SET);
                MessagingCenter.Subscribe <List <MultiSelectDto> >(
                    this,
                    MessageConst.NOTICE_DISTRIBUTOR_SET,
                    (paramList) =>
                {
                    SetNoticeDistributor(paramList);
                });
                #endregion

                #region MultiSelectDepartment
                MessagingCenter.Unsubscribe <List <MultiSelectDto> >(this, MessageConst.NOTICE_DEPARTMENT_SET);
                MessagingCenter.Subscribe <List <MultiSelectDto> >(
                    this,
                    MessageConst.NOTICE_DEPARTMENT_SET,
                    (paramList) =>
                {
                    SetNoticeDepartment(paramList);
                });
                #endregion

                #region Attachment
                MessagingCenter.Subscribe <string>(
                    this,
                    MessageConst.NOTICE_ATTECHMENT_DELETE,
                    (seqNo) =>
                {
                    DeleteAttechmentNotice(seqNo);
                });
                #endregion
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->NotifiMngViewModel");
                return;
            }
        }
예제 #20
0
 public NotifiMngSearchConditionViewModel()
 {
     try
     {
         StatusSelectName  = "全部";
         StatusSelectIndex = "";
         ReplySelected     = 0;
         DateTime now = DateTime.Now;
         StartDate       = new DateTime(now.Year, now.Month, 1);
         EndDate         = DateTime.Now;
         NoticeSelectDis = "全部";
         NoticeColorDis  = StaticColor.ContentFontColor;
         DisSelectList   = new List <MultiSelectDto>();
         NoticeSelectDep = "请选择";
         NoticeColorDep  = StaticColor.ContentFontColor;
         DepSelectList   = new List <MultiSelectDto>();
         NoticeTitle     = "";
         NoticeNo        = "";
         _commonFun      = Resolver.Resolve <ICommonFun>();
         MessagingCenter.Unsubscribe <NameValueObject>(this, MessageConst.NOTICE_STATUSLIST_SELECT);
         MessagingCenter.Subscribe <NameValueObject>(this, MessageConst.NOTICE_STATUSLIST_SELECT, statusItem =>
         {
             StatusSelectName  = statusItem.Name;
             StatusSelectIndex = statusItem.Value;
         });
         MessagingCenter.Unsubscribe <List <MultiSelectDto> >(this, MessageConst.NOTICE_DISTRIBUTOR_SET_LIST);
         MessagingCenter.Subscribe <List <MultiSelectDto> >(
             this,
             MessageConst.NOTICE_DISTRIBUTOR_SET_LIST,
             (paramList) =>
         {
             SetDisSelectList(paramList);
         });
         MessagingCenter.Unsubscribe <List <MultiSelectDto> >(this, MessageConst.NOTICE_DEPARTMENT_SET_LIST);
         MessagingCenter.Subscribe <List <MultiSelectDto> >(this, MessageConst.NOTICE_DEPARTMENT_SET_LIST, paramList =>
         {
             SetDepSelectList(paramList);
         });
     }
     catch (Exception)
     {
         _commonFun.AlertLongText("操作异常,请重试。-->NotifiMngSearchConditionViewModel");
         return;
     }
 }
예제 #21
0
        public CaseIndexViewModel()
        {
            _commonFun        = Resolver.Resolve <ICommonFun>();
            _commonHelper     = Resolver.Resolve <CommonHelper>();
            _caseService      = Resolver.Resolve <ICaseService>();
            ItemTappedCommand = new RelayCommand <CasesListDto>(TappedCommand);

            MessagingCenter.Unsubscribe <string>(this, MessageConst.CASESAVESUCCESS);
            MessagingCenter.Subscribe <string>(this, MessageConst.CASESAVESUCCESS, (c) =>
            {
                SearchTopNCaseList();
            });

            MessagingCenter.Subscribe <string>(this, MessageConst.SEARCHTOPNCASELIST, (c) =>
            {
                SearchTopNCaseList();
            });
        }
        public CaseSearchResultViewModel()
        {
            _commonFun        = Resolver.Resolve <ICommonFun>();
            _commonHelper     = Resolver.Resolve <CommonHelper>();
            _caseService      = Resolver.Resolve <ICaseService>();
            ItemTappedCommand = new RelayCommand <CasesListDto>(TappedCommand);

            MessagingCenter.Subscribe <Dictionary <string, string> >(this, "CaseSearchResult", (c) =>
            {
                InitParam(c);
                SearchCaseLst();
            });

            MessagingCenter.Subscribe <string>(this, "CaseSearchResultList", (c) =>
            {
                SearchCaseLst();
            });
        }
예제 #23
0
 public ReviewPlansIndexViewModel()
 {
     try
     {
         _commonFun          = Resolver.Resolve <ICommonFun>();
         _commonHelper       = Resolver.Resolve <CommonHelper>();
         _reviewPlansService = Resolver.Resolve <IReviewPlansService>();
         ItemTappedCommand   = new RelayCommand <ReviewPlansListDto>(TappedCommand);
         MessagingCenter.Subscribe <string>(this, MessageConst.GETREVIEWPLANSLIST, (c) =>
         {
             SearchReviewPlansList();
         });
     }
     catch (Exception)
     {
         _commonFun.AlertLongText("操作异常,请重试。-->ReviewPlansIndexViewModel");
         return;
     }
 }
        public NoticeApproalViewModel()
        {
            try
            {
                _commonFun        = Resolver.Resolve <ICommonFun>();
                _commonHelper     = Resolver.Resolve <CommonHelper>();
                _notifiMngService = Resolver.Resolve <INotifiMngService>();
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->NoticeApproalViewModel");
                return;
            }
            //Device.BeginInvokeOnMainThread(() =>
            //{
            //    GetNoticeApproalDetail(NotifiContentItem.NoticeReaderId);

            //});
        }
 public ImproveSearchViewModel()
 {
     try
     {
         improveService = Resolver.Resolve <IImproveService>();
         _commonFun     = Resolver.Resolve <ICommonFun>();
         _commonHelper  = Resolver.Resolve <CommonHelper>();
         MessagingCenter.Unsubscribe <string>(this, MessageConst.IMPROVE_IMPPLANORRESULTDATA_GET);
         MessagingCenter.Subscribe <string>(this, MessageConst.IMPROVE_IMPPLANORRESULTDATA_GET, (c) =>
         {
             if (paramList != null && paramList.Count > 0)
             {
                 GetImproveResultOrPlan(paramList);
             }
         });
         MessagingCenter.Subscribe <List <RequestParameter> >(this, MessageConst.PASS_IMPROVESEARCHCONDITION, (param) =>
         {
             if (param != null && param.Count > 0)
             {
                 paramList      = param;
                 StatueType     = param.Find(p => p.Name == "StatueTypeName").Value;
                 StartDate      = param.Find(p => p.Name == "StartDate").Value;
                 EndDate        = param.Find(p => p.Name == "EndDate").Value;
                 Statue         = param.Find(p => p.Name == "StatueName").Value;
                 Service        = param.Find(p => p.Name == "ServiceName").Value;
                 Department     = param.Find(p => p.Name == "DepartmentName").Value;
                 ItemName       = param.Find(p => p.Name == "ItemName").Value;
                 PlanSelectName = param.Find(p => p.Name == "PlanSelectName").Value;
                 SourceTypeName = param.Find(p => p.Name == "SourceTypeName").Value;
                 GetImproveResultOrPlan(param);
             }
             else if (paramList != null && paramList.Count > 0)
             {
                 GetImproveResultOrPlan(paramList);
             }
         });
     }
     catch (Exception)
     {
         _commonFun.AlertLongText("操作异常,请重试。-->ImproveSearchViewModel");
         return;
     }
 }
        public LocalSystemListViewModel()
        {
            try
            {
                _localScoreService = Resolver.Resolve <ILocalScoreService>();
                _commonFun         = Resolver.Resolve <ICommonFun>();


                MessagingCenter.Subscribe <CommonMessage>(this, "LocalResetTaskID", (obj) =>
                {
                    if (obj.TaskID == "-1")
                    {
                        _refresh = false;
                    }
                    else
                    {
                        _refresh = true;
                    }
                });

                MessagingCenter.Subscribe <List <LoaclItemOfTaskDto> >(this, "LocalSendSystemList", (obj) =>
                {
                    _taskId = obj.FirstOrDefault().TPId.ToString();
                    Init(obj);
                });

                MessagingCenter.Subscribe <LocalSystemListPage>(this, "LocalRefreshSystem", (obj) =>
                {
                    if (_refresh)
                    {
                        RefreshPage(TaskId.ToString());
                    }
                });

                ItemTappedCommand = new RelayCommand <LoaclItemOfTaskDto>(TappedCommand);
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->CustomizedTaskViewModel");
                return;
            }
        }
예제 #27
0
        public ShopfrontMainPageViewModel()
        {
            try
            {
                _tourService       = Resolver.Resolve <ITourService>();
                _localScoreService = Resolver.Resolve <ILocalScoreService>();
                _commonFun         = Resolver.Resolve <ICommonFun>();
                _commonHelper      = Resolver.Resolve <CommonHelper>();
                ItemTappedCommand  = new RelayCommand <TourDistributorDto>(TappedCommand);
                _improveService    = Resolver.Resolve <IImproveService>();

                MessagingCenter.Subscribe <ShopfrontMainPage>(this, "GetShops", (sender) =>
                {
                    canGo = false;
                    Task.Run(async() =>
                    {
                        await GetShops();
                    });
                });
                MessagingCenter.Subscribe <string>(this, "GetImproveDitstriLst", async(arg) =>
                {
                    await GetImproveDitstriLst(arg);
                });

                Device.BeginInvokeOnMainThread(async() =>
                {
                    if (CommonContext.Account.UserType == "S")
                    {
                        await GetImproveDitstriLst("");
                    }
                    else
                    {
                        await GetShops();
                    }
                });
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->ShopfrontMainPageViewModel");
                return;
            }
        }
        public ImpPlanCommitViewModel()
        {
            try
            {
                _improveService = Resolver.Resolve <IImproveService>();
                _tourService    = Resolver.Resolve <ITourService>();
                _commonFun      = Resolver.Resolve <ICommonFun>();
                _commonHelper   = Resolver.Resolve <CommonHelper>();

                NowDate             = DateTime.Now;
                ImpPlanCompleteDate = NowDate;

                //MessagingCenter.Unsubscribe<List<RequestParameter>>(this, MessageConst.IMPROVE_PLANORRESULTDETAIL_GET);
                MessagingCenter.Unsubscribe <List <RequestParameter> >(this, MessageConst.IMPROVE_PLANATTACH_DELETE);
                //MessagingCenter.Subscribe<List<RequestParameter>>(
                //    this,
                //    MessageConst.IMPROVE_PLANORRESULTDETAIL_GET,
                //    (param) =>
                //    {
                //        GetImpPlanOrResultDetail(param);
                //    });
                MessagingCenter.Subscribe <string>(
                    this,
                    MessageConst.IMPROVE_PLANATTACH_DELETE,
                    (SeqNo) =>
                {
                    DeletePlanAttach(SeqNo);
                });
                MessagingCenter.Subscribe <List <RequestParameter> >(
                    this,
                    MessageConst.IMPROVE_PLANAPPLYYN_CHANGE,
                    (ApplyYN) =>
                {
                    SetApplyYN(ApplyYN);
                });
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->ImpPlanCommitViewModel");
            }
        }
        public CustomizedTaskViewModel()
        {
            try
            {
                _commonFun         = Resolver.Resolve <ICommonFun>();
                _commonHelper      = Resolver.Resolve <CommonHelper>();
                _tourService       = Resolver.Resolve <ITourService>();
                _localScoreService = Resolver.Resolve <ILocalScoreService>();


                MessagingCenter.Subscribe <string>(this, "TaskSearchParam", (param) =>
                {
                    fromSeachYN = param;
                });
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->CustImproveViewModel");
                return;
            }
        }
 public ComSinglePopViewModel()
 {
     try
     {
         _caseService    = Resolver.Resolve <ICaseService>();
         _improveService = Resolver.Resolve <IImproveService>();
         _commonFun      = Resolver.Resolve <ICommonFun>();
         _commonHelper   = Resolver.Resolve <CommonHelper>();
         MessagingCenter.Unsubscribe <string>(this, MessageConst.COMMON_SOURCE_GET);
         MessagingCenter.Subscribe <string>(
             this,
             MessageConst.COMMON_SOURCE_GET,
             (dataType) =>
         {
             SetListViewSource(dataType);
         });
     }
     catch (Exception)
     {
         _commonFun.AlertLongText("操作异常,请重试。-->ComSinglePopViewModel");
     }
 }