コード例 #1
0
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        DataTable dt = (DataTable)Session["carrito"];

        DetalleBL tabla = new DetalleBL((DataTable)Session["carrito"]);

        DataRow dr = dt.Rows[e.RowIndex];

        dt.Rows.Remove(dr);

        GridView1.EditIndex = -1;
        mygridview();
        lblTotal.Text = tabla.Totaliza().ToString();
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            DetalleBL tabla =new DetalleBL((DataTable)Session["carrito"]);

            GridView1.DataSource = tabla.getregistro;
            GridView1.DataBind();

            lblTotal.Text = tabla.Totaliza().ToString();
        }
    }