示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (CustomPage.Login.RoleID != 2)
            {
                Response.Redirect("Display.aspx");
            }

            EditControl ec = LoadControl("Controls/EditControl.ascx") as EditControl;

            foreach (Person p in repo.GetAllPeople())
            {
                var editControl = (EditControl)Page.LoadControl("Controls/EditControl.ascx");
                editControl.InitForm(p);
                content.Controls.Add(editControl);
            }
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            EditControl ec = LoadControl("Controls/EditControl.ascx") as EditControl;

            editCtrl.InitForm(repo.GetPerson(int.Parse(Request.Cookies["userToEdit"].Value)));
        }