示例#1
0
        public ActionResult ReadFromDb(FormCollection fc)
        {
            int gId = Convert.ToInt32(fc.GetValue("GraphId").AttemptedValue);

            GraphProblemDb.CurrentProblem.Graph = GraphProblemDb.GetGraph(gId);

            return(RedirectToAction("OutputEditGraph", GraphProblemDb.CurrentProblem.Graph));
        }
示例#2
0
        public ActionResult ShowResult(FormCollection fc)
        {
            GraphProblemDb.Update();
            int     problemId = Convert.ToInt32(fc.GetValue("ResultId").AttemptedValue);
            Problem selected  = GraphProblemDb.GetProblem(problemId);

            GraphProblemDb.CurrentProblem = selected;
            return(RedirectToAction("GraphListResult", "GraphListResult", GraphProblemDb.CurrentProblem));
        }
示例#3
0
 public ActionResult SaveToDb()
 {
     GraphProblemDb.AddProblem(GraphProblemDb.CurrentProblem);
     return(View("GraphListResult", GraphProblemDb.CurrentProblem));
 }
示例#4
0
 public ActionResult SaveToDb()
 {
     GraphProblemDb.AddGraph(GraphProblemDb.CurrentProblem.Graph);
     return(View("OutputEditGraph", GraphProblemDb.CurrentProblem.Graph));
 }
示例#5
0
 public OutputResultController()
 {
     GraphProblemDb.Update();
 }