Beispiel #1
0
        public void SelectRun(object sender, ListCommandEventArgs e)
        {
            CurrentRunID = e.ListItem.Value;

            BindStudents();
            Breadcrum3.Text = string.Format("{0} > {1}", CurrentCourseCode, CurrentRunID);

            ActiveForm = Form3;
        }
Beispiel #2
0
        public void SelectCourse(object sender, ListCommandEventArgs e)
        {
            CurrentCourseCode = e.ListItem.Value;

            BindRun();
            Breadcrum2.Text = string.Format("{0}", CurrentCourseCode);

            ActiveForm = Form2;
        }
Beispiel #3
0
        public void SelectStudent(object sender, ListCommandEventArgs e)
        {
            CurrentStudentName = e.ListItem.Text;
            CurrentStudentSSN  = e.ListItem.Value;

            BindParts();
            Breadcrum4.Text = string.Format("{0} > {1} > {2}", CurrentCourseCode, CurrentRunID, CurrentStudentName);

            ActiveForm = Form4;
        }
        private void DayListEventHandler(Object source, ListCommandEventArgs e)
        {
            _threadCalendar = DateTimeFormatInfo.CurrentInfo.Calendar;

            // VisibleDate should have been set with the first day of the week
            // so the selected index can be used to adjust to the selected day.
            Control.VisibleDate = _threadCalendar.AddDays(Control.VisibleDate, e.ListItem.Index);

            SelectRange(Control.VisibleDate, Control.VisibleDate);
            HandlePostBackEvent(Done.ToString(CultureInfo.InvariantCulture));
        }
        private void MonthListEventHandler(Object source, ListCommandEventArgs e)
        {
            _threadCalendar = DateTimeFormatInfo.CurrentInfo.Calendar;

            if (e.ListItem.Index == _monthsToDisplay)
            {
                // Next was selected
                Control.VisibleDate = _threadCalendar.AddMonths(
                    Control.VisibleDate, _monthsToDisplay);
                SecondaryUIMode = ChooseMonth;
            }
            else if (e.ListItem.Index == _monthsToDisplay + 1)
            {
                // Prev was selected
                Control.VisibleDate = _threadCalendar.AddMonths(
                    Control.VisibleDate, -_monthsToDisplay);
                SecondaryUIMode = ChooseMonth;
            }
            else
            {
                // A month was selected
                Control.VisibleDate = _threadCalendar.AddMonths(
                    Control.VisibleDate,
                    e.ListItem.Index);

                if (_chooseOption == MonthOption)
                {
                    // Add the whole month to the date list
                    DateTime beginDate = EffectiveVisibleDate(Control.VisibleDate);
                    Control.VisibleDate = beginDate;

                    DateTime endDate = _threadCalendar.AddMonths(beginDate, 1);
                    endDate = _threadCalendar.AddDays(endDate, -1);

                    SelectRange(beginDate, endDate);
                    HandlePostBackEvent(Done.ToString(CultureInfo.InvariantCulture));
                }
                else
                {
                    SecondaryUIMode = ChooseWeek;
                }
            }
        }
        private void WeekListEventHandler(Object source, ListCommandEventArgs e)
        {
            // Get the first calendar day and adjust it to the week the user
            // selected (to be consistent with the index setting in Render())
            _threadCalendar = DateTimeFormatInfo.CurrentInfo.Calendar;

            DateTime tempDate = FirstCalendarDay(Control.VisibleDate);

            Control.VisibleDate = _threadCalendar.AddDays(tempDate, e.ListItem.Index * 7);

            if (_chooseOption == WeekOption)
            {
                // Add the whole week to the date list
                DateTime endDate = _threadCalendar.AddDays(Control.VisibleDate, 6);

                SelectRange(Control.VisibleDate, endDate);
                HandlePostBackEvent(Done.ToString(CultureInfo.InvariantCulture));
            }
            else
            {
                SecondaryUIMode = ChooseDay;
            }
        }
 private void OptionListEventHandler(Object source, ListCommandEventArgs e)
 {
     SecondaryUIMode = Options[e.ListItem.Index];
     HandlePostBackEvent(SecondaryUIMode.ToString(CultureInfo.InvariantCulture));
 }
Beispiel #8
0
 protected void HAWBList_ItemCommand(object sender, ListCommandEventArgs e)
 {
     Response.Redirect("driver_hawb_detail.aspx?ELT=" + elt_account_number + "&ORG=" + driver_acct + "&HAWB=" + e.ListItem.Text);
 }
 private void OnListItemCommand(Object sender, ListCommandEventArgs e)
 {
     _menu.Visible = false;
     Control.RaisePostBackEvent(e.ListItem.Value);
 }