Ejemplo n.º 1
0
        public ActionResult updateEventData(int id)
        {
            string start = Request.Form["start"];
            string end   = Request.Form["end"];
            string title = Request.Form["title"];
            string body  = Request.Form["body"];

            int client  = Convert.ToInt32(Request.Form["client"]);
            int project = Convert.ToInt32(Request.Form["project"]);
            int product = Convert.ToInt32(Request.Form["product"]);
            int service = Convert.ToInt32(Request.Form["service"]);

            Task tsk = _repository.GetTask(id);

            tsk.dtStartDate = Convert.ToDateTime(start);
            tsk.dtEndDate   = Convert.ToDateTime(end);
            tsk.dtCreation  = DateTime.Now;
            tsk.strTitle    = title;
            tsk.strComment  = body;

            tsk.Proyect_id  = project;
            tsk.Service_id  = service;
            tsk.Resource_id = getUserbyName(User.Identity.Name);

            // Persist Changes
            _repository.Save();

            return(null);
        }