Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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("/"));
        }