public ActionResult _EditReceiveState(PD_ReceiveState_ViewModel model)
        {
            var _p = _db.PD_Processes.Find(model.PD_Process_Id);
            if (User.Identity.Name.Equals(_p.LockedBy))
            {
                PD_ReceiveState state = _db.PD_ReceiveStates.Find(model.PD_Process_Id, model.PD_Subject_Id, model.Id);
                state.Name = model.Name;
                state.EndState = model.EndState;
                state.StartState = model.StartState;

                _db.SaveChanges();

                return RedirectToAction("ViewSubject", new { processid = model.PD_Process_Id, subjectid = model.PD_Subject_Id, edit = 1 });
            }
            else
            {
                return null;
            }
        }
        public ActionResult _EditReceiveState(int processid, int subjectid, int stateid, int edit)
        {
            var state = _db.PD_ReceiveStates.Find(processid, subjectid, stateid);
            PD_ReceiveState_ViewModel Model = new PD_ReceiveState_ViewModel() { PD_Process_Id = state.PD_Process_Id, PD_Subject_Id = state.PD_Subject_Id, Id = state.Id, Name = state.Name, EndState = state.EndState, StartState = state.StartState };

            ViewBag.Edit = edit;
            return PartialView(Model);
        }