Example #1
0
 private void fillservertypegridview()
 {
     try
     {
         DataTable servertypedatatable = new DataTable();
         servertypedatatable = VSWebBL.SecurityBL.ServerTypesBL.Ins.GetAllData();
         if (servertypedatatable.Rows.Count > 0)
         {
             servertypedatatable.PrimaryKey = new DataColumn[] { servertypedatatable.Columns["ID"] };
         }
         Session["servertypes"]         = servertypedatatable;
         ServerTypesGridView.DataSource = servertypedatatable;
         ServerTypesGridView.DataBind();
     }
     catch (Exception ex)
     {
         Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
         throw ex;
     }
 }
Example #2
0
 private void fillservertypegridviewbysession()
 {
     try
     {
         DataTable fillserverstype = new DataTable();
         if (Session["servertypes"] != "" && Session["servertypes"] != null)
         {
             fillserverstype = (DataTable)Session["servertypes"];
         }
         if (fillserverstype.Rows.Count > 0)
         {
             ServerTypesGridView.DataSource = fillserverstype;
             ServerTypesGridView.DataBind();
         }
     }
     catch (Exception ex)
     {
         Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
         throw ex;
     }
 }