Exemple #1
0
        public eWorkSchedule getOneWorkSchedule(int id)
        {
            var           result = workdal.getOneWorkSchedule(id);
            eWorkSchedule temp   = new eWorkSchedule();

            temp.DoctorID       = result.DoctorID;
            temp.EndTime        = result.EndTime;
            temp.RoomID         = result.RoomID;
            temp.StartTime      = result.StartTime;
            temp.WorkScheduleID = result.WorkScheduleID;

            return(temp);
        }
Exemple #2
0
        public List <eWorkSchedule> getAllWorkSchedule()
        {
            List <eWorkSchedule> ls = new List <eWorkSchedule>();

            foreach (WorkSchedule record in workdal.getAllWorkSchedule())
            {
                eWorkSchedule temp = new eWorkSchedule();
                temp.DoctorID       = record.DoctorID;
                temp.EndTime        = record.EndTime;
                temp.RoomID         = record.RoomID;
                temp.StartTime      = record.StartTime;
                temp.WorkScheduleID = record.WorkScheduleID;

                ls.Add(temp);
            }
            return(ls);
        }
Exemple #3
0
 public bool updateWorkSchedule(eWorkSchedule e)
 {
     try
     {
         WorkSchedule temp = new WorkSchedule();
         temp.DoctorID       = e.DoctorID;
         temp.EndTime        = e.EndTime;
         temp.RoomID         = e.RoomID;
         temp.StartTime      = e.StartTime;
         temp.WorkScheduleID = e.WorkScheduleID;
         workdal.updateWorkSchedule(temp);
         return(true);
     }
     catch
     {
         return(false);
     }
 }