Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lblUserName.Text = Session["name"].ToString();

            User user = (User)Session["newLogin"];

            lbluserID.Text = user.UserID.ToString();


            string policyId = "DB676D6E-5CF5-42CA-850E-57ACF020865C";

            var ace = new AccessControl();
            var ap  = ace.GetAccessPolicy(user.UserID, policyId);

            btnCancel.Visible = false;
            btnSubmit.Visible = false;

            Process.TrainingController listTraining = new Process.TrainingController();

            GridView1.DataSource =
                listTraining.ListTraining(0);

            GridView1.DataBind();

            DateTime time = DateTime.Now;

            lblSubmitDate.Text = Convert.ToString(time);
        }
Пример #2
0
        public AccessPolicy GetUserPermission(long userID, string policyId)
        {
            var ace = new AccessControl();
            var ap  = ace.GetAccessPolicy(userID, policyId);

            return(ap);
        }