//新建生产商 private void btnBrandNew_Click(object sender, RoutedEventArgs e) { BrandRequestMaintain item = new BrandRequestMaintain(); item.Action = BrandAction.Add; item.Dialog = Window.ShowDialog("添加品牌", item, (s, args) => { if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK) { this.dgBrandQueryResult.Bind(); } }, new Size(650, 600)); //Window.Navigate(ConstValue.IM_BrandMaintainCreateFormat, null, true); }
//查看生产商 private void hyperlinkBrandID_Click(object sender, RoutedEventArgs e) { dynamic manufacturer = this.dgBrandQueryResult.SelectedItem as dynamic; BrandRequestMaintain item = new BrandRequestMaintain(); item.Action = BrandAction.Edit; item.BrandSysNo = manufacturer.SysNo; item.Dialog = Window.ShowDialog("更新品牌", item, (s, args) => { if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK) { this.dgBrandQueryResult.Bind(); } }, new Size(750, 600)); //if (manufacturer != null) //{ // this.Window.Navigate(string.Format(ConstValue.IM_BrandMaintainUrlFormat, manufacturer.SysNo), null, true); //} }
private void HyperlinkButton_Click(object sender, RoutedEventArgs e) { dynamic d = this.BrandRequestResult.SelectedItem as dynamic; BrandRequestMaintain item = new BrandRequestMaintain(); item.Data = new BrandRequestVM() { BrandName_Ch = d.BrandName_Ch, BrandName_En = d.BrandName_En, ProductLine = d.ProductLine, Reasons = d.Reason, Info = d.Note, SupportEmail = d.SupportEmail, SupportUrl = d.SupportURL, BrandStoreType = d.Type == null ? BrandStoreType.OrdinaryStore : (BrandStoreType)d.Type, IsLogo = d.HasLogo == null ? false : d.HasLogo, IsDisPlayZone = d.IsShowInZone == "Y", AdImage = d.AdImage, ImageUrl = d.AdImage, ShowStoreUrl = d.NeweggUrl, CustomerServicePhone = d.CustomerServicePhone, BrandStatus = ValidStatus.Active,//默认有效 ManufacturerName = d.ManufacturerName, Auditor = d.Auditor, SysNo = d.SysNo, ManufacturerBriefName = d.BriefName, ManufacturerWebsite = d.ManufacturerWebsite, ManufacturerSysNo = Convert.ToString(d.ManufacturerSysno), ProductId = d.ProductId, BrandCode = d.BrandCode }; item.Action = BrandAction.Audit; item.Dialog = Window.ShowDialog("品牌审核", item, (s, args) => { if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK) { this.BrandRequestResult.Bind(); } }, new Size(650, 600)); }