public IActionResult insert_gm(string gm_name, string gm_type, string gm_unit) { groupMaterialModel gm = new groupMaterialModel(); gm.create_code(); gm.gm_name = gm_name; gm.gm_ref_type_material = gm_type; gm.gm_ref_unit = gm_unit; gm.insert_gm(); return(RedirectToAction("groupMaterial", "Information")); }
public IActionResult groupMaterial() { groupMaterialModel gm = new groupMaterialModel(); ViewData["gm"] = gm.list_gm(); gm.create_code(); ViewData["gm_code"] = gm.gm_code; typeMaterialModel tm = new typeMaterialModel(); ViewData["tm"] = tm.drop_type_material(""); unitModel ut = new unitModel(); ViewData["unit"] = ut.drop_unit(""); return(View()); }