Beispiel #1
0
        public IActionResult prefix()
        {
            info_prefixModels prefix = new info_prefixModels();

            ViewData["prefix"] = prefix.select_prefix();
            return(View());
        }
Beispiel #2
0
        public IActionResult insert_prefix(string prefix_th, string prefix_en)
        {
            info_prefixModels prefix = new info_prefixModels();

            ViewData["prefix"] = prefix.select_prefix();
            prefix.name_th     = prefix_th;
            prefix.name_en     = prefix_en;
            prefix.submit_date = DateTime.Now.ToString();
            prefix.admin_id    = "1";
            prefix.insert_prefix();

            ViewBag.message = "บันทึกข้อมูลเรียบร้อยแล้ว!";

            return(RedirectToAction("prefix", "Information"));
        }