コード例 #1
0
ファイル: ManageProfiles.aspx.cs プロジェクト: ImranVS/SVNGIT
        }                                     //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
コード例 #2
0
ファイル: ManageProfiles.aspx.cs プロジェクト: ImranVS/SVNGIT
        }        //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
コード例 #3
0
 private void BindData()
 {
     ProfileGridView.DataSource = profiler;
     ProfileGridView.DataBind();
 }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ProfileGridView.DataSource = MydatabaseAddress.GetData();
     ProfileGridView.DataBind();
 }