public Dashboard(IRegionManager regionManager, IEventAggregator eventAggregator, IGlobalProperties globalProperties, IModalWindowService winService, IEventDAL eventDAL) { InitializeComponent(); _eventAggregator = eventAggregator; _regionManager = regionManager; _globalProperties = globalProperties; _eventDAL = eventDAL; _winService = winService; CachTableBLL CommonBll = new CachTableBLL(); CommonBll.CreateCachTable(); ProjectTemplateViewModel vm = new ProjectTemplateViewModel(_regionManager, _globalProperties); vm.LoadProjects("All"); GridAllProject.DataContext = vm; _eventAggregator.GetEvent <RefreshDashboard>().Subscribe(RefreshDashboard); }
private void LoadInfo() { //this.gbBrand.Enabled = false; //this.gbSource.Enabled = false; //this.pnlOK.Enabled = false; //新增缓存表 CachTableBLL CommonBll = new CachTableBLL(); CommonBll.CreateCachTable(); BindCmbRegion(); if (Registration.IsSuperUser()) { this.jccmbRegion.SelectedIndex = 0; this.jccmbRegion.Enabled = true; } else { string regionCode = Registration.GetRegionCode(); brandCode = Registration.GetBrandCode(); if (!string.IsNullOrEmpty(regionCode)) { this.jccmbRegion.SelectedValue = regionCode; this.jccmbRegion.Enabled = false; } } //this.jccmbRegion.SelectedValue = SystemSetting.UserSetting.defaultSetting.region; BindCmbSubRegion(); //this.jccmbSubRegion.SelectedValue = SystemSetting.UserSetting.defaultSetting.subRegion; if (!string.IsNullOrEmpty(this.jccmbSubRegion.Text)) { BindBrandList(); } }