private void btn_CanNotRefund_Click(object sender, RoutedEventArgs e) { ProductExtFacade facade = new ProductExtFacade(); List <ProductExtVM> list = new List <ProductExtVM>(); dynamic viewlist = this.itemExtGrid.ItemExtQueryResult.ItemsSource as dynamic; foreach (var item in viewlist) { if (item.IsChecked == true) { list.Add(new ProductExtVM() { IsPermitRefund = 0, SysNo = item.sysno }); } } if (list.Count > 0) { facade.UpdatePermitRefund(list, (obj, arg) => { if (arg.FaultsHandle()) { return; } Window.Alert("设置成功"); itemExtGrid.ItemExtQueryResult.Bind(); itemExtGrid.cbtemp.IsChecked = false; }); } else { Window.Alert("请先选择"); } }
void ItemExtQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e) { ProductExtFacade facade = new ProductExtFacade(); facade.GetProductExtByQuery(model, e.PageSize, e.PageIndex, e.SortField, (obj, arg) => { if (arg.FaultsHandle()) { return; } itemExtGrid.ItemExtQueryResult.ItemsSource = arg.Result.Rows.ToList("IsChecked", false); itemExtGrid.ItemExtQueryResult.TotalCount = arg.Result.TotalCount; }); }