Beispiel #1
0
        public IHttpActionResult updateSubjects(subject_details sdetails)
        {
            Boolean d = new SubjectDetailsrelated().updatingSubjects(sdetails);

            if (d)
            {
                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));
            }
        }
Beispiel #2
0
        public IHttpActionResult deleteSubject(subject_details sub)
        {
            Boolean gg = new SubjectDetailsrelated().deleteSubjects(sub);


            if (gg)
            {
                rs.code    = 200;
                rs.message = "succesfully data has been deleted";
                return(Content(HttpStatusCode.OK, rs));
            }
            else
            {
                rs.code    = 100;
                rs.message = "failed to delete";
                return(Content(HttpStatusCode.OK, rs));
            }
        }
Beispiel #3
0
        public IHttpActionResult addingSubjects(subject_details sdetails)
        {
            Boolean s = new SubjectDetailsrelated().addSubjectDetails(sdetails);

            if (s)
            {
                sdetails.insert_date = DateTime.Now;
                entt.subject_details.Add(sdetails);
                entt.SaveChanges();

                rs.code    = 200;
                rs.message = "succesfully data has been added";
                return(Content(HttpStatusCode.OK, rs));
            }
            else
            {
                rs.code    = 100;
                rs.message = "failed to insert data";
                return(Content(HttpStatusCode.OK, rs));
            }
        }