private void BindCustomerEQAlertGrid() { DataTable dtCustomerEQAlerts = new DataTable(); DataRow drEQAlerts; //int count; try { dsCustomerEQAlerts = alertsBo.GetCustomerEQAlerts(customerVo.CustomerId); if (dsCustomerEQAlerts.Tables[0].Rows.Count > 0) { lblMessage.Visible = false; dtCustomerEQAlerts.Columns.Add("ScripId"); dtCustomerEQAlerts.Columns.Add("AccountId"); dtCustomerEQAlerts.Columns.Add("Scrip"); dtCustomerEQAlerts.Columns.Add("AbsoluteStopLoss"); dtCustomerEQAlerts.Columns.Add("AbsoluteProfitBooking"); foreach (DataRow dr in dsCustomerEQAlerts.Tables[0].Rows) { drEQAlerts = dtCustomerEQAlerts.NewRow(); drEQAlerts[0] = dr["EQALT_ScripId"].ToString(); drEQAlerts[1] = dr["EQALT_AccountId"].ToString(); drEQAlerts[2] = dr["EQALT_ScripName"].ToString().Trim(); if (dr["EQALT_AbsoluteStopLoss"].ToString() != null) { drEQAlerts[3] = dr["EQALT_AbsoluteStopLoss"].ToString(); } if (dr["EQALT_AbsoluteProfitBooking"].ToString() != null) { drEQAlerts[4] = dr["EQALT_AbsoluteProfitBooking"].ToString(); } dtCustomerEQAlerts.Rows.Add(drEQAlerts); } gvEQAlerts.DataSource = dtCustomerEQAlerts; gvEQAlerts.DataBind(); gvEQAlerts.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", "CustomerEQAlerts.ascx:BindCustomerEQAlertGrid()"); object[] objects = new object[0]; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }