Example #1
0
        // GET: Tasks
        public ActionResult Index()
        {
            string userId = User.Identity.Name;
            var    tasks  = repository.GetTasksByUserId(userId);
            var    leads  = repository.GetAssignedLeads(userId);

            if (userId == "*****@*****.**")
            {
                tasks = repository.GetAllTasks();
                leads = repository.GetAllLeads();
            }
            TaskVM vm = new TaskVM()
            {
                Leads = leads, Tasks = tasks
            };

            return(View(vm));
        }