protected void btn_modificar_Click(object sender, EventArgs e) { try { this.CCostos = new centro_de_costos(); this.CCostos.Numero_centro_costos = this.txt_centro_de_costos.Text; this.CCostos.Descripcion = this.txt_descripcion.Text; this.CCostos.Estado = this.dpt_estado.SelectedValue; this.CCostos.Opc = 2; this.CCHELPER = new Centro_de_costos_Helper(CCostos); this.CCHELPER.Modificar_centro_costos(); ScriptManager.RegisterStartupScript(this, typeof(Page), "mmensajeDeconfirmacion", "mensajeDeconfirmacion('" + "" + "');", true); } catch (Exception) { ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true); } }
protected void btn_Pago_Cola_Click(object sender, EventArgs e) { try { this.CCostos = new centro_de_costos(); this.CCostos.Opc = 1; this.CCostos.Numero_centro_costos = this.txt_centro_de_costos.Text; this.CCostos.Descripcion = this.txt_descripcion.Text; this.CCostos.Estado = "Activo"; this.CCHELPER = new Centro_de_costos_Helper(CCostos); this.CCHELPER.Agrergar_centro_costos(); this.txt_centro_de_costos.Text = null; this.txt_descripcion.Text = null; ScriptManager.RegisterStartupScript(this, typeof(Page), "mmensajeDeconfirmacion", "mensajeDeconfirmacion('" + "" + "');", true); Response.Redirect("Consultar_centro_costos.aspx"); } catch (Exception) { ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true); } }