Ejemplo n.º 1
0
        public ActionResult Create(Logica.Models.BindingModels.TasksCreateBindingModel model)
        {
            if (ModelState.IsValid)
            {
                Logica.BL.Tasks tasks = new Logica.BL.Tasks();
                tasks.CreateTasks(model.Title,
                                  model.Details,
                                  model.ExpirationDate,
                                  model.IsCompleted,
                                  model.Effort,
                                  model.RemainingWork,
                                  model.StateId,
                                  model.ActivityId,
                                  model.PriorityId,
                                  model.ProjectId);

                return(RedirectToAction("Index", new { projectId = model.ProjectId }));
            }

            Logica.BL.States states = new Logica.BL.States();
            ViewBag.States = states.GetStates();

            Logica.BL.Activities activities = new Logica.BL.Activities();
            ViewBag.Activities = activities.GetActivities();

            Logica.BL.Priorities priorities = new Logica.BL.Priorities();
            ViewBag.Priorities = priorities.GetPriorities();

            return(View(model));
        }
Ejemplo n.º 2
0
        public IActionResult Create(int?projectId)
        {
            var taskBindingModel = new Logica.Models.BindingModel.TasksCreateBindingModel
            {
                ProjectId = projectId
            };

            Logica.BL.Activities activities = new Logica.BL.Activities();
            ViewBag.Activities = activities.GetActivities();

            Logica.BL.Priorities priorities = new Logica.BL.Priorities();
            ViewBag.Priorities = priorities.GetPriorities();

            Logica.BL.States states = new Logica.BL.States();
            ViewBag.States = states.GetStates();
            return(View(taskBindingModel));
        }