Example #1
0
 private void btnAgregar_Click(object sender, EventArgs e)
 {
     if (Validar())
     {
         PlanLogic pl = new PlanLogic();
         Plan      p  = new Plan();
         p.IDEspecialidad = (int)cmbEspecialidad.SelectedValue;
         p.Descripcion    = txtDescripcion.Text;
         pl.AddPlan(p);
         Notificar("Plan creado satisfactoriamente", MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.Dispose();
     }
     else
     {
         Notificar("Los campos deben estar completos", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }