protected void B_AgregarProducto_Click(object sender, EventArgs e) { ValidacionesCRUDProducto val = new ValidacionesCRUDProducto(); val.AgregarProducto(TB_ReferenciaProducto.Text, TB_Precio.Text, TB_Cantidad.Text, DL_Tallas.SelectedValue); Response.Write("<script>window.alert('" + val.devuelvemensaje() + "';</script>"); GV_Productos.DataBind(); this.reiniciar(); }
protected void B_EditarProducto_Click(object sender, EventArgs e) { ValidacionesCRUDProducto val = new ValidacionesCRUDProducto(); val.EditarProducto(TB_EditarReferencia.Text, TB_EditarPrecio.Text, TB_EditarCantidad.Text, DL_EditarTallas.SelectedValue, Convert.ToInt32(Session["idproducto"]), Convert.ToString(Session["compara"])); Response.Write("<script>window.alert('" + val.devuelvemensaje() + "';</script>"); GV_Productos.DataBind(); TB_EditarReferencia.Text = ""; TB_EditarCantidad.Text = ""; TB_EditarPrecio.Text = ""; DL_EditarTallas.SelectedIndex = 0; B_EditarProducto.Enabled = false; B_Cancelar.Enabled = false; Session["compara"] = null; }