Esempio n. 1
0
        public IActionResult Create(int?projectId)
        {
            var taskBindingModel = new Logica.Models.BindingModel.TaskCreateBindingModel
            {
                ProjectId = projectId
            };

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

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

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

            return(View(taskBindingModel));
        }
Esempio n. 2
0
        public IActionResult Create(Logica.Models.BindingModel.TaskCreateBindingModel model)
        {
            if (ModelState.IsValid)
            {
                Logica.BL.Tasks tasks = new Logica.BL.Tasks();

                tasks.CreateTask(model);

                return(RedirectToAction("Index"));
            }

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

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

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

            return(View(model));
        }