public void Delete(int id) { bron pac = dbbron.bron.Where(c => c.id == id).FirstOrDefault(); dbbron.bron.DeleteOnSubmit(pac); dbbron.SubmitChanges(); }
public void Edit(int id, int idclienta, int idnomera, DateTime databroni, DateTime datazaezda, DateTime dataviezda) { bron pac = dbbron.bron.Where(c => c.id == id).FirstOrDefault(); pac.idclienta = idclienta; pac.idnomera = idnomera; pac.databroni = databroni; pac.datazaezda = datazaezda; pac.dataviezda = dataviezda; dbbron.SubmitChanges(); }
public void ADD(int idclienta, int idnomera, DateTime databroni, DateTime datazaezda, DateTime dataviezda) { bron pac = new bron(); pac.idclienta = idclienta; pac.idnomera = idnomera; pac.databroni = databroni; pac.datazaezda = datazaezda; pac.dataviezda = dataviezda; dbbron.bron.InsertOnSubmit(pac); dbbron.SubmitChanges(); }