public void fillGrid() { DataTable AlertsTable = new DataTable(); AlertsTable = VSWebBL.ConfiguratorBL.ELSBL.Ins.GetELSNames(); try { Session["ELSNameTable"] = AlertsTable; ELSDefGridView.DataSource = AlertsTable; ELSDefGridView.DataBind(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw; } }
public void fillGridfromSession() { DataTable AlertsTable = new DataTable(); if (Session["ELSNameTable"] != "" && Session["ELSNameTable"] != null) { AlertsTable = (DataTable)Session["ELSNameTable"]; } try { ELSDefGridView.DataSource = AlertsTable; ELSDefGridView.DataBind(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw; } }