public JsonResult WorkInvitationData(Guid userId, Guid offerId, String date, String salary, String address, String note)
        {
            var workinvitation = new WorkInvitation();

            workinvitation.UserID   = userId;
            workinvitation.OfferID  = offerId;
            workinvitation.StartDay = date;
            workinvitation.Salary   = salary;
            workinvitation.Address  = address;
            workinvitation.Note     = note;
            workinvitation.Status   = "waiting";
            var checkInsertWorkInvitation = new WorkInvitationDao().InsertWorkInvitation(workinvitation);

            if (checkInsertWorkInvitation == false)
            {
                return(Json(new
                {
                    status = false
                }));
            }
            var checkUpdate          = new AppliedCandidateDao().UpdateStatus(userId, offerId, "Mời làm");
            var checkInterviewUpdate = new InterviewDao().UpdateStatus(userId, offerId, "done");

            return(Json(new
            {
                status = true
            }));
        }
Пример #2
0
        public JsonResult WorkInvitationRep(Guid offerId, bool accept)
        {
            /*
             * var accID = int.Parse(User.Identity.Name);
             * var acc = new AccountDao().FindAccountById(accID);
             * var user = new UserDao().FindById(acc.UserId);
             * var userId = user.UserId;  */

            var  userId = new Guid("ed4171f6-485b-4279-9a89-ab74678833f1");
            bool checkUpdateWorkInvitation;

            if (accept == true)
            {
                checkUpdateWorkInvitation = new WorkInvitationDao().UpdateStatus(userId, offerId, "accept");
                var checkUpdateStatus = new AppliedCandidateDao().UpdateStatus(userId, offerId, "Hoàn tất tuyển dụng");
            }
            else
            {
                checkUpdateWorkInvitation = new WorkInvitationDao().UpdateStatus(userId, offerId, "deny");
            }
            return(Json(new
            {
                status = checkUpdateWorkInvitation
            }));
        }
        public JsonResult InterviewData(Guid userId, Guid offerId, Guid employeeId, String date, String time, String address, String note)
        {
            var interview = new Interview();

            interview.Date       = date;
            interview.Time       = time;
            interview.Address    = address;
            interview.Note       = note;
            interview.UserID     = userId;
            interview.OfferID    = offerId;
            interview.EmployeeID = employeeId;
            interview.Status     = "waiting";
            var checkInsertInterview = new InterviewDao().InsertInterview(interview);

            if (checkInsertInterview == false)
            {
                return(Json(new
                {
                    status = false
                }));
            }
            var checkUpdate = new AppliedCandidateDao().UpdateStatus(userId, offerId, "Phỏng vấn");

            return(Json(new
            {
                status = true
            }));
        }
        public ActionResult WorkList()
        {
            var accID    = int.Parse(User.Identity.Name);
            var acc      = new AccountDao().FindAccountById(accID);
            var user     = new UserDao().FindById(acc.UserId);
            var userId   = user.UserId;
            var workList = new AppliedCandidateDao().ListByUser(userId);

            return(View(workList));
        }
 public ActionResult Interview(Guid userId, Guid offerId)
 {
     ViewBag.CandidateDetail = new UserDao().FindById(userId);
     ViewBag.OfferDetail     = new OfferJobDao().findById(offerId);
     if (new AppliedCandidateDao().findCandidate(userId, offerId).Status == "Đã nộp hồ sơ")
     {
         var checkUpdate = new AppliedCandidateDao().UpdateStatus(userId, offerId, "Đã xem hồ sơ");
     }
     ViewBag.CandidateApplied = new AppliedCandidateDao().findCandidate(userId, offerId);
     ViewBag.WorkInvitation   = new WorkInvitationDao().findWorkInvitation(userId, offerId);
     return(View());
 }
Пример #6
0
        public ActionResult WorkList()
        {
            /*
             * var accID = int.Parse(User.Identity.Name);
             * var acc = new AccountDao().FindAccountById(accID);
             * var user = new UserDao().FindById(acc.UserId);
             * var userId = user.UserId;   */
            var userId   = new Guid("ed4171f6-485b-4279-9a89-ab74678833f1");
            var workList = new AppliedCandidateDao().ListByUser(userId);

            return(View(workList));
        }
        public JsonResult checkStatusInterview(Guid offerId)
        {
            var accID     = int.Parse(User.Identity.Name);
            var acc       = new AccountDao().FindAccountById(accID);
            var user      = new UserDao().FindById(acc.UserId);
            var userId    = user.UserId;
            var interview = new InterviewDao().findInterview(userId, offerId);
            var applied   = new AppliedCandidateDao().findCandidate(userId, offerId);

            return(Json(new
            {
                interviewStatus = interview.Status,
                workStatus = applied.Status
            }));
        }
        public JsonResult FailedCV(Guid userId, Guid offerId)
        {
            var checkUpdate = new AppliedCandidateDao().UpdateStatus(userId, offerId, "Loại hồ sơ");

            if (checkUpdate == true)
            {
                return(Json(new
                {
                    status = true
                }));
            }
            return(Json(new
            {
                status = false
            }));
        }
        public JsonResult FailedInterview(Guid userId, Guid offerId)
        {
            var checkUpdate1 = new AppliedCandidateDao().UpdateStatus(userId, offerId, "Trượt pv");
            var checkUpdate2 = new InterviewDao().UpdateStatus(userId, offerId, "fail");

            if (checkUpdate1 == true)
            {
                return(Json(new
                {
                    status = true
                }));
            }
            return(Json(new
            {
                status = false
            }));
        }
Пример #10
0
        public JsonResult checkStatusInterview(Guid offerId)
        {
            /*
             * var accID = int.Parse(User.Identity.Name);
             * var acc = new AccountDao().FindAccountById(accID);
             * var user = new UserDao().FindById(acc.UserId);
             * var userId = user.UserId;  */

            var userId    = new Guid("ed4171f6-485b-4279-9a89-ab74678833f1");
            var interview = new InterviewDao().findInterview(userId, offerId);
            var applied   = new AppliedCandidateDao().findCandidate(userId, offerId);

            return(Json(new
            {
                interviewStatus = interview.Status,
                workStatus = applied.Status
            }));
        }