示例#1
0
        public visita selecionarVisitaComID(int id)
        {
            visita vis = new visita();

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