Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var schoolId = int.Parse(Request.Cookies["SmacCookie"]["SchoolId"]);
            var userId   = int.Parse(Request.Cookies["SmacCookie"]["UserId"]);

            if (!IsPostBack)
            {
                var years = SchoolYearEntity.GetSchoolYears(schoolId);

                this.userRole.Value = Database.Helpers.GetUserRole(userId.ToString()).ToString().ToLower();

                this.yearList.Items.Add(new ListItem("-----------------------------", "-"));

                foreach (var year in years)
                {
                    this.yearList.Items.Add(new ListItem(year.Year, year.SchoolYearId.ToString()));
                }
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var schoolId = int.Parse(Request.Cookies["SmacCookie"]["SchoolId"]);
            var userId   = Request.Cookies["SmacCookie"]["UserId"];

            var years = SchoolYearEntity.GetSchoolYears(schoolId);

            //this.periodList.Items.Add("-----------------------------");

            //foreach (var mp in periods)
            //{
            //    this.periodList.Items.Add(new ListItem(mp.FullYear ? "All Year" : mp.Period, mp.MarkingPeriodId.ToString()));
            //}


            this.yearList.Items.Add(new ListItem("-----------------------------", "-"));

            foreach (var year in years)
            {
                this.yearList.Items.Add(new ListItem(year.Year, year.SchoolYearId.ToString()));
            }
        }