protected void btnGuardar_Click(object sender, EventArgs e) { try { Sico.Entidades.SubCliente _subCliente = CargarEntidad(); var cuit = lblCuit.Text; if (EsEditar == 1) { bool Exito = ClienteNeg.EditarSubCliente(_subCliente, cuit); if (Exito == true) { ShowMessage("Se Edito exitosamente el Sub-Cliente ingresado.", "Éxito"); //LimpiarCampos(); } else { } } else { bool Exito = ClienteNeg.GuardarNuevoSubCliente(_subCliente, cuit); if (Exito == true) { ShowMessage("Se registro exitosamente el Sub-Cliente ingresado.", "Success"); //LimpiarCampos(); } else { } } } catch (Exception ex) { } }
private void button2_Click(object sender, EventArgs e) { try { Entidades.SubCliente _subCliente = CargarEntidad(); if (txtDni.Enabled == false) { bool Exito = ClienteNeg.EditarSubCliente(_subCliente, idEmpresa); if (Exito == true) { ProgressBar(); const string message2 = "El sub-cliente se edito exitosamente."; const string caption2 = "Éxito"; var result2 = MessageBox.Show(message2, caption2, MessageBoxButtons.OK, MessageBoxIcon.Asterisk); LimpiarCampos(); } else { } } else { bool Exito = ClienteNeg.GuardarNuevoSubCliente(_subCliente, idEmpresa); if (Exito == true) { ProgressBar(); const string message2 = "Se registro el sub-cliente exitosamente."; const string caption2 = "Éxito"; var result2 = MessageBox.Show(message2, caption2, MessageBoxButtons.OK, MessageBoxIcon.Asterisk); LimpiarCampos(); } else { } } } catch (Exception ex) { } }