public ActionResult Put(long id, [FromBody] JobInterview jobInterview) { try { _jobInterviewService.Update(id, jobInterview); return(Ok()); } catch (Exception ex) { return(UnprocessableEntity(ex)); } }
public ActionResult Post([FromBody] JobInterview jobInterview) { try { _jobInterviewService.Insert(jobInterview); return(Ok()); } catch (Exception ex) { return(UnprocessableEntity(ex)); } }
public ActionResult Edit(int id, FormCollection collection) { try { // TODO: Add update logic here var model = JobInterview.GetById(id); TryUpdateModel(model); model.SaveOrUpDate(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Edit(InterviewModel interviewmodel) { JobInterview intEnt = _serviceInterview.GetById(interviewmodel.InterviewId); intEnt.FirmId = interviewmodel.CompanyId; intEnt.InterviewStatusId = interviewmodel.InterviewStateId; intEnt.ModelType = interviewmodel.ModelTypeId; intEnt.TraineeId = interviewmodel.StudentId; intEnt.Date = interviewmodel.Date; intEnt.Description = interviewmodel.Result; _serviceInterview.Update(intEnt); return(RedirectToAction("Interviews")); }
public ActionResult Add(InterviewModel interviewmodel) { JobInterview ie = new JobInterview { TraineeId = interviewmodel.StudentId, Date = interviewmodel.Date, InterviewStatusId = interviewmodel.InterviewStateId, ModelType = interviewmodel.ModelTypeId, FirmId = interviewmodel.CompanyId }; _serviceInterview.Insert(ie); return(RedirectToAction("Interviews")); }
public ActionResult Create(FormCollection collection) { try { // TODO: Add insert logic here var model = new JobInterview(); TryUpdateModel(model); model.CreateBy = SessionItems.CurrentUser.UserID; model.CreateAt = DateTime.Now; model.Insert(); return(RedirectToAction("Index")); } catch { return(View()); } }
// GET: JobInterview/Edit/5 public ActionResult Edit(int id) { return(View(JobInterview.GetById(id))); }
// GET: JobInterview public ActionResult Index() { return(View(JobInterview.GetAll())); }
public void Update(long id, JobInterview user) { _repository.Update(id, user); }
public JobInterview Insert(JobInterview user) { user = _repository.Insert(user); return(user); }