예제 #1
0
        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);
        }
예제 #2
0
        public ActionResult JobProgress()
        {
            jProgress viewModel = new jProgress();

            //keep updating running progress
            loadJobs(viewModel);
            return(View(viewModel));
        }
예제 #3
0
        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);
        }