public ActionResult Details(int instanceId)
 {
     var model = new WorkListItemModel(instanceId);
     model.LoadInstanceHistory();
     model.LoadModelDataFromActiveUserCache();
     return View(model);
 }
        public ActionResult ChangeDueDate(WorkListItemModel model, int instanceId)
        {
            string updateMsg = model.DelayWorklistItem();
            var newmodel = new WorkListItemModel();

            if (updateMsg == "true")
            {
                ShowSuccessMessage("Due Date Changed Successfully.");

            }
            else
            {
                ShowErrorMessage(updateMsg);
            }

            newmodel.InstanceId = instanceId;
            newmodel.ActiveWorkListItem.ForceRefresh();
            newmodel.LoadModelDataFromActiveUserCache();
            return View(newmodel);
        }
        public ActionResult ReleaseItem(WorkListItemModel model, int instanceId)
        {
            string updateMsg = model.ReleaseWorklistItem();

            if (updateMsg == "true")
            {
                ShowSuccessMessage("The Worklist Item has successfully been released.");
                return RedirectToAction("Details", "WorkflowTools", new { instanceId = model.InstanceId });
            }

            var newmodel = new WorkListItemModel();
            ShowErrorMessage(updateMsg);
            newmodel.InstanceId = instanceId;
            newmodel.ActiveWorkListItem.ForceRefresh();
            newmodel.LoadModelDataFromActiveUserCache();
            return View(newmodel);
        }
 public ActionResult ChangeDueDate(int instanceId)
 {
     var model = new WorkListItemModel {InstanceId = instanceId};
     model.LoadModelDataFromActiveUserCache();
     return View(model);
 }
        public ActionResult CancelItem(WorkListItemModel model, int instanceId)
        {
            string updateMsg = model.CancelWorklistItem();
            var newmodel = new WorkListItemModel();

            if (updateMsg == "true")
            {
                ShowSuccessMessage("The Worklist Item has successfully been cancelled.");
                return RedirectToAction("FindWorklistItem", "WorkflowTools");
            }

            ShowErrorMessage(updateMsg);

            newmodel.InstanceId = instanceId;
            newmodel.ActiveWorkListItem.ForceRefresh();
            newmodel.LoadModelDataFromActiveUserCache();
            return View(newmodel);
        }