public ActionResult AddExecutor(Guid id, string activityId) { ViewBag.DocumentId = id; var empls = _EmplService.GetPartialIntercompanyView(x => x.ApplicationUserId != null); WFTrackerTable tracker = _WorkflowTrackerService.FirstOrDefault(x => x.ActivityID == activityId && x.DocumentTableId == id); if (tracker.Users != null) { foreach (var empl in empls) { foreach (var user in tracker.Users) { if (empl.ApplicationUserId == user.UserId) { empl.isActiveDualList = true; } } } } return(View(empls)); }
public void CreateTrackerRecord(DocumentState step, Guid documentId, string bookmarkName, List <WFTrackerUsersTable> listUser, string currentUser, string activityId, bool useManual, int slaOffset, bool executionStep) { if ((step != DocumentState.Cancelled) && (step != DocumentState.Closed)) { WFTrackerTable trackerTable = _WorkflowTrackerService.FirstOrDefault(x => x.ActivityID == activityId && x.DocumentTableId == documentId); trackerTable.ActivityName = bookmarkName.Replace(keyForStep, ""); trackerTable.Users = listUser; trackerTable.TrackerType = TrackerType.Waiting; trackerTable.ManualExecutor = useManual; trackerTable.SLAOffset = slaOffset; trackerTable.ExecutionStep = executionStep; _WorkflowTrackerService.SaveDomain(trackerTable, currentUser); } }