Exemple #1
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 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;
            }
        }
Exemple #3
0
 public NoticeApproalLogViewModel()
 {
     try
     {
         _commonFun        = Resolver.Resolve <ICommonFun>();
         _commonHelper     = Resolver.Resolve <CommonHelper>();
         _notifiMngService = Resolver.Resolve <INotifiMngService>();
     }
     catch (Exception)
     {
         _commonFun.AlertLongText("操作异常,请重试。-->NoticeApproalLogViewModel");
         return;
     }
 }
Exemple #4
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;
            }
        }
Exemple #5
0
        public MessagePage()
        {
            InitializeComponent();
            try
            {
                _commonHelper     = Resolver.Resolve <CommonHelper>();
                _noticeMngService = Resolver.Resolve <INotifiMngService>();


                MessagingCenter.Unsubscribe <string>(this, "MessagePageReSearch");
                MessagingCenter.Subscribe <string>(this, "MessagePageReSearch", (c) =>
                {
                    SetData();
                });
            }
            catch (Exception)
            {
            }
        }
        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 MainPage()
        {
            InitializeComponent();
            try
            {
                _commonHelper            = Resolver.Resolve <CommonHelper>();
                _commonFun               = Resolver.Resolve <ICommonFun>();
                _noticeMngService        = Resolver.Resolve <INotifiMngService>();
                imageGallery.ItemsSource = new ObservableCollection <string>()
                {
                    "banner1", "banner2", "banner3", "banner4"
                };

                InitMenuGrid();
                DisplayMessage();

                MessagingCenter.Subscribe <string>(this, "GoPreviewImageGesturePage", (param) =>
                {
                    Regex regImg = new Regex(".+(.JPEG|.jpeg|.JPG|.jpg|.GIF|.gif|.BMP|.bmp|.PNG|.png)$");
                    if (regImg.IsMatch(param))
                    {
                        Device.BeginInvokeOnMainThread(async() =>
                        {
                            await PopupNavigation.PushAsync(new PreviewImageGesturePage(param), true);
                        });
                    }
                    else
                    {
                        _commonFun.AlertLongText("请在电脑端阅览");
                        return;
                    }
                });
            }
            catch (Exception)
            {
            }
        }
 public NotifiMngSearchViewModel()
 {
     try
     {
         _commonFun        = Resolver.Resolve <ICommonFun>();
         _commonHelper     = Resolver.Resolve <CommonHelper>();
         _noticeMngService = Resolver.Resolve <INotifiMngService>();
         MessagingCenter.Unsubscribe <List <RequestParameter> >(this, MessageConst.NOTIFI_SEARCHCONDITION_PASS);
         MessagingCenter.Subscribe <List <RequestParameter> >(this, MessageConst.NOTIFI_SEARCHCONDITION_PASS, (param) =>
         {
             if (param != null && param.Count > 0)
             {
                 paramList           = param;
                 StatusSelectName    = param.Find(p => p.Name == "StatusSelectName").Value;
                 ReplySelectedName   = param.Find(p => p.Name == "ReplySelectedName").Value;
                 StartDateAndEndDate = param.Find(p => p.Name == "StartDate").Value + "~" + param.Find(p => p.Name == "EndDate").Value;
                 NoticeReaderDes     = param.Find(p => p.Name == "NoticeReaderDes").Value;
                 NoticeNo            = param.Find(p => p.Name == "NoticeNo").Value;
                 NoticeTitle         = param.Find(p => p.Name == "NoticeTitle").Value;
                 GetNoticeList(param);
             }
         });
         MessagingCenter.Unsubscribe <string>(this, MessageConst.NOTIFI_SAVEREFRESH_GO);
         MessagingCenter.Subscribe <string>(this, MessageConst.NOTIFI_SAVEREFRESH_GO, (c) =>
         {
             if (paramList != null && paramList.Count > 0)
             {
                 GetNoticeList(paramList);
             }
         });
     }
     catch (Exception)
     {
         _commonFun.AlertLongText("操作异常,请重试。-->NotifiMngSearchViewModel");
         return;
     }
 }
Exemple #9
0
        int _noticeId = 0;//本通知Id

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

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

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

            #region Attachment
            MessagingCenter.Subscribe <string>(
                this,
                MessageConst.NOTICE_ATTECHMENT_DELETE,
                (pathToFile) =>
            {
                DeleteAttechmentNotice(pathToFile);
            });
            #endregion
        }
 public NotifiMngController(INotifiMngService notifiMngService)
 {
     _notifiMngService = notifiMngService;
 }
        public NotifiIndexViewModel()
        {
            try
            {
                _notifiMngService     = Resolver.Resolve <INotifiMngService>();
                _commonFun            = Resolver.Resolve <ICommonFun>();
                _commonHelper         = Resolver.Resolve <CommonHelper>();
                ItemTappedCommand     = new RelayCommand <NeedApprovalDto>(TappedCommand);
                FeedItemTappedCommand = new RelayCommand <FeedBackListDto>(FeedTappedCommand);
                MessagingCenter.Subscribe <NotifiIndexPage>(
                    this,
                    MessageConst.NOTICE_MAKEDATA_GET,
                    (c) =>
                {
                    //GetNofifiListOfMake();
                });

                if (CommonContext.Account.UserType == "S" || CommonContext.Account.UserType == "D")
                {
                    MessagingCenter.Subscribe <NotifiIndexPage>(
                        this,
                        MessageConst.NOTICE_FEEDBDATA_GET,
                        (c) =>
                    {
                        GetNofifiListOfFeedB();
                    });
                    MessagingCenter.Subscribe <string>(
                        this,
                        MessageConst.NOTICE_FEEDBACKDATA_GET,
                        (c) =>
                    {
                        GetNofifiListOfFeedB();
                    });
                }
                else
                {
                    //获取待审核的通知列表
                    MessagingCenter.Subscribe <string>(
                        this,
                        MessageConst.NOTICE_APPROALDATA_GET,
                        (c) =>
                    {
                        GetNofifiListOfApproal();
                    });

                    GetNofifiListOfApproal();
                }

                MessagingCenter.Subscribe <string>(
                    this,
                    "noticeApproalSearch1",
                    (c) =>
                {
                    GetNofifiListOfApproal();
                });

                MessagingCenter.Subscribe <string>(
                    this,
                    "noticeFeedBackList",
                    (c) =>
                {
                    GetNofifiListOfFeedB();
                });
            }
            catch (Exception)
            {
                _commonFun.AlertLongText("操作异常,请重试。-->NotifiIndexViewModel");
                return;
            }
        }