public ProgressPageViewModel(IQueryService progressListService)
 {
     this._queryService = progressListService;
     NavigatedToCommand = new RelayCommand<object>((e) =>
       {
           LoadProgressList(Convert.ToInt64(e));
       });
    
 }
示例#2
0
        public MPageViewModel(IMenusService menusService, NavigationService navigation)
        {
            this._menusService = menusService;
            IsOpen = false;
            Pjs = new Projects();
            Project pj1 = new Project();
            List<Project> list = new List<Project>();
            pj1.PCode = "行政绩效";
            pj1.PName = "行政绩效";
            pj1.PColor = "#b571cb";
            pj1.Image = @"Assets\行政绩效.png";
            list.Add(pj1);
            Project pj2 = new Project();
            pj2.PCode = "OA";
            pj2.PName = "办公自动化";
            pj2.PColor = "#b571cb";
            pj2.Image = @"Assets\OA.png";
            list.Add(pj2);
            Pjs.ProjectList = list;
            LoadMenus("行政绩效");
            MenuClickCommand = new RelayCommand<object>((e) =>
            {
                var parameter = e as Menu;
                if (parameter.MCode == "cszbjd")
                {
                    navigation.Navigate<Views.DeptPage>();
                }
                else if (parameter.MCode == "zbgs")
                {
                    navigation.Navigate<Views.PublishKpiPage>();
                }
                else if (parameter.MCode == "ldrc")
                {
                    navigation.Navigate<Views.OALDRCPage>();
                }
            });
            
            ButtonClickCommand = new RelayCommand<object>((e) =>
            {
                var p = e as Project;
                var ssxt = string.Empty;
                if (p == null)
                {
                    ssxt = "行政绩效";
                }
                else
                {
                    ssxt = p.PCode;
                }
                LoadMenus(ssxt);
                Ctl = new Controller();
                Ctl.IsOpen = !IsOpen;
                IsOpen = Ctl.IsOpen;

            });
            //ButtonClickCommand.Execute = new System.Action<object>(LoadMenus)

        }