Exemplo n.º 1
0
 public void populateGV()
 {
     localhostYuvalWebService.YuvalWebService product = new localhostYuvalWebService.YuvalWebService();
     DataSet ds = product.GetAllProducts();
     this.GridView1.DataSource = ds.Tables[0];
     this.GridView1.DataBind();
 }
Exemplo n.º 2
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();
    }