public JsonResult checkStatusInterview(Guid userId, Guid offerId) { var interview = new InterviewDao().findInterview(userId, offerId); if (interview != null) { var user = new UserDao().FindById(userId); var employee = new EmployeeDao().FindById(interview.EmployeeID); var offer = new OfferJobDao().findById(offerId); return(Json(new { having = true, User = user.UserName, InterviewID = interview.InterviewID, Offer = offer.OfferName, Time = interview.Time, Date = interview.Date, Status = interview.Status, Employee = employee.EmployeeName, Address = interview.Address, Note = interview.Note }));; } return(Json(new { having = false })); }
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 })); }
public ActionResult InterviewLetter(Int32?interviewId, 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"); if (interviewId != null && offerId == null) { var interview = new InterviewDao().findById((int)interviewId); ViewBag.Offer = new OfferJobDao().findById(interview.OfferID); ViewBag.Employee = new EmployeeDao().FindById(interview.EmployeeID); return(View(interview)); } if (interviewId == null && offerId != null) { var interview = new InterviewDao().findInterview(userId, (Guid)offerId); ViewBag.Offer = new OfferJobDao().findById(interview.OfferID); ViewBag.Employee = new EmployeeDao().FindById(interview.EmployeeID); return(View(interview)); } return(View()); }
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 InterviewSchedule() { 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().ListInterviewByUser(userId).ToList(); return(View(interview)); }
public ActionResult InterviewSchedule() { /* var accID = int.Parse(User.Identity.Name); * var acc = new AccountDao().FindAccountById(accID); * var employee = new EmployeeDao().FindById(acc.UserId); * var enterpriseId = employee.EnterpriseID; */ Guid enterpriseId = new Guid("4c0bba20-27f2-4838-8cb9-ce3a80ce7784"); var interview = new InterviewDao().ListInterviewByEnterprise(enterpriseId); return(View(interview)); }
public ActionResult InterviewSchedule() { /* * 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().ListInterviewByUser(userId).ToList(); return(View(interview)); }
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 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 })); }
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 })); }
public JsonResult InterViewInvitationRep(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; bool checkUpdateInterview; if (accept == true) { checkUpdateInterview = new InterviewDao().UpdateStatus(userId, offerId, "accept"); } else { checkUpdateInterview = new InterviewDao().UpdateStatus(userId, offerId, "deny"); } return(Json(new { status = checkUpdateInterview })); }
public JsonResult InterViewInvitationRep(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 checkUpdateInterview; if (accept == true) { checkUpdateInterview = new InterviewDao().UpdateStatus(userId, offerId, "accept"); } else { checkUpdateInterview = new InterviewDao().UpdateStatus(userId, offerId, "deny"); } return(Json(new { status = checkUpdateInterview })); }