Esempio n. 1
0
        public ActionResult Summary(VTSummaryModel model, string buttontype)
        {
            if (ModelState.IsValid)
            {
                if (buttontype == "Go")
                {
                    model.Go = true;

                    List <VTFormObject> list_HeaderForm = new List <VTFormObject>(); // [i] Title, [i+1] Token

                    list_HeaderForm = logic.getSummaryInfo(model.SerialNumber, model.SwitchAllData, model.SwitchSubAssembly);

                    if (!(list_HeaderForm[0].return_num == "0"))
                    {
                        model.DisplayMessage = helper.checkErrors(list_HeaderForm[0].return_num, list_HeaderForm[0].error_message);
                    }
                    model.ListForm = list_HeaderForm;
                }

                else if (buttontype == "Clear")
                {
                    // Clears the screen and model
                    ModelState.Clear();
                    VTSummaryModel clear_model = new VTSummaryModel(); // Creates an empty model
                    return(View(clear_model));
                }
            }
            return(View(model));
        }
Esempio n. 2
0
        public ActionResult Summary()
        {
            VTSummaryModel model = new VTSummaryModel();

            return(View(model));
        }