Exemple #1
0
 public ActionResult Edit([Bind(Include = "ID,Name,JsonContent,Description,Creator_id,Allowed")] APMT_Process p)
 {
     if (ModelState.IsValid)
     {
         db.Entry(p).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("View_List"));
     }
     return(View(p));
 }
Exemple #2
0
        public ActionResult Process(APMT_Process p)
        {
            if (ModelState.IsValid)
            {
                p.JsonContent = "{\"nodeDataArray\": [],\"linkDataArray\": []}";
                p.Allowed     = true;
                p.Creator_Id  = int.Parse(Session["usercompanyid"].ToString());
                db.APMT_Process.Add(p);
                db.SaveChanges();

                return(RedirectToAction("Index", new { id = p.ID }));
            }
            else
            {
                return(View(p));
            }
        }