private void Button_Search_Click(object sender, RoutedEventArgs e) { if (ValidationManager.Validate(this.SeachBuilder)) { filter = model.ConvertVM <GiftCardVM, ECCentral.QueryFilter.IM.GiftCardFilter>(); filterVM = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <ECCentral.QueryFilter.IM.GiftCardFilter>(filter); DataGrid.QueryCriteria = this.filter; DataGrid.Bind(); } }
public override void OnPageLoad(object sender, EventArgs e) { facade = new GiftCardFacade(this); filter = new ECCentral.QueryFilter.IM.GiftCardFilter(); model = new GiftCardVM(); model.CompanyCode = Newegg.Oversea.Silverlight.ControlPanel.Core.CPApplication.Current.CompanyCode; model.ChannelID = "1"; comGiftCardStatus.ItemsSource = EnumConverter.GetKeyValuePairs <ECCentral.BizEntity.IM.GiftCardStatus>(EnumConverter.EnumAppendItemType.All).Where(status => status.Key != GiftCardStatus.Void && status.Key != GiftCardStatus.Used); //comGiftCardCategory.ItemsSource = EnumConverter.GetKeyValuePairs<ECCentral.BizEntity.IM.GiftCardType>(EnumConverter.EnumAppendItemType.All); SeachBuilder.DataContext = model; base.OnPageLoad(sender, e); }
/// <summary> /// 数据全部导出 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DataGrid_ExportAllClick(object sender, EventArgs e) { if (filterVM == null || this.DataGrid.TotalCount < 1) { Window.Alert(ResGiftCardInfo.Information_ExportFailed); return; } ColumnSet col = new ColumnSet(this.DataGrid); filter = model.ConvertVM <GiftCardVM, ECCentral.QueryFilter.IM.GiftCardFilter>(); filter.PageInfo = new ECCentral.QueryFilter.Common.PagingInfo() { PageSize = ConstValue.MaxRowCountLimit, PageIndex = 0, SortBy = string.Empty }; facade.ExportExcelFile(filterVM, new ColumnSet[] { col }); }