Example #1
0
        public ActionResult Create(InterviewVM ivm)
        {
            Interview interviewdomain = new Interview()
            {
                InterviewId        = ivm.InterviewId,
                User_Id            = 1,
                Candidat_Id        = 1,
                Interview_Date     = ivm.Interview_Date,
                Interview_Location = ivm.Interview_Location,
                Interview_Type     = (TypeInt)ivm.Interview_Type
            };

            Service.Add(interviewdomain);
            Service.Commit();
            // Service.Dispose();
            return(View());
        }
Example #2
0
        public ActionResult Create([Bind(Include = "date, candidate_cin, job_id")] interview interview)
        {
            if (ModelState.IsValid)
            {
                interview.recruitmentManager_cin = CurrentUser.Id;

                _interviewService.Add(interview);
                _interviewService.commit();

                interview.user = _userService.GetById(interview.candidate_cin.GetValueOrDefault());

                return(RedirectToAction("Index"));
            }

            return(View(new InterviewViewDetailsModel()
            {
                User = CurrentUser, Interview = interview
            }));
        }
Example #3
0
        public ActionResult Accept(int id)
        {
            Application appli           = Service.GetById(id);
            Interview   interviewdomain = new Interview()
            {
                User_Id            = 1,
                Candidat_Id        = appli.Candidat_Id,
                Interview_Date     = DateTime.Now,
                Interview_Location = "Not Located",
                Interview_Type     = TypeInt.Unscheduled
            };

            ServiceI.Add(interviewdomain);
            ServiceI.Commit();

            appli.Application_Status = "Accepted";

            Service.Update(appli);
            Service.Commit();

            return(RedirectToAction("Index"));
        }