private void BindFolioGridView() { try { customerVo = (CustomerVo)Session["CustomerVo"]; FolioList = CustomerTransactionBo.GetCustomerEQAccount(portfolioId); // lblTotalRows.Text = hdnRecordCount.Value = count.ToString(); if (FolioList == null) { lblMessage.Visible = true; lblCurrentPage.Visible = false; lblTotalRows.Visible = false; DivPager.Visible = false; gvEQAcc.DataSource = null; gvEQAcc.DataBind(); } else { lblMessage.Visible = false; lblTotalRows.Visible = true; lblCurrentPage.Visible = true; DivPager.Visible = true; DataTable dtEQAcc = new DataTable(); dtEQAcc.Columns.Add("AccountId"); dtEQAcc.Columns.Add("Broker Name"); dtEQAcc.Columns.Add("Trade No"); dtEQAcc.Columns.Add("Broker Del Percent"); dtEQAcc.Columns.Add("Broker Spec Percent"); dtEQAcc.Columns.Add("Other Charges"); dtEQAcc.Columns.Add("A/C Opening Date"); DataRow drEQAcc; for (int i = 0; i < FolioList.Count; i++) { drEQAcc = dtEQAcc.NewRow(); FolioVo = new CustomerAccountsVo(); FolioVo = FolioList[i]; drEQAcc["AccountId"] = FolioVo.AccountId.ToString(); drEQAcc["Broker Name"] = FolioVo.BrokerName.ToString(); drEQAcc["Trade No"] = FolioVo.TradeNum.ToString(); drEQAcc["Broker Del Percent"] = FolioVo.BrokerageDeliveryPercentage.ToString(); drEQAcc["Broker Spec Percent"] = FolioVo.BrokerageSpeculativePercentage.ToString(); drEQAcc["Other Charges"] = FolioVo.OtherCharges.ToString(); if (FolioVo.AccountOpeningDate != DateTime.MinValue) { drEQAcc["A/C Opening Date"] = FolioVo.AccountOpeningDate.ToShortDateString(); } else { drEQAcc["A/C Opening Date"] = string.Empty; } dtEQAcc.Rows.Add(drEQAcc); } gvEQAcc.DataSource = dtEQAcc; gvEQAcc.DataBind(); } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerMFFolioView.ascx:BindFolioGridView()"); object[] objects = new object[2]; objects[0] = customerVo; objects[1] = portfolioId; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }