Example #1
0
        public IHttpActionResult deleteExam(exam_details eds)
        {
            Boolean rr = new ExamDetailsRelated().deleteExam(eds);

            if (rr)
            {
                rs.code    = 200;
                rs.message = "succesfully data has been deleted";
                return(Content(HttpStatusCode.OK, rs));
            }
            else
            {
                rs.code    = 100;
                rs.message = "failed to delte";
                return(Content(HttpStatusCode.OK, rs));
            }
        }
Example #2
0
        public IHttpActionResult updateExamClass(exam_details edupdate)
        {
            Boolean up = new ExamDetailsRelated().updateExamClassDetails(edupdate);

            if (up)
            {
                rs.code    = 200;
                rs.message = "succesfully data has been updated";
                return(Content(HttpStatusCode.OK, rs));
            }
            else
            {
                rs.code    = 100;
                rs.message = "failed to update";
                return(Content(HttpStatusCode.OK, rs));
            }
        }
Example #3
0
        public ResponseMessage timeTableList(exam_details slist)
        {
            var entryPoint = (from ep in entity.exam_details
                              join e in entity.school_details on slist.school_id equals e.school_id
                              where ep.school_id == slist.school_id
                              select new
            {
                ep.exam_type,
                ep.exam_start_date,
                ep.exam_end_date,
                ep.school_id,
                ep.exam_id
            });

            rs.Data    = entryPoint;
            rs.code    = 200;
            rs.message = "Data success";
            return(rs);
        }
Example #4
0
        public IHttpActionResult addingExamClasses(exam_details exdetails)
        {
            Boolean ww = new ExamDetailsRelated().addingExamClassDetails(exdetails);

            if (ww)
            {
                exdetails.insert_date = DateTime.Now;
                entity.exam_details.Add(exdetails);
                entity.SaveChanges();
                rs.code    = 200;
                rs.message = "succesfully data has inserted";
                return(Content(HttpStatusCode.OK, rs));
            }
            else
            {
                rs.code    = 100;
                rs.message = "failed to insert data";
                return(Content(HttpStatusCode.OK, rs));
            }
        }