private void InitData() { queryVM = new SalesStatisticsReportQueryVM(); financialReportFacade = new FinancialReportFacade(this); var commonFacade = new CommonDataFacade(this); commonFacade.GetStockList(true, (obj, args) => { queryVM.WarehouseNumberOption = new ObservableCollection <WarehouseNumberOption>(); queryVM.WarehouseNumberOption.Insert(0, new WarehouseNumberOption { Code = "-999", Name = ResCommonEnum.Enum_All, IsChecked = true }); args.Result.ForEach(item => { if (item.StockID != null) { queryVM.WarehouseNumberOption.Add(new WarehouseNumberOption { Code = item.SysNo.ToString(), Name = item.StockName, IsChecked = true }); } }); gridQueryBuilder.DataContext = lastQueryVM = queryVM; queryVM.WarehouseNumberOption.ForEach(option => option.PropertyChanged += OnStockCheck); SetStockNameText(); }); queryVM.SOStatusListOptions.ForEach(option => option.PropertyChanged += OnSOStatusCheck); SetSOStatusText(); }
private void SOFreightStatReport_Loaded(object sender, EventArgs e) { queryVM = new SOFreightStatDetailQueryVM(); reportFacade = new FinancialReportFacade(this); this.DataContext = queryVM; cmbSOFreightConfirml.ItemsSource = EnumConverter.GetKeyValuePairs <CheckStatus>(EnumConverter.EnumAppendItemType.All); cmbSOFreightConfirml.SelectedIndex = 0; cmbRealFreightConfirm.ItemsSource = EnumConverter.GetKeyValuePairs <RealFreightStatus>(EnumConverter.EnumAppendItemType.All); cmbRealFreightConfirm.SelectedIndex = 0; }
private void IncomeCostReport_OnOnLoad(object sender, EventArgs e) { InitData(); financialReportFacade = new FinancialReportFacade(this); }