private void FillLicenseGridforExpirys(int Expiryvalue) { try { DataTable LicenseDataTable = new DataTable(); LicenseDataTable = BL.LicenseKeyBL.Ins.GetExpirysData(Expiryvalue); Session["License"] = LicenseDataTable; LicenseGridView.DataSource = LicenseDataTable; LicenseGridView.DataBind(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } finally { } }
private void FillLicenseGridforThirtydaysExpiry() { try { DataTable LicenseDataTable = new DataTable(); LicenseDataTable = BL.LicenseKeyBL.Ins.GetThirtydaysExpiry(Convert.ToString(Session["UserID"])); Session["License"] = LicenseDataTable; LicenseGridView.DataSource = LicenseDataTable; LicenseGridView.DataBind(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } finally { } }
//protected void LicenseGridView_DataBinding(object sender, EventArgs e) //{ // if (Session["License"] != null) // { // // Assign the data source in grid_DataBinding // LicenseGridView.DataSource = Session["License"]; // } //} private void FillLicenseGridfromSession() { try { DataTable LicenseDataTable = new DataTable(); if ((Session["License"] != null) && (Session["License"] != "")) { LicenseDataTable = (DataTable)Session["License"]; if (LicenseDataTable.Rows.Count > 0) { LicenseGridView.DataSource = LicenseDataTable; LicenseGridView.DataBind(); } } } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } finally { } }