private void BindCustomerFIAlertGrid() { DataTable dtCustomerFIAlerts = new DataTable(); DataRow drFIAlerts; //int count; try { dsCustomerFIAlerts = alertsBo.GetCustomerFIAlerts(customerVo.CustomerId); if (dsCustomerFIAlerts.Tables[0].Rows.Count > 0) { lblMessage.Visible = false; dtCustomerFIAlerts.Columns.Add("FINPId"); dtCustomerFIAlerts.Columns.Add("AccountId"); dtCustomerFIAlerts.Columns.Add("FIInvestment"); dtCustomerFIAlerts.Columns.Add("ReccurringDepositReminder"); dtCustomerFIAlerts.Columns.Add("FDMaturityReminder"); foreach (DataRow dr in dsCustomerFIAlerts.Tables[0].Rows) { drFIAlerts = dtCustomerFIAlerts.NewRow(); drFIAlerts[0] = dr["FIALT_FINPId"].ToString(); drFIAlerts[1] = dr["FIALT_AccountId"].ToString(); drFIAlerts[2] = dr["FIALT_FIInvestment"].ToString().Trim(); if (dr["FIALT_RDReminder"].ToString() != null) { drFIAlerts[3] = dr["FIALT_RDReminder"].ToString(); } if (dr["FIALT_FDMaturityReminder"].ToString() != null) { drFIAlerts[4] = dr["FIALT_FDMaturityReminder"].ToString(); } dtCustomerFIAlerts.Rows.Add(drFIAlerts); } gvFIAlerts.DataSource = dtCustomerFIAlerts; gvFIAlerts.DataBind(); gvFIAlerts.Visible = true; //this.GetPageCount(); } else { lblMessage.Visible = true; lblDisclaimer.Visible = false; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerFIAlert.ascx:BindCustomerFIAlertGrid()"); object[] objects = new object[0]; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }