Ejemplo n.º 1
0
        //Adds new descriptive content for specific task person
        public JsonResult json_saveNewTaskStat()
        {
            var pars = Request.Params;

            int    task_id     = Convert.ToInt32(pars["task_id"]);
            string description = pars["description"];

            var curUser   = Session["user"];
            int person_id = Convert.ToInt32(((Themes.Models.user)curUser).person_id);

            int task_person_id = this.getCurTaskPerson(task_id, person_id).First().task_person_id;

            using (Themes.Models.prjEntities ctx = new Themes.Models.prjEntities())
            {
                var newTaskProgress = new Themes.Models.tp_progress()
                {
                    t_p_id      = task_person_id,
                    description = description,
                    datetime    = DateTime.Now
                };

                ctx.tp_progress.AddObject(newTaskProgress);
                ctx.SaveChanges();
            }

            return(Json(new { result = "done" }, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tp_progress EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotp_progress(tp_progress tp_progress)
 {
     base.AddObject("tp_progress", tp_progress);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a new tp_progress object.
 /// </summary>
 /// <param name="t_p_p_id">Initial value of the t_p_p_id property.</param>
 public static tp_progress Createtp_progress(global::System.Int32 t_p_p_id)
 {
     tp_progress tp_progress = new tp_progress();
     tp_progress.t_p_p_id = t_p_p_id;
     return tp_progress;
 }