private void ViewData() { try { CustMan.Customer CustomerObj = new CustMan.Customer(); CustomerObj.CustomerId = Int32.Parse(hdnCustomerId.Value.Trim() == String.Empty ? "0" : hdnCustomerId.Value.Trim()); if (CustomerObj.CustomerId > 0) { CustomerObj.CompanyId = Master.CurrentCompany.CompanyId; CustomerObj = CustomerObj.Select(); if (CustomerObj.IsGroupCustomer.HasValue && CustomerObj.IsGroupCustomer == true) { LoadGroupCustomers(CustomerObj); } else { LoadIndividualCustomers(CustomerObj); } } else { CustMan.Customer CustomerObj1 = new CustMan.Customer(); dsData = CustomerObj1.SelectGroupByGroupId(0); gvGroupMembers.DataSource = dsData; gvGroupMembers.DataBind(); dsData.Tables[0].PrimaryKey = new DataColumn[] { dsData.Tables[0].Columns["CustomerId"] }; Session[Constants.SESSION_GROUPCUSTOMERS] = dsData; } } catch (System.Exception) { } }