Example #1
0
        public ActionResult ProgramEvaluatorStage12(ProgramEvaluator1ViewModel model, FormCollection fc)
        {
            try
            {
                Stage1Service Stage1           = new Stage1Service();
                Data.ProgramEvaluatorStage1 S1 = Stage1.GetByID(model.ID);

                S1.Question4  = model.Question4;
                S1.Question5  = model.Question5;
                S1.Question6  = model.Question6;
                S1.Question7  = model.Question7;
                S1.Question8  = model.Question8;
                S1.Question9  = model.Question9;
                S1.Question10 = model.Question10;
                S1.Question11 = model.Question11;

                Stage1.Save(S1);

                return(RedirectToAction("ProgramEvaluatorStage13", S1));
            }
            catch
            {
                return(View(model));
            }
        }
Example #2
0
        public ActionResult ProgramEvaluatorStage15(ProgramEvaluator1ViewModel model, FormCollection fc)
        {
            try
            {
                Stage1Service Stage1           = new Stage1Service();
                Data.ProgramEvaluatorStage1 S1 = Stage1.GetByID(model.ID);

                S1.Question19 = "%" + model.Question19 + "%";
                S1.Question20 = "Low: " + model.Question20Low + " Moderate: " + model.Question20Moderate + " High: " + model.Question20High;

                Stage1.Save(S1);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View(model));
            }
        }
Example #3
0
        public ActionResult ProgramEvaluatorStage14(ProgramEvaluator1ViewModel model, FormCollection fc)
        {
            try
            {
                Stage1Service Stage1           = new Stage1Service();
                Data.ProgramEvaluatorStage1 S1 = Stage1.GetByID(model.ID);

                S1.Question16 = fc["Question16"];

                int i = 1;
                foreach (AnswerModel item in model.Question17)
                {
                    if (fc.Get("Question17.AnswerCheck" + i) != "false")
                    {
                        S1.Question17 += item.Value + "; ";
                    }
                    i++;
                }
                if (fc["Question17Other"] != null)
                {
                    S1.Question17 += fc["Question17Other"];
                }


                if (fc["Question18"].Contains("Other"))
                {
                    S1.Question18 = "Other: " + fc["Question18Other"];
                }
                else
                {
                    S1.Question18 = fc["Question18"];
                }

                Stage1.Save(S1);

                return(RedirectToAction("ProgramEvaluatorStage15", S1));
            }
            catch
            {
                return(View(model));
            }
        }
Example #4
0
        public ActionResult ProgramEvaluatorStage1(ProgramEvaluator1ViewModel model, FormCollection fc)
        {
            try
            {
                Stage1Service Stage1           = new Stage1Service();
                Data.ProgramEvaluatorStage1 S1 = new Data.ProgramEvaluatorStage1();

                S1.UserID           = CurrentUserID;
                S1.DateTimeTakenUTC = DateTime.UtcNow;

                S1.Question1 = model.Question1;
                S1.Question2 = model.Question2;
                S1.Question3 = model.Question3;

                Stage1.Save(S1);

                return(RedirectToAction("ProgramEvaluatorStage12", S1));
            }
            catch
            {
                return(View(model));
            }
        }
Example #5
0
        public ActionResult ProgramEvaluatorStage13(ProgramEvaluator1ViewModel model, FormCollection fc)
        {
            try
            {
                Stage1Service Stage1           = new Stage1Service();
                Data.ProgramEvaluatorStage1 S1 = Stage1.GetByID(model.ID);

                S1.Question12 = fc["Question12"];
                S1.Question13 = fc["Question13"];

                if (fc["Question14"].Contains("Other"))
                {
                    S1.Question14 = "Other: " + fc["Question14Other"];
                }
                else
                {
                    S1.Question14 = fc["Question14"];
                }

                if (fc["Question15"].Contains("Other"))
                {
                    S1.Question15 = "Other: " + fc["Question15Other"];
                }
                else
                {
                    S1.Question15 = fc["Question15"];
                }

                Stage1.Save(S1);

                return(RedirectToAction("ProgramEvaluatorStage14", S1));
            }
            catch
            {
                return(View(model));
            }
        }
Example #6
0
        public ActionResult ProgramEvaluatorStage15(ProgramEvaluator1ViewModel model, FormCollection fc)
        {
            try
            {

                Stage1Service Stage1 = new Stage1Service();
                Data.ProgramEvaluatorStage1 S1 = Stage1.GetByID(model.ID);

                S1.Question19 = "%" + model.Question19 + "%";
                S1.Question20 = "Low: " + model.Question20Low + " Moderate: " + model.Question20Moderate + " High: " + model.Question20High;

                Stage1.Save(S1);

                return RedirectToAction("Index");
            }
            catch
            {
                return View(model);
            }
        }
Example #7
0
        public ActionResult ProgramEvaluatorStage14(ProgramEvaluator1ViewModel model, FormCollection fc)
        {
            try
            {

                Stage1Service Stage1 = new Stage1Service();
                Data.ProgramEvaluatorStage1 S1 = Stage1.GetByID(model.ID);

                S1.Question16 = fc["Question16"];

                int i = 1;
                foreach (AnswerModel item in model.Question17)
                {
                    if (fc.Get("Question17.AnswerCheck" + i) != "false")
                    {
                        S1.Question17 += item.Value + "; ";
                    }
                    i++;
                }
                if (fc["Question17Other"] != null)
                {
                    S1.Question17 += fc["Question17Other"];
                }

                if (fc["Question18"].Contains("Other"))
                    S1.Question18 = "Other: " + fc["Question18Other"];
                else S1.Question18 = fc["Question18"];

                Stage1.Save(S1);

                return RedirectToAction("ProgramEvaluatorStage15", S1);
            }
            catch
            {
                return View(model);
            }
        }
Example #8
0
        public ActionResult ProgramEvaluatorStage13(ProgramEvaluator1ViewModel model, FormCollection fc)
        {
            try
            {
                Stage1Service Stage1 = new Stage1Service();
                Data.ProgramEvaluatorStage1 S1 = Stage1.GetByID(model.ID);

                S1.Question12 = fc["Question12"];
                S1.Question13 = fc["Question13"];

                if (fc["Question14"].Contains("Other"))
                    S1.Question14 = "Other: " + fc["Question14Other"];
                else S1.Question14 = fc["Question14"];

                if (fc["Question15"].Contains("Other"))
                    S1.Question15 = "Other: " + fc["Question15Other"];
                else S1.Question15 = fc["Question15"];

                Stage1.Save(S1);

                return RedirectToAction("ProgramEvaluatorStage14", S1);
            }
            catch
            {
                return View(model);
            }
        }
Example #9
0
        public ActionResult ProgramEvaluatorStage12(ProgramEvaluator1ViewModel model, FormCollection fc)
        {
            try
            {
                Stage1Service Stage1 = new Stage1Service();
                Data.ProgramEvaluatorStage1 S1 = Stage1.GetByID(model.ID);

                S1.Question4 = model.Question4;
                S1.Question5 = model.Question5;
                S1.Question6 = model.Question6;
                S1.Question7 = model.Question7;
                S1.Question8 = model.Question8;
                S1.Question9 = model.Question9;
                S1.Question10 = model.Question10;
                S1.Question11 = model.Question11;

                Stage1.Save(S1);

                return RedirectToAction("ProgramEvaluatorStage13", S1);
            }
            catch
            {
                return View(model);
            }
        }
Example #10
0
        public ActionResult ProgramEvaluatorStage1(ProgramEvaluator1ViewModel model, FormCollection fc)
        {
            try
            {

                Stage1Service Stage1 = new Stage1Service();
                Data.ProgramEvaluatorStage1 S1 = new Data.ProgramEvaluatorStage1();

                S1.UserID = CurrentUserID;
                S1.DateTimeTakenUTC = DateTime.UtcNow;

                S1.Question1 = model.Question1;
                S1.Question2 = model.Question2;
                S1.Question3 = model.Question3;

                Stage1.Save(S1);

                return RedirectToAction("ProgramEvaluatorStage12", S1);
            }
            catch
            {
                return View(model);
            }
        }