Exemple #1
0
 public ActionResult Put(long id, [FromBody] JobInterview jobInterview)
 {
     try
     {
         _jobInterviewService.Update(id, jobInterview);
         return(Ok());
     }
     catch (Exception ex)
     {
         return(UnprocessableEntity(ex));
     }
 }
Exemple #2
0
 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());
     }
 }
Exemple #4
0
        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"));
        }
Exemple #5
0
        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()));
 }
Exemple #9
0
 public void Update(long id, JobInterview user)
 {
     _repository.Update(id, user);
 }
Exemple #10
0
 public JobInterview Insert(JobInterview user)
 {
     user = _repository.Insert(user);
     return(user);
 }