예제 #1
0
        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);
            }
        }
예제 #2
0
        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 { }
        }