private void FillMenusGridfromSession() { try { MenusDataTable = new DataTable(); if (Session["Menus"] != null && Session["Menus"] != "") { MenusDataTable = (DataTable)Session["Menus"];//VSWebBL.ConfiguratorBL.DominoPropertiesBL.Ins.GetAllData(); } if (MenusDataTable.Rows.Count > 0) { MenusGridView.DataSource = MenusDataTable; MenusGridView.DataBind(); } } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } finally { } }
private void FillMenusGrid() { try { MenusDataTable = new DataTable(); DataSet MenusDataSet = new DataSet(); MenusDataTable = VSWebBL.SecurityBL.MenusBL.Ins.GetAllData(); if (MenusDataTable.Rows.Count > 0) { //DataTable dtcopy = MenusDataTable.Copy(); //dtcopy.PrimaryKey = new DataColumn[] { dtcopy.Columns["ID"] }; MenusDataTable.PrimaryKey = new DataColumn[] { MenusDataTable.Columns["ID"] }; } Session["Menus"] = MenusDataTable; MenusGridView.DataSource = MenusDataTable; MenusGridView.DataBind(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } finally { } }