private void btnChooseManufacturer_Click(object sender, RoutedEventArgs e) { UCManufacturerQuery selectDialog = new UCManufacturerQuery(); selectDialog.Dialog = CPApplication.Current.CurrentPage.Context.Window.ShowDialog("查询代理厂商", selectDialog, (obj, args) => { if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK) { DynamicXml getSelectedManufacturer = args.Data as DynamicXml; if (null != getSelectedManufacturer) { this.SelectedManufacturerSysNo = getSelectedManufacturer["SysNo"].ToString(); this.SelectedManufacturerName = getSelectedManufacturer["ManufacturerNameLocal"].ToString(); BrandQueryFilter requestBrand = new BrandQueryFilter() { ManufacturerSysNo = int.Parse(SelectedManufacturerSysNo), ManufacturerName = SelectedManufacturerName, PagingInfo = new QueryFilter.Common.PagingInfo() { PageIndex = 0, PageSize = 1 } }; serviceFacade.QueryBrands(requestBrand, (obj2, args2) => { if (args2.FaultsHandle()) { return; } var brandList = args2.Result.Rows; if (null != brandList) { try { SelectedBrandSysNo = null != brandList[0]["SysNo"] ? brandList[0]["SysNo"].ToString() : string.Empty; SelectedBrandName = brandList[0]["BrandName_Ch"]; } catch { SelectedBrandSysNo = null; SelectedBrandName = null; } } }); } } }, new Size(750, 500)); }
private void btnChooseManufacturer_Click(object sender, RoutedEventArgs e) { UCManufacturerQuery selectDialog = new UCManufacturerQuery(); selectDialog.Dialog = CPApplication.Current.CurrentPage.Context.Window.ShowDialog("查询代理厂商", selectDialog, (obj, args) => { if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK) { DynamicXml getSelectedManufacturer = args.Data as DynamicXml; if (null != getSelectedManufacturer) { this.txtManufacturerSysNo.Text = this.SelectedManufacturerSysNo = getSelectedManufacturer["SysNo"] == null ? null : getSelectedManufacturer["SysNo"].ToString(); this.txtManufacturerName.Text = this.SelectedManufacturerName = getSelectedManufacturer["ManufacturerNameLocal"] == null ? null : getSelectedManufacturer["ManufacturerNameLocal"].ToString(); } } }, new Size(700, 500)); }