Beispiel #1
0
 private void btnGuardar_Click(object sender, EventArgs e)
 {
     try
     {
         if (dtFechaRenuncia.Value.Date > DateTime.Today)
         {
             throw new Exception("La fecha no es válida - La fecha de renuncia no puede ser futura");
         }
         if (tbMotivoRenuncia.Text == "")
         {
             throw new Exception("Se debe ingresar el motivo de renuncia");
         }
         cSocio.MotivoRenuncia = tbMotivoRenuncia.Text;
         cSocio.FechaRenuncia  = dtFechaRenuncia.Value.Date;
         cFachada.updateSocio(cSocio);
         this.Close();
     }
     catch (Exception mExcepcion)
     {
         MessageBox.Show(mExcepcion.Message, "Atención",
                         MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         cLogger.Debug(mExcepcion.Message);
     }
 }