Exemplo n.º 1
0
    protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        localhostYuvalWebService.YuvalWebService service = new localhostYuvalWebService.YuvalWebService();
        localhostYuvalWebService.ProductInBag Product = new localhostYuvalWebService.ProductInBag();
        GridViewRow row = GridView1.Rows[e.RowIndex];

        Product.ProdID = int.Parse(row.Cells[0].Text);
        Product.Price = decimal.Parse(((TextBox)row.Cells[2].Controls[0]).Text);

        service.updateProductPrice(Product);

        GridView1.EditIndex = -1;
        populateGV();
    }