public ActionResult JobProgress(jProgress viewModel) { ActionResult retAct; loadJobs(viewModel); switch (viewModel.cmd) { case "hello": testCall(); retAct = RedirectToAction("JobProgress"); break; case "deleteCalls": deleteCalls(); retAct = RedirectToAction("JobProgress"); break; case "deleteCalldones": deleteCalldones(); retAct = RedirectToAction("JobProgress"); break; default: retAct = View(viewModel); break; } return(retAct); }
public ActionResult JobProgress() { jProgress viewModel = new jProgress(); //keep updating running progress loadJobs(viewModel); return(View(viewModel)); }
private string loadJobs(jProgress viewModel) { string ret = ""; callExe ce = new callExe(); List <string> calls = ce.allCallsInprogress(); viewModel.callIds.Clear(); foreach (string aCall in calls) { viewModel.callIds.Add(aCall); } List <string> calldones = ce.allCalldones(); viewModel.callDoneTodays.Clear(); foreach (string aCalldone in calldones) { viewModel.callDoneTodays.Add(aCalldone); } return(ret); }