public int AddChiMucTrinhDo(string levelName) { dtb_level x = new dtb_level(); x.name = levelName; db.dtb_levels.InsertOnSubmit(x); db.SubmitChanges(); return(x.id); }
public void DeleteChiMucTrinhDo(int id) { dtb_level f = db.dtb_levels.Where(s => s.id == id).Single(); if (f == null) { return; } db.dtb_levels.DeleteOnSubmit(f); db.SubmitChanges(); }