private void GetProductLocation() { CustomProfile profile = CustomProfile.GetProfile(); DataSet ds; DataTable dt; iProductMasterClient productclient = new iProductMasterClient(); ds = productclient.GetProdLocByPLID(long.Parse(hdnprodlocID.Value), profile.DBConnection._constr); dt = ds.Tables[0]; if (dt.Rows.Count > 0) { txtlocation.Text = dt.Rows[0]["Location"].ToString(); ddlType.SelectedIndex = ddlType.Items.IndexOf(ddlType.Items.FindByText(dt.Rows[0]["LocType"].ToString())); txtminReordrQty.Text = dt.Rows[0]["MinOrderQty"].ToString(); txtMaxQty.Text = dt.Rows[0]["MaxOrderQty"].ToString(); txtOPeningBalance.Text = dt.Rows[0]["OpeningStock"].ToString(); hdnskuid.Value = dt.Rows[0]["ProdId"].ToString(); hdnLocationSearchID.Value = dt.Rows[0]["LocationId"].ToString(); } }