public void fillTemplateGridfromSession() { DataTable Templatetable = new DataTable(); try { if (Session["Eventtemplate"] != "" && Session["Eventtemplate"] != null) { Templatetable = Session["Eventtemplate"] as DataTable; } if (Templatetable.Rows.Count > 0) { Templatetable.PrimaryKey = new DataColumn[] { Templatetable.Columns["ID"] }; } AlertEventTEmplategrid.DataSource = Templatetable; AlertEventTEmplategrid.DataBind(); } catch (Exception ex) { //Log.Entry.Ins.Write(Server.MapPath("~/LogFiles/"), "VSPlusLog.txt", DateTime.Now.ToString() + " Error in Page: " + // Request.Url.AbsolutePath + ", Method: " + System.Reflection.MethodBase.GetCurrentMethod().Name + // ", Error: " + ex.ToString()); //6/27/2014 NS added for VSPLUS-634 Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); } }
private void FillAlertEventTEmplategrid() { try { DataTable dt = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetAlerteventnames(); Session["Eventtemplate"] = dt; AlertEventTEmplategrid.DataSource = dt; AlertEventTEmplategrid.DataBind(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } finally { } }