public IHttpActionResult UpdateExaminationSchedule(ScheduleExamModel scheduleExam) { var isUpdate = examinationschedulesService.UpdateExaminationSchedule(scheduleExam.UniversityId, scheduleExam); if (isUpdate == true) { return(Ok()); } return(BadRequest()); }
public bool UpdateExaminationSchedule(int?id, ScheduleExamModel scheduleExam) { try { var obj = JsonConvert.SerializeObject (new ScheduleExamModel { BatchId = scheduleExam.BatchId, CourseId = scheduleExam.CourseId, ProgramStudyId = scheduleExam.ProgramStudyId, GenerateHallTicketDate = scheduleExam.GenerateHallTicketDate, ExaminationTypeId = scheduleExam.ExaminationTypeId, ExaminationScheduleId = scheduleExam.ExaminationScheduleId, ExaminationDate = scheduleExam.ExaminationDate, StartTime = scheduleExam.StartTime, EndTime = scheduleExam.EndTime, UniversityId = scheduleExam.UniversityId, UserId = scheduleExam.UserId, TokenId = scheduleExam.TokenId, }); var ExamSchObj = obj.ToString(); var JsonObj = db.UpdateExaminationSchedule(scheduleExam.UniversityId, ExamSchObj); return(true); //db.ClassRoomMasters.Add(getExaminationSchedule); //db.SaveChanges(); //return true; } catch (Exception ex) { Console.WriteLine("NotImplementedException", ex); return(false); } }