private void BindCustomerINAlertGrid() { DataTable dtCustomerINAlerts = new DataTable(); DataRow drINAlerts; //int count; try { dsCustomerINAlerts = alertsBo.GetCustomerInsuranceAlerts(customerVo.CustomerId); if (dsCustomerINAlerts.Tables[0].Rows.Count > 0) { lblMessage.Visible = false; dtCustomerINAlerts.Columns.Add("INNPId"); dtCustomerINAlerts.Columns.Add("AccountId"); dtCustomerINAlerts.Columns.Add("InsurancePolicy"); dtCustomerINAlerts.Columns.Add("PremiumPaymentReminder"); foreach (DataRow dr in dsCustomerINAlerts.Tables[0].Rows) { drINAlerts = dtCustomerINAlerts.NewRow(); drINAlerts[0] = dr["INALT_INNPId"].ToString(); drINAlerts[1] = dr["INALT_AccountId"].ToString(); drINAlerts[2] = dr["INALT_InsurancePolicy"].ToString().Trim(); if (dr["INALT_PremiumPaymentReminder"].ToString() != null) { drINAlerts[3] = dr["INALT_PremiumPaymentReminder"].ToString(); } dtCustomerINAlerts.Rows.Add(drINAlerts); } gvINAlerts.DataSource = dtCustomerINAlerts; gvINAlerts.DataBind(); gvINAlerts.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", "CustomerInsuranceAlert.ascx:BindCustomerINAlertGrid()"); object[] objects = new object[0]; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }