Esempio n. 1
0
        public void Remover(int id)
        {
            Entities.tb_enterprise remover = db.tb_enterprise.First(t => t.id_enterprise == id);

            db.tb_enterprise.Remove(remover);
            db.SaveChanges();
        }
Esempio n. 2
0
 public void Alterar(Entities.tb_enterprise enterprise)
 {
     Entities.tb_enterprise list = db.tb_enterprise.First(t => t.id_enterprise == enterprise.id_enterprise);
     list.ds_address        = list.ds_address;
     list.nr_cellphone      = list.nr_cellphone;
     list.nr_cep            = list.nr_cep;
     list.nr_identification = list.nr_identification;
     list.ds_email          = list.ds_email;
     list.ds_note           = list.ds_note;
     list.ds_state          = list.ds_state;
     list.nr_tellphone      = list.nr_tellphone;
     list.nm_commercialName = list.nm_commercialName;
     list.nm_enterprise     = list.nm_enterprise;
     db.SaveChanges();
 }
Esempio n. 3
0
        public void Inserir(Entities.tb_enterprise enterprise)
        {
            db.tb_enterprise.Add(enterprise);

            db.SaveChanges();
        }