private void ExecuteClosing(object parameter)
 {
     if (canexecutesave)
     {
         IMessageBoxService      msg    = new MessageBoxService();
         GenericMessageBoxResult result = msg.ShowMessage("There are unsaved changes. Do you want to save these?", "Unsaved Changes", GenericMessageBoxButton.YesNo, GenericMessageBoxIcon.Question);
         msg = null;
         if (result.Equals(GenericMessageBoxResult.Yes))
         {
             SaveCustomer();
         }
     }
     //refresh Customers list
     StaticCollections.Customers = DatabaseQueries.GetCustomers();
 }
Example #2
0
        private bool CanCloseWindow(object obj)
        {
            if (IsDirtyData)
            {
                IMessageBoxService      msg    = new MessageBoxService();
                GenericMessageBoxResult result = msg.ShowMessage("There are unsaved changes. Do you want to save these?", "Unsaved Changes", GenericMessageBoxButton.YesNo, GenericMessageBoxIcon.Question);
                msg = null;
                if (result.Equals(GenericMessageBoxResult.Yes))
                {
                    ExecuteUpdateActivities();
                }

                return(true);
            }
            else
            {
                return(true);
            }
        }
Example #3
0
 private void CommandInvokedHandler(IUICommand command)
 {
     if (command.Label == m_OkString)
     {
         m_Result = GenericMessageBoxResult.Ok;
     }
     else if (command.Label == m_CancelString)
     {
         m_Result = GenericMessageBoxResult.Cancel;
     }
 }