private void BtnSalvar_Click_1(object sender, EventArgs e) { if (_OpcionSQL == "Insertar" || _OpcionSQL == "Modificar") { int rdbgrado = 0; Control[] array = { TxtCodigo, TxtDescripcion, cmbitbis }; if (!Funciones_Duke4.Funciones.Fun_Validar_Campos_Vacios(array)) { string cmd = string.Format("exec Spr_cxc_concepto '{0}','{1}','{2}','{3}','{4}','{5}'", _OpcionSQL, Properties.Settings.Default.idsesion, 1, Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(TxtCodigo.Text), TxtDescripcion.Text, cmbitbis.SelectedValue); FuncionesSQL.Fun_Sql_Ejecutar(cmd); Funciones_Duke4.Funciones.Fun_Limpiar_Formulario(MainPanel); if (_OpcionSQL == "Insertar") { Crear(); } else { Modificar(); } LblAlerta.Text = string.Empty; } else { LblAlerta.Text = Mensajes.Stg_Campos_EnBlanco; } } else if (_OpcionSQL == "Activar") { if (!Funciones_Duke4.Funciones.Fun_Validar_Campos_Vacios(new Control[] { TxtCodigo })) { FuncionesSQL.Fun_SQL_Activar_Mant(this.Name, TxtCodigo.Text.Trim(), "cxcdbfconcepto", "idconcepto"); Funciones_Duke4.Funciones.Fun_Limpiar_Formulario(MainPanel); LblAlerta.Text = string.Empty; EnableButtons(true); } else { LblAlerta.Text = Mensajes.Stg_Campos_EnBlanco; } } else if (_OpcionSQL == "Desactivar") { if (!Funciones_Duke4.Funciones.Fun_Validar_Campos_Vacios(new Control[] { TxtCodigo })) { FuncionesSQL.Fun_SQL_Desactivar_Mant(this.Name, TxtCodigo.Text.Trim(), "cxcdbfconcepto", "idconcepto"); Funciones_Duke4.Funciones.Fun_Limpiar_Formulario(MainPanel); LblAlerta.Text = string.Empty; EnableButtons(true); } else { LblAlerta.Text = Mensajes.Stg_Campos_EnBlanco; } } }