protected void btn_modificar_Click(object sender, EventArgs e) { try { this.CFactura = new Clasificacion_Factura(); this.CFactura.Id_detalle = int.Parse(id); this.CFactura.Nombre_clasificacion = this.txt_nombre_detalle.Text; this.CFactura.Descripcion_clasificacion = this.txt_descripcion_detalle.Text; this.CFactura.Estado_detalle = dpt_estado.SelectedValue; this.CFactura.Opc = 2; this.CFacturaHelper = new Clasificacion_Factura_Helper(CFactura); this.CFacturaHelper.Modificar_detalle_factura(); ScriptManager.RegisterStartupScript(this, typeof(Page), "mmensajeDeconfirmacion", "mensajeDeconfirmacion('" + "" + "');", true); } catch (Exception) { ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true); } }
public void buscadetalle() { try { this.detalle = new Clasificacion_Factura(); this.detalle.Opc = 4; this.detalle.Id_detalle = id_detalle; this.detalleHelper = new Clasificacion_Factura_Helper(detalle); this.datos = new DataTable(); this.datos = this.detalleHelper.Buscar_detalle(); if (datos.Rows.Count >= 0) { DataRow fila = datos.Rows[0]; nombre_detalle = fila["nombre_detalle"].ToString(); } } catch (Exception) { ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true); } }
protected void Btn_redirije_Click(object sender, EventArgs e) { try { this.CFactura = new Clasificacion_Factura(); this.CFactura.Opc = 1; this.CFactura.Nombre_clasificacion = this.txt_nombre_detalle.Text; this.CFactura.Descripcion_clasificacion = this.txt_descripcion_detalle.Text; this.CFactura.Estado_detalle = "Activo"; this.CFacturaHelper = new Clasificacion_Factura_Helper(CFactura); this.CFacturaHelper.Agrergar_Clasificacion_factura(); this.txt_nombre_detalle.Text = null; this.txt_descripcion_detalle.Text = null; ScriptManager.RegisterStartupScript(this, typeof(Page), "mmensajeDeconfirmacion", "mensajeDeconfirmacion('" + "" + "');", true); Response.Redirect("Consultar_detalle_factura.aspx"); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true); } }