public void Delete(string Name) { Oborud pac = db9.Oborud.Where(c => c.Name == Name).FirstOrDefault(); db9.Oborud.DeleteOnSubmit(pac); db9.SubmitChanges(); }
public void Edit(int ID, string Name, int Cena, int IDPostav, string Ed) { Oborud pac = db9.Oborud.Where(c => c.ID == ID).FirstOrDefault(); pac.Name = Name; pac.Cena = Cena; pac.Ed = Ed; pac.IDPostav = IDPostav; db9.SubmitChanges(); }
public void ADD(string Name, int Cena, int IDPostav, string Ed) { Oborud pac = new Oborud(); pac.Name = Name; pac.Cena = Cena; pac.Ed = Ed; pac.IDPostav = IDPostav; db9.Oborud.InsertOnSubmit(pac); db9.SubmitChanges(); }