private void btnSave_Click(object sender, RoutedEventArgs e) { if (_reasonList == null || _currentVM == null || _currentVM.SysNo == null) { return; } string commaSeperatedReasonIDs = ""; foreach (var item in _reasonList) { if (item.IsChecked == true) { commaSeperatedReasonIDs += "," + item.ReasonID; } } commaSeperatedReasonIDs = commaSeperatedReasonIDs.TrimEnd(','); if (commaSeperatedReasonIDs.Length == 0) { CurrentWindow.Alert(ResProductPriceCompare.Info_PleaseSelectInvalidReason); return; } var facade = new ProductPriceCompareFacade(CPApplication.Current.CurrentPage); //审核无效 facade.AuditDecline(_currentVM.SysNo.Value, commaSeperatedReasonIDs, () => { CurrentWindow.Alert(ResProductPriceCompare.Info_AuditDeclineSuccess); CloseDialog(DialogResultType.OK); }); }
private void DataGrid_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e) { //1.初始化查询条件 //2.请求服务查询 PagingInfo p = new PagingInfo { PageIndex = e.PageIndex, PageSize = e.PageSize, SortBy = e.SortField }; ProductPriceCompareFacade facade = new ProductPriceCompareFacade(this); _queryVM.C1SysNo = ucCategoryPicker.ChooseCategory1SysNo; _queryVM.C2SysNo = ucCategoryPicker.ChooseCategory2SysNo; _queryVM.C3SysNo = ucCategoryPicker.ChooseCategory3SysNo; facade.Query(_queryVM, p, (s, args) => { if (args.FaultsHandle()) { return; } this.DataGrid.ItemsSource = args.Result.Rows; this.DataGrid.TotalCount = args.Result.TotalCount; }); }
public UCProductPriceCompareMaintain(int currentSysNo) { InitializeComponent(); this.lstChannelList.ItemsSource = CPApplication.Current.CurrentWebChannelList.ToList <UIWebChannel>(); //当前界面正在编辑模式,加载数据 var facade = new ProductPriceCompareFacade(CPApplication.Current.CurrentPage); facade.Load(currentSysNo, (vm) => { _currentVM = vm; this.DataContext = _currentVM; facade.GetInvalidReasons((reasonList) => { _reasonList = reasonList; this.lstInvalidReasons.ItemsSource = reasonList; }); }); }