示例#1
0
 private void btnAgregar_Click(object sender, EventArgs e)
 {
     if (!Validar())
     {
         CategoriaIngreso   fuente          = CategoriaIngreso_ControlAClase();
         CategoriaIngresoDB fuenteIngresoDB = new CategoriaIngresoDB();
         if (fuenteIngresoDB.Agregar_Modificar(fuente, ClinicaPro.General.accion.Agregar) != IdVacia)
         {
             Limpiar();
         }
     }
 }
示例#2
0
 private void btnActualizar_Click(object sender, EventArgs e)
 {
     if (!Validar())
     {
         if (dgFuente.SelectedRows.Count == 1)
         {
             this.IdCategoriaIngreso = (byte)dgFuente.CurrentRow.Cells[comboNombreIDs.CategoriaIngreso].Value;
         }
         CategoriaIngreso fuente = CategoriaIngreso_ControlAClase();
         fuente.IdCategoriaIngreso = this.IdCategoriaIngreso;
         CategoriaIngresoDB fuenteIngresoDB = new CategoriaIngresoDB();
         if (fuenteIngresoDB.Agregar_Modificar(fuente, ClinicaPro.General.accion.Modificar) != IdVacia)
         {
             Limpiar();
             MensajeDeActulizacion();
         }
         else
         {
             MessageBox.Show(Mensajes.No_Se_Actualizo + "\n" + Mensajes.Refresh, Mensajes.AlgoPaso, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }