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; } }
protected void BookBtn_Click(object sender, EventArgs e) { ScheduleBiz sb = new ScheduleBiz(); sb.UserBookSchedule(S_ID, U_ID); InitSchedule(); ConfirmDiv.Visible = true; }
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); }
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); }
public object DeleteParticipator(object json) { return(ScheduleBiz.DeleteParticipator(json)); }
public object GetParticipatorList(int scheduleId) { return(ScheduleBiz.GetParticipatorList(scheduleId)); }
public object GetUserScheduleList(int userId, int projectId) { return(ScheduleBiz.GetUserScheduleList(userId, projectId)); }
public object AddParticipator(object json) { return(ScheduleBiz.AddParticipator(json)); }
public object GetScheduleList(int projectId) { return(ScheduleBiz.GetScheduleList(projectId)); }
public object GetSchedule(int scheduleId) { return(ScheduleBiz.GetSchedule(scheduleId)); }
public object UpdateSchedule(object json) { return(ScheduleBiz.UpdateSchedule(json)); }
public object DeleteSchedule(object json) { return(ScheduleBiz.DeleteSchedule(json)); }
public object CreateSchedule(object json) { return(ScheduleBiz.CreateSchedule(json)); }