Exemplo n.º 1
0
        private void InitSchedule()
        {
            ScheduleBiz sb = new ScheduleBiz();
            Schedule    s  = sb.GetScheduleByS_ID(S_ID);

            CourseLB.Text            = s.C_Name;
            TeacherNameLB.Text       = s.T_Name;
            CourseStatusLB.Text      = s.StatusStr;
            CourseStatusLB.ForeColor = s.StatusBackColor;
            StartTimeLB.Text         = s.C_StartTime.ToString("yyyy-MM-dd HH:mm");
            EndTimeLB.Text           = s.C_EndTime.ToString("yyyy-MM-dd HH:mm");
            CourseIntroLB.Text       = s.C_Des;

            TaobaoLink.InnerText = s.TaobaoLink;

            switch (s.Status)
            {
            case 1: CancelBtn.Visible = false; break;

            case 2:
                UserBiz ub = new UserBiz();

                if (ub.IsUserBooked(U_ID, S_ID))
                {
                    BookBtn.Visible = false;
                }
                else
                {
                    CancelBtn.Visible = false; BookBtn.Visible = false;
                }
                break;

            default: CancelBtn.Visible = false; BookBtn.Visible = false; break;
            }
        }
Exemplo n.º 2
0
        protected void BookBtn_Click(object sender, EventArgs e)
        {
            ScheduleBiz sb = new ScheduleBiz();

            sb.UserBookSchedule(S_ID, U_ID);
            InitSchedule();
            ConfirmDiv.Visible = true;
        }
Exemplo n.º 3
0
        protected void CancelBtn_Click(object sender, EventArgs e)
        {
            ScheduleBiz sb = new ScheduleBiz();

            sb.CancelSchedule(sb.GetScheduleByS_ID(S_ID), U_ID, CommentTxt.Text.Trim());


            string radconfirmscript = "<script language='javascript'>function f(){CanceledSchedule(); Sys.Application.remove_load(f) ;}; Sys.Application.add_load (f);</script>";

            Page.ClientScript.RegisterStartupScript(this.GetType(), "radconfirm", radconfirmscript);
        }
Exemplo n.º 4
0
        private void BindScheduler()
        {
            ScheduleBiz sb = new ScheduleBiz();

            string u_ID = "";
            string t_ID = "";

            if (MeBtn.Checked)
            {
                u_ID = U_ID;
            }
            if (TeacherCB.SelectedIndex > 0)
            {
                t_ID = TeacherCB.SelectedItem.Value;
            }

            List <Schedule> scheduleList = sb.GetAllScheduleByU_IDAndT_ID(u_ID, t_ID);

            LogScheduler.DataSource = scheduleList.Where <Schedule>(p => p.Status == 1 || p.Status == 2 || p.Status == 4 || p.Status == 5);
        }
Exemplo n.º 5
0
 public object DeleteParticipator(object json)
 {
     return(ScheduleBiz.DeleteParticipator(json));
 }
Exemplo n.º 6
0
 public object GetParticipatorList(int scheduleId)
 {
     return(ScheduleBiz.GetParticipatorList(scheduleId));
 }
Exemplo n.º 7
0
 public object GetUserScheduleList(int userId, int projectId)
 {
     return(ScheduleBiz.GetUserScheduleList(userId, projectId));
 }
Exemplo n.º 8
0
 public object AddParticipator(object json)
 {
     return(ScheduleBiz.AddParticipator(json));
 }
Exemplo n.º 9
0
 public object GetScheduleList(int projectId)
 {
     return(ScheduleBiz.GetScheduleList(projectId));
 }
Exemplo n.º 10
0
 public object GetSchedule(int scheduleId)
 {
     return(ScheduleBiz.GetSchedule(scheduleId));
 }
Exemplo n.º 11
0
 public object UpdateSchedule(object json)
 {
     return(ScheduleBiz.UpdateSchedule(json));
 }
Exemplo n.º 12
0
 public object DeleteSchedule(object json)
 {
     return(ScheduleBiz.DeleteSchedule(json));
 }
Exemplo n.º 13
0
 public object CreateSchedule(object json)
 {
     return(ScheduleBiz.CreateSchedule(json));
 }