示例#1
0
 public void adicionarImagemAoImovel(imovel imo)
 {
     using (ImobGentilEntities db = new ImobGentilEntities())
     {
         db.Entry(imo).State = System.Data.EntityState.Modified;
         db.SaveChanges();
     }
 }
示例#2
0
 public void adicionarImovel(imovel imo)
 {
     using (ImobGentilEntities db = new ImobGentilEntities())
     {
         db.imovel.Add(imo);
         db.SaveChanges();
     }
 }
示例#3
0
 public void modificarStatusImovelPublicacao(imovel imo)
 {
     using (ImobGentilEntities db = new ImobGentilEntities())
     {
         try
         {
             db.Entry(imo).State = System.Data.EntityState.Modified;
             db.SaveChanges();
         }
         catch (Exception)
         {
             throw;
         }
     }
 }
示例#4
0
        public bool verificarDisponibilidadeImovel(string horario, DateTime data, int iddoimovel)
        {
            imovel imo = new imovel();

            using (ImobGentilEntities db = new ImobGentilEntities())
            {
                imo = (from vis in db.visita
                       where vis.data == data && vis.hora == horario && vis.idimovel == iddoimovel
                       join i in db.imovel
                       on iddoimovel equals i.id
                       select i).FirstOrDefault();
            }
            if (imo == null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }