示例#1
0
        }                                     //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
        }        //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();
 }