public void Delete(string Name) { Postavshik pac = db10.Postavshik.Where(c => c.Name == Name).FirstOrDefault(); db10.Postavshik.DeleteOnSubmit(pac); db10.SubmitChanges(); }
public void Edit(int ID, string Name, string Email, string Adres, string Telefon) { Postavshik pac = db10.Postavshik.Where(c => c.ID == ID).FirstOrDefault(); pac.Name = Name; pac.Email = Email; pac.Adres = Adres; pac.Telefon = Telefon; db10.SubmitChanges(); }
public void ADD(string Name, string Email, string Adres, string Telefon) { Postavshik pac = new Postavshik(); pac.Name = Name; pac.Email = Email; pac.Adres = Adres; pac.Telefon = Telefon; db10.Postavshik.InsertOnSubmit(pac); db10.SubmitChanges(); }