public ActionResult AddAgent() { var agent = new Agent(); var agencies = new Agencies(); var clear = new SecurityClearance(); var agents = new AgentVM(agent, agencies.All(), clear.All()); return(View(agents)); }
public ActionResult EditAgent(int id) { var xd = repo.GrabID(id); // this part is where I will be calling upon the repo in services to return a list. var assin = new Assignment(); var agencies = new Agencies(); var clear = new SecurityClearance(); var agents = new AssignVM(xd, agencies.All(), clear.All(), assin); return(View(agents)); }
public ActionResult AddAgent(Agent agent) { var repo = new AgentRepo(); repo.Add(agent); var agencies = new Agencies(); var clear = new SecurityClearance(); var agents = new AgentVM(agent, agencies.All(), clear.All()); return(Redirect("/")); }