public override void OnPageLoad(object sender, EventArgs e) { base.OnPageLoad(sender, e); facade = new RMATrackingFacade(this); this.QueryFilter.DataContext = queryVM = new RMATrackingQueryVM(); int registerSysNo; string RegisterSysNo = this.Request.Param; if (!string.IsNullOrEmpty(RegisterSysNo) && int.TryParse(RegisterSysNo, out registerSysNo)) { TextBox_RegisterSysNo.Text = RegisterSysNo; queryVM.RegisterSysNo = RegisterSysNo; lastQueryVM = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <RMATrackingQueryVM>(queryVM); this.DataGrid_Query_ResultList.Bind(); } else { if (RegisterSysNo != null) { Window.Alert(ResRMATracking.Msg_RegisterSysNoError, ResRMATracking.Msg_RegisterSysNoError, MessageType.Warning, (obj, args) => { Window.Close(); }); } } BuildValidateCondition(); SetAccessControl(); }
public override void OnPageLoad(object sender, EventArgs e) { base.OnPageLoad(sender, e); facade = new RMATrackingFacade(this); this.QueryFilter.DataContext = queryVM = new RMATrackingQueryVM(); LoadComboBoxData(); SetAccessControl(); }
private void Button_Search_Click(object sender, RoutedEventArgs e) { if (!ValidateCondition()) { return; } lastQueryVM = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <RMATrackingQueryVM>(queryVM); string url = string.Format(ConstValue.RMA_TrackingMaintainUrl, TextBox_RegisterSysNo.Text.Trim()); Window.Navigate(url, null, false); }
public void ExportExcelFile(RMATrackingQueryVM queryVM, ColumnSet[] columns) { RMATrackingQueryFilter queryFilter = new RMATrackingQueryFilter(); queryFilter = queryVM.ConvertVM <RMATrackingQueryVM, RMATrackingQueryFilter>(); queryFilter.PagingInfo = new PagingInfo { PageSize = ConstValue.MaxRowCountLimit, PageIndex = 0, SortBy = null }; queryFilter.CompanyCode = CPApplication.Current.CompanyCode; string relativeUrl = "/RMAService/RMATracking/Query"; restClient.ExportFile(relativeUrl, queryFilter, columns); }
private void dataRMARequestList_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e) { var queryVM = new RMATrackingQueryVM { RegisterSysNo = this.RegisterSysNo.ToString() }; new RMATrackingFacade(CPApplication.Current.CurrentPage).Query(queryVM, e.PageSize, e.PageIndex, e.SortField, (obj, args) => { if (args.FaultsHandle()) { return; } this.dataRMARequestList.ItemsSource = DynamicConverter <RMATrackingVM> .ConvertToVMList(args.Result.Rows); this.dataRMARequestList.TotalCount = args.Result.TotalCount; }); }
public void Query(RMATrackingQueryVM queryVM, int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback) { RMATrackingQueryFilter queryFilter = new RMATrackingQueryFilter(); queryFilter = queryVM.ConvertVM <RMATrackingQueryVM, RMATrackingQueryFilter>(); queryFilter.PagingInfo = new PagingInfo { PageSize = PageSize, PageIndex = PageIndex, SortBy = SortField }; queryFilter.CompanyCode = CPApplication.Current.CompanyCode; string relativeUrl = "/RMAService/RMATracking/Query"; restClient.QueryDynamicData(relativeUrl, queryFilter, (obj, args) => { if (args.FaultsHandle()) { return; } callback(obj, args); }); }
private void Button_Search_Click(object sender, RoutedEventArgs e) { lastQueryVM = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <RMATrackingQueryVM>(queryVM); this.DataGrid_Query_ResultList.Bind(); }