public void Delete(MAutor c) { PAutor p = new PAutor(); List <MAutor> cs = p.Open(); for (int i = 0; i < cs.Count; i++) { if (cs[i].Id == c.Id) { cs.RemoveAt(i); break; } } p.Save(cs); }
public void Insert(MAutor c) { PAutor p = new PAutor(); List <MAutor> cs = p.Open(); int m = 0; foreach (MAutor x in cs) { if (x.Id > m) { m = x.Id; } } c.Id = m + 1; cs.Add(c); p.Save(cs); }
public void Insert(Autor g) { v = p.Open(); v.Add(g); p.Save(v); }