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

                return(RedirectToAction("Index", new { projectId = model.ProjectId }));
            }
            Logica.BL.Activitiescs activitiescs = new Logica.BL.Activitiescs();
            ViewBag.Activities = activitiescs.GetActivities();
            Logica.BL.Priorities priorities = new Logica.BL.Priorities();
            ViewBag.priorities = priorities.GetPriorities();
            Logica.BL.States state = new Logica.BL.States();
            ViewBag.States = state.GetStates();

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


            Logica.BL.Activitiescs activitiescs = new Logica.BL.Activitiescs();
            ViewBag.Activities = activitiescs.GetActivities();

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


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



            return(View(tasksBindingModel));
        }