Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RedirectUtil.RedirectUnauthenticatedUserToLoginPage();
            RedirectUtil.RedirectNonAdminUserToHomePage();

            BreadCrumbUtil.DataBind(Page, new List <BreadCrumb>()
            {
                new BreadCrumb(NavUtil.GetHomePageUrl(), "Home"),
                new BreadCrumb(NavUtil.GetDivisionsPageUrl(), "Divisions"),
                new BreadCrumb(NavUtil.GetUpdateDivisionPageUrl(GetDivisionId()), "Update Division", IsActive: true),
            });

            labelPageTitle.Text       = "Update the Division";
            labelPageDescription.Text = "Use the form below to update the division.";

            divisionForm.GetSubmitButton().Click += new EventHandler(btnUpdateDivision_Click);
            divisionForm.GetCancelButton().Click += new EventHandler(btnCancel_Click);
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RedirectUtil.RedirectUnauthenticatedUserToLoginPage();
            RedirectUtil.RedirectNonAdminUserToHomePage();

            BreadCrumbUtil.DataBind(Page, new List <BreadCrumb>()
            {
                new BreadCrumb(NavUtil.GetHomePageUrl(), "Home"),
                new BreadCrumb(NavUtil.GetDivisionsPageUrl(), "Divisions", IsActive: true),
            });

            var items = new List <HyperlinkListPanelItem>();

            var divisionService = ServiceFactory.DivisionService;

            foreach (var division in divisionService.GetAll())
            {
                items.Add(new HyperlinkListPanelItem(URL: NavUtil.GetUpdateDivisionPageUrl(division.Id), Heading: division.Name, Text: ""));
            }

            HyperlinkListPanelRenderer.Render(divisionsList, new HyperlinkListPanelConfig("Talent Divisions", items, ButtonAddDivisionClick));
        }