コード例 #1
0
        public ActionResult Index(WaterModels starter)
        {
            WaterModels twotank = new WaterModels();

            string vol_1      = "";
            string vol_2      = "";
            string vol_target = "";

            vol_1                = Request.Form["vol_1"];
            vol_2                = Request.Form["vol_2"];
            vol_target           = Request.Form["vol_target"];
            twotank.water1       = vol_1;
            twotank.water2       = vol_2;
            twotank.water_wanted = vol_target;

            ViewData["message"] = MvcHtmlString.Create(GetMyResult(int.Parse(vol_1), int.Parse(vol_2), int.Parse(vol_target)));
            return(View("Index", twotank));
        }
コード例 #2
0
        // GET: Watertank
        public ActionResult Index()
        {
            WaterModels twotank = new WaterModels();

            return(View(twotank));
        }