public void del_tm(string id) { typeMaterialModel tm = new typeMaterialModel(); tm.tm_id = id; tm.del_type_material(); }
public string select_tm(string id) { typeMaterialModel tm = new typeMaterialModel(); tm.select_type_material("tm_id = '" + id + "'"); return(tm.tm_name); }
public IActionResult insert_tm(string tm_name) { typeMaterialModel tm = new typeMaterialModel(); tm.tm_name = tm_name; tm.insert_type_material(); return(RedirectToAction("typeMaterial", "Information")); }
public IActionResult typeMaterial() { typeMaterialModel tm = new typeMaterialModel(); ViewData["type_material"] = tm.list_type_material(); return(View()); }
public IActionResult update_tm(string tm_name_edit, string tm_id) { typeMaterialModel tm = new typeMaterialModel(); tm.tm_id = tm_id; tm.tm_name = tm_name_edit; tm.update_type_material(); return(RedirectToAction("typeMaterial", "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()); }