private void SaveExecute()
        {
            try
            {
                Account.MarrigeStatusID = MarrigeType.MarrigeStatusID;
                if (IsManager)
                {
                    string sMessageBoxText = "Are you sure you want to register as a manager?";
                    string sCaption        = "";

                    MessageBoxButton btnMessageBox = MessageBoxButton.YesNoCancel;
                    MessageBoxImage  icnMessageBox = MessageBoxImage.Warning;

                    MessageBoxResult rsltMessageBox = MessageBox.Show(sMessageBoxText, sCaption, btnMessageBox, icnMessageBox);

                    switch (rsltMessageBox)
                    {
                    case MessageBoxResult.Yes:
                        ManagerCode managerCode = new ManagerCode(Account);
                        managerCode.ShowDialog();
                        register.Close();
                        break;

                    case MessageBoxResult.No:
                        /* ... */
                        break;

                    case MessageBoxResult.Cancel:
                        /* ... */
                        break;
                    }
                }
                else
                {
                    AddEmployee addEmployee = new AddEmployee(Account);
                    addEmployee.ShowDialog();
                    register.Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
 public ManagerCodeViewModel(ManagerCode managerCodeOpen, tblAccount account)
 {
     managerCode   = managerCodeOpen;
     accountToView = account;
 }
 public ManagerCodeViewModel(ManagerCode managerCodeOpen)
 {
     managerCode = managerCodeOpen;
 }