public void RefundMoneyToCustomer(object param) { MessageBoxResult result = System.Windows.MessageBox.Show("Do you want to save changes?", "Save Confirmation", MessageBoxButton.YesNo); if (result == MessageBoxResult.Yes) { Mouse.OverrideCursor = Cursors.Wait; PQErrors = string.Empty; CreditNoteForm PQForm = GetDataIntoModel(); if (PQForm != null) { dnRepository.UpdateCreditNote(PQForm); } if (param != null) { string obj = param.ToString(); SharedValues.NewClick = obj; } SharedValues.ScreenCheckName = "Refund To Customer"; SharedValues.ViewName = "Refund To Customer"; var accessitem = listitem.AddToList(); if (accessitem == true) { SharedValues.getValue = "RefundToCustomerTab"; SharedValues.CollectCommand = Convert.ToString(this.SelectedCustomerID); var mainview = ServiceLocator.Current.GetInstance <RefundToCustomerView>(); var mainregion = this.regionManager.Regions[RegionNames.MainRegion]; mainregion.Add(mainview); if (mainregion != null) { mainregion.Activate(mainview); } var tabview = ServiceLocator.Current.GetInstance <CashBankTabView>(); var tabregion = this.regionManager.Regions[RegionNames.MenuBarRegion]; tabregion.Add(tabview); if (tabregion != null) { tabregion.Activate(tabview); } eventAggregator.GetEvent <TabVisibilityEvent>().Publish(true); eventAggregator.GetEvent <TitleChangedEvent>().Publish("Refund To Customer Form"); } else { MessageBox.Show("You do not have access to this screen. Please contact your Administrator.\n" + "@ Simple Accounting Software Pte Ltd"); } Mouse.OverrideCursor = null; } }
public void RefundMoneyToCustomer(object param) { MessageBoxResult result = System.Windows.MessageBox.Show("Do you want to save changes?", "Save Confirmation", MessageBoxButton.YesNo); if (result == MessageBoxResult.Yes) { Mouse.OverrideCursor = Cursors.Wait; PQErrors = string.Empty; CreditNoteForm PQForm = GetDataIntoModel(); if (PQForm != null) { dnRepository.UpdateCreditNote(PQForm); } if (param != null) { string obj = param.ToString(); SharedValues.NewClick = obj; } SharedValues.getValue = "RefundToCustomerTab"; SharedValues.CollectCommand = Convert.ToString(this.SelectedCustomerID); var mainview = ServiceLocator.Current.GetInstance <RefundToCustomerView>(); var mainregion = this.regionManager.Regions[RegionNames.MainRegion]; mainregion.Add(mainview); if (mainregion != null) { mainregion.Activate(mainview); } var tabview = ServiceLocator.Current.GetInstance <SDN.Common.View.CashAndBankTabView>(); var tabregion = this.regionManager.Regions[RegionNames.MenuBarRegion]; tabregion.Add(tabview); if (tabregion != null) { tabregion.Activate(tabview); } eventAggregator.GetEvent <TabVisibilityEvent>().Publish(true); eventAggregator.GetEvent <TitleChangedEvent>().Publish("Refund To Customer Form"); Mouse.OverrideCursor = null; } }