data updated twice in web service
[WebMethod]
public string updateMQuantity Sales(string ProductCode, int Quantity)
{
con.Open();
cmd=new SqlCommand ("update tblInventory set Quantity = (Quantity + @Quantity) where ProductCode = @ProductCode",c on);
cmd.Parameters. AddWithValue("@ ProductCode", ProductCode);
cmd.Parameters. AddWithValue("@ Quantity",Quant ity);
sda = new SqlDataAdapter( cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
return ds.GetXml();
}
[WebMethod]
public string updateMQuantity Sales(string ProductCode, int Quantity)
{
con.Open();
cmd=new SqlCommand ("update tblInventory set Quantity = (Quantity + @Quantity) where ProductCode = @ProductCode",c on);
cmd.Parameters. AddWithValue("@ ProductCode", ProductCode);
cmd.Parameters. AddWithValue("@ Quantity",Quant ity);
sda = new SqlDataAdapter( cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
return ds.GetXml();
}