예제 #1
0
        public List <timeSlotList> getTimeSlot(int id)
        {
            bl = new ClassBl();
            bo = new ClassBo();
            dt = new DataTable();
            dt = da.getTimeSlot(id);
            List <timeSlotList> list = new List <timeSlotList>();

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    timeSlotList itlist = new timeSlotList();
                    itlist.id = dr[bo.id].ToString();
                    itlist.lecturerToCoursesdId = dr[bo.lecturerToCoursesdId].ToString();
                    itlist.day         = dr[bo.day].ToString();
                    itlist.timeFrom    = dr[bo.timeFrom].ToString();
                    itlist.timeTo      = dr[bo.timeTo].ToString();
                    itlist.room        = dr[bo.room].ToString();
                    itlist.coursesID   = dr[bo.coursesID].ToString();
                    itlist.coursesName = dr[bo.name].ToString();
                    itlist.commonName  = dr[bo.commonName].ToString();
                    itlist.status      = dr[bo.status].ToString() == "I" ? "Inactive" : "Active";
                    switch (dr[bo.day].ToString())
                    {
                    case "1":
                        itlist.dayName = "Monday";
                        break;

                    case "2":
                        itlist.dayName = "Tuesday";
                        break;

                    case "3":
                        itlist.dayName = "Wednesday";
                        break;

                    case "4":
                        itlist.dayName = "Thursday";
                        break;

                    case "5":
                        itlist.dayName = "Friday";
                        break;

                    default:
                        break;
                    }

                    list.Add(itlist);
                }
            }
            return(list);
        }
예제 #2
0
 public int saveTimeSlot(timeSlotList list)
 {
     bl = new ClassBl();
     da = new ClassDa();
     dt = new DataTable();
     dt = da.checkTimeSlot(list);
     if (dt.Rows.Count > 0)
     {
         return(2);
     }
     else
     {
         return(da.saveTimeSlot(list));
     }
 }
예제 #3
0
 public int saveCourses(coursesList list)
 {
     bl = new ClassBl();
     return(bl.saveCourses(list));
 }
예제 #4
0
 public int deleteCourses(int id)
 {
     bl = new ClassBl();
     return(bl.deleteCourses(id));
 }
예제 #5
0
 public List <coursesList> getCourse(int id)
 {
     bl = new ClassBl();
     return(bl.getCourse(id, DBNull.Value.ToString()));
 }
예제 #6
0
 public List <lecturerList> selectLecturer()
 {
     bl = new ClassBl();
     return(bl.selectLecturer());
 }
예제 #7
0
 public int savePerson(personList list)
 {
     bl = new ClassBl();
     return(bl.savePerson(list));
 }
예제 #8
0
 public List <personList> getPerson(int id)
 {
     bl = new ClassBl();
     return(bl.getPerson(id, null));
 }
예제 #9
0
 public int deletePerson(int id)
 {
     bl = new ClassBl();
     return(bl.deletePerson(id));
 }
예제 #10
0
 public int saveLecturer(lecturerList list)
 {
     bl = new ClassBl();
     return(bl.saveLecturer(list));
 }
예제 #11
0
 public List <lecturerList> getLecturer(int id)
 {
     bl = new ClassBl();
     return(bl.getLecturer(id));
 }
예제 #12
0
 public int deleteLecturer(int id)
 {
     bl = new ClassBl();
     return(bl.deleteLecturer(id));
 }
예제 #13
0
 public string getHour(int id, int day)
 {
     bl = new ClassBl();
     return(bl.getHour(id, day));
 }
예제 #14
0
 public List <coursesList> selectedCourse(int id)
 {
     bl = new ClassBl();
     return(bl.selectedCourse(id));
 }
예제 #15
0
 public List <coursesList> selectCourse()
 {
     bl = new ClassBl();
     return(bl.selectCourse());
 }