示例#1
0
        public interesse selecionarInteresseComID(int id)
        {
            interesse inte = new interesse();

            using (ImobGentilEntities db = new ImobGentilEntities())
            {
                inte = (from vi in db.interesse
                        where vi.id == id
                        select vi).FirstOrDefault();
            }
            return(inte);
        }
示例#2
0
 public void modificarStatusInteresse(interesse inte)
 {
     using (ImobGentilEntities db = new ImobGentilEntities())
     {
         try
         {
             db.Entry(inte).State = System.Data.EntityState.Modified;
             db.SaveChanges();
         }
         catch (Exception)
         {
             throw;
         }
     }
 }
示例#3
0
 public void AdicionarInteresse(interesse inte)
 {
     try
     {
         using (ImobGentilEntities db = new ImobGentilEntities())
         {
             db.interesse.Add(inte);
             db.SaveChanges();
         }
     }
     catch (Exception e)
     {
         throw e;
         //MessageBox.Show(e.Message);
     }
 }