public IActionResult ViewDeclined() { var rep = new CTReposetory(_connectionString); var pen = rep.GetDeclined(); return(View(pen)); }
public IActionResult ViewCandidate(int id) { var rep = new CTReposetory(_connectionString); var vm = new CandidateTrackingViewModel(); vm.Candidate = rep.GetCandidate(id); return(View(vm)); }
public override void OnActionExecuted(ActionExecutedContext context) { var rep = new CTReposetory(_connectionString); var controller = (Controller)context.Controller; controller.ViewBag.Pending = rep.GetPendingCount(); controller.ViewBag.Confirmed = rep.GetConfirmedCount(); controller.ViewBag.Declined = rep.GetDeclinedCount(); base.OnActionExecuted(context); }
public IActionResult Declined(int id) { var rep = new CTReposetory(_connectionString); rep.UpdateToDeclined(id); var ids = new { Pending = rep.GetPendingCount(), Confirmed = rep.GetConfirmedCount(), Declined = rep.GetDeclinedCount() }; return(Json(ids)); }
public IActionResult AddCandidate(Candidate candidate) { candidate = new Candidate() { Name = candidate.Name, Phone = candidate.Phone, Email = candidate.Email, Notes = candidate.Notes, Pending = true }; var rep = new CTReposetory(_connectionString); rep.AddCandidate(candidate); return(Redirect("/")); }