Beispiel #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (_ViewModel.IsValid())
     {
         CruceroDAO.Add(_ViewModel.MapToDomainObject());
         _OnAddSuccess(_ViewModel);
         this.Close();
     }
     else
     {
         MessageBox.Show(_ViewModel.ErrorMessage, "Datos Incorrectos");
     }
 }
Beispiel #2
0
 private void btnCrucerEdit_Click(object sender, EventArgs e)
 {
     if (_ViewModel.IsValid())
     {
         _ViewModel.Edit();
         _OnEditSuccess(_ViewModel);
         this.Close();
     }
     else
     {
         MessageBox.Show(_ViewModel.ErrorMessage, "Datos Incorrectos");
     }
 }