public void BindCycleCountProduct() { DataTable dt = new DataTable(); DataSet ds = new DataSet(); iCycleCountClient cycleclient = new iCycleCountClient(); CustomProfile profile = CustomProfile.GetProfile(); string Object = "Product"; string SessionID = Session.SessionID; try { //ds = company.GetCostCenterList(long.Parse(hndCompanyid.Value), profile.DBConnection._constr); ds = cycleclient.GetCycleCounttempdata(Object, profile.Personal.UserID, SessionID, profile.DBConnection._constr); dt = ds.Tables[0]; if (dt.Rows.Count > 0) { txtgridvalues.Text = "Product"; grdcyclecount.DataSource = ds.Tables[0]; grdcyclecount.DataBind(); } else { grdcyclecount.DataSource = null; grdcyclecount.DataBind(); } } catch { } finally { cycleclient.Close(); } }