Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using DAO;
- using ENTIDADES;
- namespace AppWeb
- {
- public partial class WebForm3 : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- DAOProducto p = new DAOProducto();
- eProducto epro = new eProducto();
- epro.Nombre = TextBox3.Text;
- epro.Precio = Convert.ToDecimal(TextBox4.Text);
- epro.IdCategoria = Convert.ToInt32(DropDownList2.SelectedValue);
- bool exito = p.Grabar(epro);
- if (exito)
- {
- GridView1.DataBind();
- TextBox3.Text = "";
- TextBox4.Text = "";
- }
- else
- {
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment