예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Person p = manager.GetPerson(Guid.Parse(Request.QueryString["Id"]));

            if (p.Email[0] != "*****@*****.**")
            {
                EditPersonControl epc = LoadControl("~/Models/Controls/EditPersonControl.ascx") as EditPersonControl;
                EditPerson.Controls.Add(epc);
                epc.DisplayPersonData(p);
            }
            else
            {
                BtnWrongPerson.CssClass = "h3 btn-link";
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            List <Person> persons = manager.GetPersons().ToList();

            foreach (var p in persons)
            {
                if (p.Email[0] != "*****@*****.**")
                {
                    EditPersonControl epc = LoadControl("~/Models/Controls/EditPersonControl.ascx") as EditPersonControl;
                    EditContent.Controls.Add(epc);
                    epc.DisplayPersonData(p);
                }
            }

            if (persons.Count == 1)
            {
                BtlNoPersons.CssClass = "h3 btn-link";
            }
        }