} //pro private void FillprofileGrid() { try { ProfileNamesDataTable = new DataTable(); DataSet ProfileNameDataSet = new DataSet(); ProfileNamesDataTable = VSWebBL.SecurityBL.ProfilesNamesBL.Ins.GetAllData(); if (ProfileNamesDataTable.Rows.Count > 0) { DataTable dtcopy = ProfileNamesDataTable.Copy(); dtcopy.PrimaryKey = new DataColumn[] { dtcopy.Columns["ID"] }; Session["ProfileName"] = dtcopy; ProfileGridView.DataSource = ProfileNamesDataTable; ProfileGridView.DataBind(); } else { ProfileGridView.DataSource = ProfileNamesDataTable; ProfileGridView.DataBind(); Session["ProfileName"] = ProfileNamesDataTable; } } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } finally { } } //profile name
} //profile name private void FillprofileGridfromSession() { try { ProfileNamesDataTable = new DataTable(); if (Session["ProfileName"] != "" && Session["ProfileName"] != null) { ProfileNamesDataTable = (DataTable)Session["ProfileName"]; } if (ProfileNamesDataTable.Rows.Count > 0) { ProfileGridView.DataSource = ProfileNamesDataTable; ProfileGridView.DataBind(); } } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } finally { } } //profile name
private void BindData() { ProfileGridView.DataSource = profiler; ProfileGridView.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { ProfileGridView.DataSource = MydatabaseAddress.GetData(); ProfileGridView.DataBind(); }