private void GenerateOrderCallback(SQLQueryResult queryResult) { if (queryResult.MesResult == MessageQueryResult.Done) { bool refreshCustomer = false; bool refreshMedicineBillBoard = true; App.Current.ShowApplicationMessageBox("Tạo hóa đơn mới thành công! Đóng thông báo để tiếp tục in hóa đơn", HPSolutionCCDevPackage.netFramework.AnubisMessageBoxType.Default, HPSolutionCCDevPackage.netFramework.AnubisMessageImage.Success, OwnerWindow.MainScreen, "Thông báo!!"); PrintInvoice(); SPViewModel.RefreshViewModel(refreshCustomer, refreshMedicineBillBoard); } else { App.Current.ShowApplicationMessageBox("Lỗi tạo hóa đơn mới!", HPSolutionCCDevPackage.netFramework.AnubisMessageBoxType.Default, HPSolutionCCDevPackage.netFramework.AnubisMessageImage.Error, OwnerWindow.MainScreen, "Lỗi!!"); } SPViewModel.ButtonCommandOV.IsInstantiateNewOrderButtonRunning = false; }
protected override void ExecuteCommand() { if (SPViewModel.CustomerOrderDetailItemSource.Count > 0) { var x = App.Current.ShowApplicationMessageBox("Bạn có chắc tạo mới!", HPSolutionCCDevPackage.netFramework.AnubisMessageBoxType.YesNo, HPSolutionCCDevPackage.netFramework.AnubisMessageImage.Info, OwnerWindow.MainScreen, "Thông báo!!"); if (x == HPSolutionCCDevPackage.netFramework.AnubisMessgaeResult.ResultNo) { return; } } bool refreshCustomer = true; bool refreshBill = true; SPViewModel.RefreshViewModel(refreshCustomer, refreshBill); return; }