Exemplo n.º 1
0
        public int AddChiMucTrinhDo(string levelName)
        {
            dtb_level x = new dtb_level();

            x.name = levelName;

            db.dtb_levels.InsertOnSubmit(x);
            db.SubmitChanges();

            return(x.id);
        }
Exemplo n.º 2
0
        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();
        }