protected void MainClientGridBind() { iCompanySetupClient client = new iCompanySetupClient(); try { CustomProfile profile = CustomProfile.GetProfile(); List <V_WMS_GetClientDetails> clintlst = new List <V_WMS_GetClientDetails>(); clintlst = client.GetClientList(profile.DBConnection._constr).ToList(); clintlst = clintlst.Where(c => c.CompanyID == profile.Personal.CompanyID).ToList(); GvCustomer.DataSource = clintlst; GvCustomer.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Client Master", "MainClientGridBind"); } finally { client.Close(); } }