Beispiel #1
0
 private void btnSave_Click(object sender, RoutedEventArgs e)
 {
     if (data.Save() == true)
     {
         MessageBox.Show("Saved");
     }
 }
 private void btnSave_Click(object sender, RoutedEventArgs e)
 {
     if (data.Save() == true)
     {
         MessageBox.Show(Message.PL.Saved_Alert);
         BLL.UserType.Init();
         BLL.UserAccount.Init();
         IsForcedClose = true;
         Close();
     }
     else
     {
         MessageBox.Show(string.Join("\n", data.lstValidation.Select(x => x.Message).ToList()));
     }
 }
Beispiel #3
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            if (!BLL.UserAccount.AllowInsert(FormName))
            {
                MessageBox.Show(string.Format(Message.PL.DenyInsert, FormName));
            }
            else if (!BLL.UserAccount.AllowUpdate(FormName))
            {
                MessageBox.Show(string.Format(Message.PL.DenyUpdate, FormName));
            }

            else
            {
                if (data.Save() == true)
                {
                    MessageBox.Show(Message.PL.Saved_Alert);
                    App.frmHome.ShowWelcome();
                }
            }
        }