private void btnAceptar_Click(object sender, EventArgs e) { if (txt_NroDoc.Text == "") { Mensaje("Debe ingresar un número de documento"); return; } if (txt_Apellido.Text == "") { Mensaje("Debe ingresar un apellido"); return; } if (txt_Nombre.Text == "") { Mensaje("Debe ingresar un nombre"); return; } if (txtCodDocente.Text == "") { fun.GuardarNuevoGenerico(this, "Docente"); } else { // if (txt_Ruta.Text != "") // txt_Ruta.Text = txt_Ruta.Text.Replace("\\", "\\\\"); fun.ModificarGenerico(this, "Docente", "IdDocente", txtCodDocente.Text); } Mensaje("Datos grabados correctamente"); fun.LimpiarGenerico(this); Grupo.Enabled = false; Botonera(1); }
private void btnEliminar_Click(object sender, EventArgs e) { string msj = "Confirma eliminar el artículo "; var result = MessageBox.Show(msj, "Información", MessageBoxButtons.YesNo, MessageBoxIcon.Question); // If the no button was pressed ... if (result == DialogResult.No) { return; } try { cFunciones fun = new cFunciones(); fun.EliminarGenerico("Articulo", "CodArticulo", txtCodigo.Text); fun.LimpiarGenerico(this); Botonera(1); MessageBox.Show("Datos borrados correctamente"); } catch (Exception) { MessageBox.Show("No se puede eliminar el producto, debe tener asociado ventas"); return; } }
private void btnCancelar_Click(object sender, EventArgs e) { txtCodigo.Text = ""; txt_Nombre.Text = ""; Botonera(1); Grupo.Enabled = false; fun.LimpiarGenerico(this); Botonera(1); }
private void btnAceptar_Click(object sender, EventArgs e) { if (txt_Nombre.Text == "") { Mensaje("Debe ingresar una descripción para continuar"); return; } if (txtCodigo.Text == "") { fun.GuardarNuevoGenerico(this, "Marca"); } else { // if (txt_Ruta.Text != "") // txt_Ruta.Text = txt_Ruta.Text.Replace("\\", "\\\\"); fun.ModificarGenerico(this, "Marca", "CodMarca", txtCodigo.Text); } MessageBox.Show("Datos grabados correctamente"); fun.LimpiarGenerico(this); Botonera(1); }
private void btnAceptar_Click(object sender, EventArgs e) { if (txtCodigo.Text == "") { fun.GuardarNuevoGenerico(this, "Vendedor"); } else { fun.ModificarGenerico(this, "Vendedor", "CodVendedor", txtCodigo.Text); } Mensaje("Datos grabados correctamente"); Botonera(1); fun.LimpiarGenerico(this); }
private void btnNuevo_Click(object sender, EventArgs e) { Botonera(2); Grupo.Enabled = true; fun.LimpiarGenerico(this); }
private void btnCancelar_Click(object sender, EventArgs e) { Botonera(1); Grupo.Enabled = false; fun.LimpiarGenerico(this); }