Beispiel #1
0
        public ActionResult Create(String ProjectId, FormCollection Form)
        {
            System.Diagnostics.Debug.WriteLine(Convert.ToString(Form.AllKeys.ToList().ElementAt(2) + Form.AllKeys.ToList().ElementAt(3)));
            if (Form["Name"] == "")
            {
                return(RedirectToAction("Error", "Task", new { ProjectId = ProjectId }));
            }
            UserBissnessLayer userBissnessLayer = new UserBissnessLayer();
            Task task = mapTask(ProjectId, Form);

            userBissnessLayer.createTask(task);
            return(RedirectToAction("Task", "Project", new { id = ProjectId }));
        }
Beispiel #2
0
        public ActionResult Edit(FormCollection form)
        {
            UserBissnessLayer userBissnessLayer = new UserBissnessLayer();
            Task task = new Task();

            userBissnessLayer.DeleteTask(form["Id"]);
            task.Id          = form["Id"];
            task.Hour        = form["Hour"] == "" ? 0 : Convert.ToInt32(form["Hour"].ToString());
            task.Name        = form["Name"];
            task.Description = form["Description"];
            task.Assigne     = form["Assigne"];
            task.ProjectId   = form["ProjectId"];
            userBissnessLayer.createTask(task);
            return(RedirectToAction("Task", "Project", new { id = task.ProjectId }));
        }