public void Edit(int ID, int IDPacienta, int IDRaspisania, int IDUslugi, string Data) { Zapis pac = db16.Zapis.Where(c => c.ID == ID).FirstOrDefault(); pac.IDPacienta = IDPacienta; pac.IDRaspisania = IDRaspisania; pac.IDUslugi = IDUslugi; pac.Data = Data; db16.SubmitChanges(); }
public void ADD(int IDPacienta, int IDRaspisania, int IDUslugi, string Data) { Zapis pac = new Zapis(); pac.IDPacienta = IDPacienta; pac.IDRaspisania = IDRaspisania; pac.IDUslugi = IDUslugi; pac.Data = Data; db16.Zapis.InsertOnSubmit(pac); db16.SubmitChanges(); }
public void Delete(int ID) { Zapis pac = db16.Zapis.Where(c => c.ID == ID).FirstOrDefault(); db16.Zapis.DeleteOnSubmit(pac); db16.SubmitChanges(); }