private void btnBatchInspection_Click(object sender, RoutedEventArgs e) { Window.Confirm("您确定要进行批量商检操作吗?", (s, args) => { if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK) { ProductBatchEntryVM productBatchEntryVM = new ProductBatchEntryVM(); productBatchEntryVM.Title = "批量商检"; productBatchEntryVM.BtnPassTitle = "商检通过"; productBatchEntryVM.BtnRejectTitle = "商检不通过"; ProductBatchEntryNote content = new ProductBatchEntryNote(this, productBatchEntryVM); content.Width = 550D; content.Height = 350D; IDialog dialog = this.Window.ShowDialog(productBatchEntryVM.Title, content, (obj, args1) => { if (productBatchEntryVM.AuditPass.HasValue) { if (productBatchEntryVM.AuditPass == true) { ProductBatchEntry(ProductEntryStatus.Entry, ProductEntryStatusEx.InspectionSucess, productBatchEntryVM.Note); } else { ProductBatchEntry(ProductEntryStatus.EntryFail, ProductEntryStatusEx.InspectionFail, productBatchEntryVM.Note); } } }); content.Dialog = dialog; } }); }
private void btnBatchCustoms_Click(object sender, RoutedEventArgs e) { Window.Confirm("您确定要进行批量报关操作吗?", (s, args) => { if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK) { ProductBatchEntryVM productBatchEntryVM = new ProductBatchEntryVM(); productBatchEntryVM.Title = "批量报关"; productBatchEntryVM.BtnPassTitle = "报关通过"; productBatchEntryVM.BtnRejectTitle = "报关不通过"; ProductBatchEntryNote content = new ProductBatchEntryNote(this, productBatchEntryVM); content.Width = 550D; content.Height = 350D; IDialog dialog = this.Window.ShowDialog(productBatchEntryVM.Title, content, (obj, args1) => { if (args1 != null && args1.Data != null) { ProductBatchEntryVM argsData = args1.Data as ProductBatchEntryVM; if (argsData != null) { if (argsData.AuditPass.HasValue) { if (argsData.AuditPass == true) { ProductBatchEntry(ProductEntryStatus.EntrySuccess, ProductEntryStatusEx.CustomsSuccess, argsData.Note); } else { ProductBatchEntry(ProductEntryStatus.EntryFail, ProductEntryStatusEx.CustomsFail, argsData.Note); } } } } }); content.Dialog = dialog; } }); }
public ProductBatchEntryNote(IPage page, ProductBatchEntryVM vm) { Model = vm; this.DataContext = vm; InitializeComponent(); }