public IActionResult prefix() { info_prefixModels prefix = new info_prefixModels(); ViewData["prefix"] = prefix.select_prefix(); return(View()); }
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")); }