Пример #1
0
        public void Delete(int id)
        {
            bron pac = dbbron.bron.Where(c => c.id == id).FirstOrDefault();

            dbbron.bron.DeleteOnSubmit(pac);
            dbbron.SubmitChanges();
        }
Пример #2
0
        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();
        }
Пример #3
0
        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();
        }