Ejemplo n.º 1
0
        public void AddHWBL(HwToStydyClassOnDateDTO hwDTO)
        {
            HwToStydyClassOnDate h = new HwToStydyClassOnDate();

            h.deadline = hwDTO.deadline;
            h.durationOfPreparation     = hwDTO.durationOfPreparation;
            h.hwDescription             = hwDTO.hwDescription;
            h.hwToStydyClassOnDate_Date = hwDTO.hwToStydyClassOnDate_Date;
            h.studyClassId         = hwDTO.studyClassId;
            h.verificationQuestion = hwDTO.verificationQuestion;
            h.verificationAnswer   = hwDTO.verificationAnswer;
            TeacherDAL t = new TeacherDAL();

            t.AddHW(h);
        }
Ejemplo n.º 2
0
        public int AddHw(HwToStydyClassOnDateDTO hwDTO)
        {
            HwToStydyClassOnDate hw = new HwToStydyClassOnDate();
            Teacher teacher         = new Teacher();

            hw.studyClassId = hwDTO.studyClassId;
            hw.hwToStydyClassOnDate_Date = hwDTO.hwToStydyClassOnDate_Date;
            hw.hwDescription             = hwDTO.hwDescription;
            hw.deadline = hwDTO.deadline;
            hw.durationOfPreparation = hwDTO.durationOfPreparation;
            hw.verificationQuestion  = hwDTO.verificationQuestion;
            hw.verificationAnswer    = hwDTO.verificationAnswer;

            HwDAL hwDAL  = new HwDAL();
            int   result = hwDAL.AddHw(hw);

            return(result);
        }
Ejemplo n.º 3
0
        public List <HwToStydyClassOnDateDTO> GetHW()
        {
            HwDAL hwDAL = new HwDAL();
            // TeacherDAL tDaL = new TeacherDAL();

            List <HwToStydyClassOnDateDTO> listDTO = new List <HwToStydyClassOnDateDTO>();

            foreach (var item in hwDAL.GetHW().ToList())
            {
                HwToStydyClassOnDateDTO hwDTO = new HwToStydyClassOnDateDTO();
                //צריך את המפתח הראשי?
                hwDTO.studyClassId = (int)item.studyClassId;
                hwDTO.hwToStydyClassOnDate_Date = (DateTime)item.hwToStydyClassOnDate_Date;
                hwDTO.hwDescription             = item.hwDescription;
                hwDTO.deadline = (DateTime)item.deadline;
                hwDTO.durationOfPreparation = (int)item.durationOfPreparation;
                hwDTO.verificationQuestion  = item.verificationQuestion;
                hwDTO.verificationAnswer    = (int)item.verificationAnswer;
                listDTO.Add(hwDTO);
            }
            return(listDTO);
        }
Ejemplo n.º 4
0
 public void PostHw([FromBody] HwToStydyClassOnDateDTO h)
 {
     teacherBL.AddHWBL(h);
 }