Esempio n. 1
0
        public void Delete(string Name)
        {
            Oborud pac = db9.Oborud.Where(c => c.Name == Name).FirstOrDefault();

            db9.Oborud.DeleteOnSubmit(pac);
            db9.SubmitChanges();
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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();
        }