private void btnEliminar_Click_1(object sender, EventArgs e) { string msj = "Confirma eliminar la marca "; var result = MessageBox.Show(msj, "Información", MessageBoxButtons.YesNo, MessageBoxIcon.Question); // If the no button was pressed ... if (result == DialogResult.No) { return; } Clases.cAuto cauto = new Clases.cAuto(); if (cauto.PuedeBorrar(Convert.ToInt32(txtCodAuto.Text))) { Clases.cFunciones fun = new Clases.cFunciones(); fun.EliminarGenerico("Auto", "CodAuto", txtCodAuto.Text); MessageBox.Show("El vehículo se ha eliminado de la base", Clases.cMensaje.Mensaje()); fun.LimpiarGenerico(this); txtCodAuto.Text = ""; Botonera(1); } else { MessageBox.Show("El vehículo no se puede eliminar, se perderían datos historicos.", Clases.cMensaje.Mensaje()); } }
private void btnEliminar_Click(object sender, EventArgs e) { string msj = "Confirma eliminar el registro "; var result = MessageBox.Show(msj, "Información", MessageBoxButtons.YesNo, MessageBoxIcon.Question); // If the no button was pressed ... if (result == DialogResult.No) { return; } cFunciones fun = new Clases.cFunciones(); try { fun.EliminarGenerico("Papeles", "CodPapel", txtCodigo.Text); } catch (Exception) { MessageBox.Show("No se puede eliminar el registro, tiene información asociada"); } fun.LimpiarGenerico(this); Botonera(1); }
private void btnCancelar_Click_1(object sender, EventArgs e) { Botonera(1); Clases.cFunciones fun = new Clases.cFunciones(); fun.LimpiarGenerico(this); txtCodAuto.Text = ""; }
private void btnAceptar_Click_1(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); if (Validar() == true) { //se usa por las dudas ingreso ya exista el deni //y no grabe repetido el documento UbicaAuto(); if (txtCodAuto.Text == "") { fun.GuardarNuevoGenerico(this, "Auto"); } else { fun.ModificarGenerico(this, "Auto", "CodAuto", txtCodAuto.Text); } MessageBox.Show("Datos grabados Correctamente", Clases.cMensaje.Mensaje()); Botonera(1); fun.LimpiarGenerico(this); txtCodAuto.Text = ""; Imagen.Image = null; if (cmbProvincia.Items.Count > 0) { cmbProvincia.SelectedIndex = 0; } } }
private void btnAceptar_Click(object sender, EventArgs e) { if (cmb_CodProvincia.SelectedIndex < 1) { MessageBox.Show("Debe seleccionar una provincia para continuar", Clases.cMensaje.Mensaje()); return; } if (txt_Nombre.Text == "") { MessageBox.Show("Debe ingresar un nombre para continuar", Clases.cMensaje.Mensaje()); return; } Clases.cFunciones fun = new Clases.cFunciones(); if (txtCodigo.Text == "") { fun.GuardarNuevoGenerico(this, "Ciudad"); } else { fun.ModificarGenerico(this, "Ciudad", "CodCiudad", txtCodigo.Text); } MessageBox.Show("Datos grabados Correctamente", Clases.cMensaje.Mensaje()); Botonera(1); fun.LimpiarGenerico(this); txtCodigo.Text = ""; Grupo.Enabled = false; }
private void btnNuevo_Click(object sender, EventArgs e) { Botonera(2); Clases.cFunciones fun = new Clases.cFunciones(); fun.LimpiarGenerico(this); txtCodigo.Text = ""; Grupo.Enabled = true; }
private void btnCancelar_Click(object sender, EventArgs e) { Botonera(1); Clases.cFunciones fun = new Clases.cFunciones(); fun.LimpiarGenerico(this); txtCodMarca.Text = ""; Grupo.Enabled = false; }
private void btnNuevo_Click_1(object sender, EventArgs e) { Botonera(2); Clases.cFunciones fun = new Clases.cFunciones(); fun.LimpiarGenerico(this); txtCodAuto.Text = ""; Grupo.Enabled = true; if (cmb_CodMarca.Items.Count > 0) { cmb_CodMarca.SelectedIndex = 1; } }
private void btnAceptar_Click(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); if (txtCodigo.Text == "") { fun.GuardarNuevoGenerico(this, "EntidadPrendaria"); } else { fun.ModificarGenerico(this, "EntidadPrendaria", "CodEntidad", txtCodigo.Text); } MessageBox.Show("Datos grabados Correctamente", Clases.cMensaje.Mensaje()); Botonera(1); fun.LimpiarGenerico(this); txtCodigo.Text = ""; }
private void btnAceptar_Click(object sender, EventArgs e) { if (txt_Descripcion.Text == "") { MessageBox.Show("Debe ingresar una descripción para continuar", Clases.cMensaje.Mensaje()); return; } Clases.cFunciones fun = new Clases.cFunciones(); if (txtCodigo.Text == "") { fun.GuardarNuevoGenerico(this, "CategoriaGastoRecepcion"); } else { fun.ModificarGenerico(this, "CategoriaGastoRecepcion", "Codigo", txtCodigo.Text); } MessageBox.Show("Datos grabados Correctamente", Clases.cMensaje.Mensaje()); Botonera(1); fun.LimpiarGenerico(this); txtCodigo.Text = ""; }
private void btnAceptar_Click(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); if (Validar() == true) { //se usa por las dudas ingreso ya exista el deni //y no grabe repetido el documento // UbicaCliente(); if (txtCodAuto.Text == "") { fun.GuardarNuevoGenerico(this, "Auto"); } else { fun.ModificarGenerico(this, "Cliente", "CodAuto", txtCodAuto.Text); } MessageBox.Show("Datos grabados Correctamente", Clases.cMensaje.Mensaje()); Botonera(1); fun.LimpiarGenerico(this); txtCodAuto.Text = ""; } }