Example #1
0
 public bool f_eliminar_Reserva_Master_CopadaTotalmenteDA(int idMaster)
 {
     try
     {
         bool ver = false;
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             var query = (from x in contexto.DIO_PUB_T_RESERVA_MASTER
                          join y in contexto.DIO_PUB_T_RESERVA on x.reser_mast_c_iid equals y.reser_mast_c_iid
                          where y.esp_ocu_est_c_iid == 2 && y.reser_c_bactivo == true && x.reser_mast_c_iid == idMaster
                          select x).FirstOrDefault();
             if (query == null)
             {
                 var queryMaster = (from x in contexto.DIO_PUB_T_RESERVA_MASTER
                                    where x.reser_mast_c_iid == idMaster
                                    select x).FirstOrDefault();
                 ver = true;
                 queryMaster.reser_mast_c_bactivo = false;
                 contexto.SaveChanges();
             }
         }
         return(ver);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public List <LISTA_INMUEBLES_COLABORADOR_Result> ListarInmueblesPorColaboradorDA(string codigoColaborador, int icodPerfil)
 {
     using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
     {
         return(contexto.SP_ADV_OBTENER_LISTA_INMUEBLES_COLABORADOR(codigoColaborador, icodPerfil).ToList());
     }
 }
Example #3
0
        public DIO_PUB_T_MARCA f_seleccionar_o_registrar_marcaDA(string vnomb_marca, string vusu_red, string nombrecompleto)
        {
            try
            {
                using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
                {
                    var query = (from x in contexto.DIO_PUB_T_MARCA
                                 where x.marc_c_bactivo == true && x.marc_c_vnomb.ToUpper() == vnomb_marca.ToUpper()
                                 select x).FirstOrDefault();

                    if (query != null)
                    {
                        return(query);
                    }
                    else
                    {
                        DIO_PUB_T_MARCA obj = new DIO_PUB_T_MARCA();
                        obj.marc_c_vnomb              = vnomb_marca.ToUpper();
                        obj.marc_c_bactivo            = true;
                        obj.bita_c_zfec_reg           = DateTime.Today;
                        obj.bita_c_vusu_red_reg       = vusu_red;
                        obj.bita_c_vnomb_completo_reg = nombrecompleto;
                        contexto.AddToDIO_PUB_T_MARCA(obj);
                        contexto.SaveChanges();
                        return(f_seleccionar_o_registrar_marcaDA(vnomb_marca, vusu_red, nombrecompleto));
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #4
0
 public string f_guardar_reserva_detalleDA(int idCabecera, int id_espacio, int tipo_periodo, string fechaDesde
                                           , string fechaHasta, string grupoFechasIntermitente, string nombcompletoreg, string usuario_cusured, string ejec_cdoc)
 {
     try
     {
         ObjectParameter ps_fechasNoRegistradas = new ObjectParameter("ps_fechasNoRegistradas", typeof(string));
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             contexto.SP_PUB_RESERVA_DET_INSERTAR(
                 idCabecera,
                 id_espacio,
                 tipo_periodo,
                 fechaDesde,
                 fechaHasta,
                 grupoFechasIntermitente,
                 ejec_cdoc,
                 usuario_cusured,
                 nombcompletoreg,
                 ps_fechasNoRegistradas
                 );
         }
         return(ps_fechasNoRegistradas.Value.ToString());
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #5
0
 public List <DIO_PUB_T_MARCA> f_ListarMarcaDA()
 {
     using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
     {
         return((from x in contexto.DIO_PUB_T_MARCA
                 where x.marc_c_bactivo == true
                 select x).ToList());
     }
 }
Example #6
0
 public ADV_T_CLIENTE f_seleccionar_clienteDA(string vraz_social)
 {
     using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
     {
         return((from x in contexto.ADV_T_CLIENTE
                 where x.cli_c_bactivo == true && x.cli_c_vraz_soc.ToUpper() == vraz_social.ToUpper()
                 select x).FirstOrDefault());
     }
 }
 public List <ADV_T_CLIENTE> f_ListarClientesDA()
 {
     using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
     {
         return((from x in contexto.ADV_T_CLIENTE
                 where x.cli_c_bactivo == true
                 select x).ToList());
     }
 }
 public List <ADV_T_INMUEBLE> ListarInmueblesRealPlazaDA()
 {
     using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
     {
         return((from x in contexto.ADV_T_INMUEBLE
                 where x.inm_c_bactivo == true && x.inm_c_vnomb.Contains("ReaL Plaza")
                 select x).ToList());
     }
 }
 public List <DIO_PUB_T_ESPACIO_OCUP_ESTADO> f_ListarEstadoEspacioPublicitarioDA()
 {
     using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
     {
         return((from x in contexto.DIO_PUB_T_ESPACIO_OCUP_ESTADO
                 select x
                 ).ToList());
     }
 }
Example #10
0
 public DIO_PUB_T_RESERVA f_reserva_seleccionar_xidDA(int idreserva)
 {
     using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
     {
         return((from x in contexto.DIO_PUB_T_RESERVA
                 where x.reser_c_iid == idreserva
                 select x).FirstOrDefault());
     }
 }
Example #11
0
 public ADV_T_CLIENTE f_seleccionar_agenciaDA(string vraz_social)
 {
     using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
     {
         return((from x in contexto.DIO_PUB_T_AGENCIA
                 join y in contexto.ADV_T_CLIENTE on x.agen_c_vdoc_id equals y.cli_c_vdoc_id
                 where x.agen_c_bactivo == true && y.cli_c_bactivo == true && y.cli_c_vraz_soc.ToUpper() == vraz_social.ToUpper()
                 select y).FirstOrDefault());
     }
 }
Example #12
0
 public List <ADV_T_CLIENTE> f_ListarAgenciaDA()
 {
     using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
     {
         return((from x in contexto.DIO_PUB_T_AGENCIA
                 join y in contexto.ADV_T_CLIENTE on x.agen_c_vdoc_id equals y.cli_c_vdoc_id
                 where x.agen_c_bactivo == true && y.cli_c_bactivo == true
                 select y).ToList());
     }
 }
 public List <DIO_SP_PUB_APROB_RESERVA_LISTAR_Result> f_ListarAprobacionesReservaDA(string ps_inmueble, string ps_cliente, string ps_ejecutivo)
 {
     try
     {
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             return(contexto.DIO_SP_PUB_APROB_RESERVA_LISTAR(ps_inmueble, ps_cliente, ps_ejecutivo).ToList());
         }
     }
     catch { throw; }
 }
 public List <DIO_SP_PUB_RESERVA_PENDIENTE_XEJECUTIVO_LISTAR_Result> f_ListarReservasPendientesXEjecutivoDA(string ps_inmueble, string ps_cliente, string ps_ejecutivo)
 {
     try
     {
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             return(contexto.DIO_SP_PUB_RESERVA_PENDIENTE_XEJECUTIVO_LISTAR(ps_inmueble, ps_cliente, ps_ejecutivo).ToList());
         }
     }
     catch { throw; }
 }
Example #15
0
 public List <SP_PUB_RESERVA_XIDMASTER_LISTAR_Result> f_listar_reservas_xidmasterDA(int reser_mast_c_iid)
 {
     try
     {
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             return(contexto.SP_PUB_RESERVA_XIDMASTER_LISTAR(reser_mast_c_iid).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 public List <DIO_SP_PUB_REPORTE_ESPACIOS_PUBLICITARIOS_Result> f_ListarReporteEspaciosPublicitariosDA(string ps_inmueble, string ps_ejecutivo, Int32 ps_tipoProducto, Int32 ps_estado)
 {
     try
     {
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             return(contexto.DIO_SP_PUB_REPORTE_ESPACIOS_PUBLICITARIOS(ps_inmueble, ps_ejecutivo, ps_estado, ps_tipoProducto).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #17
0
 public List <DIO_PUB_T_TIPO_ASIGNACION> f_listar_pub_tipo_asignacionDA()
 {
     try
     {
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             return((from x in contexto.DIO_PUB_T_TIPO_ASIGNACION
                     where x.tip_asig_c_bactivo == true
                     orderby x.tip_asig_c_iid ascending
                     select x).ToList());
         }
     }
     catch { throw; }
 }
Example #18
0
 public List <ADV_T_PUB_ELEMENTO_ACTIVACION> f_listar_elementoActivacionXProductoDA(int producto)
 {
     try
     {
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             return((from x in contexto.ADV_T_PUB_ELEMENTO_ACTIVACION
                     where x.pub_elem_act_c_bactivo == true && x.pub_prod_c_iid == producto
                     orderby x.pub_elem_act_c_iid ascending
                     select x).ToList());
         }
     }
     catch { throw; }
 }
Example #19
0
 public List <ADV_T_PUB_PRODUCTO> f_listar_pub_productosDA()
 {
     try
     {
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             return((from x in contexto.ADV_T_PUB_PRODUCTO
                     where x.pub_prod_c_bactivo == true
                     orderby x.pub_prod_c_iid ascending
                     select x).ToList());
         }
     }
     catch { throw; }
 }
Example #20
0
 /// <summary>
 /// Descripción: Obtiene HTML configuracion de requisitos
 /// Autor: Jair Tasayco Bautista
 /// Fecha y Hora Creación: 2017-03-10
 /// Modificado: --
 /// Fecha y hora Modificación: --
 /// </summary>
 /// <param name="reser_mast_c_iid"></param>
 /// <returns></returns>
 public IList <DIO_SP_REQUISITO_PUBLICIDAD_LISTAR_Result> f_ListarConfiguracionRequisitosDA()
 {
     try
     {
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             return(contexto.DIO_SP_REQUISITO_PUBLICIDAD_LISTAR().ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 public void f_reserva_venderDA(DIO_PUB_T_RESERVA obj)
 {
     try
     {
         using (BD_DIONISIOEntities c = new BD_DIONISIOEntities())
         {
             c.SP_PUB_RESERVA_VENDER(obj.reser_c_iid, obj.pub_esp_c_iid, obj.reser_mast_c_fac_bagencia, obj.reser_c_eprecio_alquiler);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #22
0
 public List <DIO_SP_PUB_RESERVA_PENDIENTE_XID_MASTER_Result> f_listar_reservas_pendientes_xidmasterDA(int idmaster)
 {
     try
     {
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             return(contexto.DIO_SP_PUB_RESERVA_PENDIENTE_XID_MASTER(
                        idmaster).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #23
0
 public List <DIO_SP_PUB_RESERVA_DET_LISTAR_Result> f_listar_detallexReservaDA(int idreserva)
 {
     try
     {
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             return(contexto.DIO_SP_PUB_RESERVA_DET_LISTAR(
                        idreserva).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #24
0
 public void f_modificar_Prioridad_ReservaDA(int idReservaAfecto)
 {
     try
     {
         using (BD_DIONISIOEntities c = new BD_DIONISIOEntities())
         {
             c.SP_PUB_RESERVA_PRIORIDAD_MODIFICAR(
                 idReservaAfecto
                 );
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #25
0
 public string f_diaUtilVencimientoDA(int pi_diaUtil)
 {
     try
     {
         ObjectParameter pd_dia_util = new ObjectParameter("dia_util", typeof(string));
         using (BD_DIONISIOEntities c = new BD_DIONISIOEntities())
         {
             c.SP_ADV_DIA_UTIL_SELECCIONAR(pi_diaUtil, pd_dia_util);
         }
         return(pd_dia_util.Value.ToString());
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #26
0
 public void f_eliminar_espacios_guardadosDA(string codigo_espacios, int id_reserva_master)
 {
     try
     {
         using (BD_DIONISIOEntities c = new BD_DIONISIOEntities())
         {
             c.DIO_SP_PUB_RESERVA_XSELECCION_DESACTIVAR(
                 codigo_espacios,
                 id_reserva_master
                 );
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #27
0
 public IList <SP_PUB_RESERVA_LISTA_NO_DISPONIBLE_Result> f_obtenerReservaEspaciosNoDisponiblesDA(string cadena_espacios_sw, DateTime fechaDesde, DateTime fechaHasta)
 {
     try
     {
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             return(contexto.SP_PUB_RESERVA_LISTA_NO_DISPONIBLE(
                        fechaDesde,
                        fechaHasta,
                        cadena_espacios_sw).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #28
0
 public int f_EspacioReservadoDA(int pub_esp_c_iid)
 {
     try
     {
         ObjectParameter id_result = new ObjectParameter("id_result", typeof(string));
         using (BD_DIONISIOEntities c = new BD_DIONISIOEntities())
         {
             c.DIO_SP_CONSULTA_ESPACIO_RESERVADO(
                 pub_esp_c_iid, id_result
                 );
         }
         return(Convert.ToInt16(id_result.Value));
     }
     catch (Exception)
     {
         return(-1);
     }
 }
Example #29
0
 public List <SP_PUB_RESERVA_DETALLE_XIDESPACIO_LISTAR_Result> f_listar_detalle_ocupacionXelementoEspacioDA(int idespacio,
                                                                                                            int idelemento, DateTime fechaDesde, DateTime fechaHasta)
 {
     try
     {
         using (BD_DIONISIOEntities contexto = new BD_DIONISIOEntities())
         {
             return(contexto.SP_PUB_RESERVA_DETALLE_XIDESPACIO_LISTAR(
                        idespacio,
                        idelemento,
                        fechaDesde,
                        fechaHasta).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #30
0
 public int f_cerrar_ReservaDA(int idMaster)
 {
     try
     {
         ObjectParameter id_result = new ObjectParameter("id_result", typeof(string));
         using (BD_DIONISIOEntities c = new BD_DIONISIOEntities())
         {
             c.SP_PUB_RESERVA_CERRAR(
                 idMaster
                 , id_result
                 );
         }
         return(Convert.ToInt16(id_result.Value));
     }
     catch (Exception)
     {
         throw;
     }
 }