Example #1
0
        public Spartane.Core.Classes.Detalle_Contactos_Empresa.Detalle_Contactos_EmpresaPagingModel ListaSelAll(int startRowIndex, int maximumRows, string Where, string Order)
        {
            var padstartRowIndex = _dataProvider.GetParameter();

            padstartRowIndex.ParameterName = "startRowIndex";
            padstartRowIndex.DbType        = DbType.Int32;
            padstartRowIndex.Value         = startRowIndex;

            var padmaximumRows = _dataProvider.GetParameter();

            padmaximumRows.ParameterName = "maximumRows";
            padmaximumRows.DbType        = DbType.Int32;
            padmaximumRows.Value         = maximumRows;

            var padWhere = _dataProvider.GetParameter();

            padWhere.ParameterName = "Where";
            padWhere.DbType        = DbType.String;
            padWhere.Value         = Where;

            var padOrder = _dataProvider.GetParameter();

            padOrder.ParameterName = "Order";
            padOrder.DbType        = DbType.String;
            padOrder.Value         = Order;

            var data = _dbContext.ExecuteStoredProcedureList <Spartane.Core.Classes.StoredProcedure.SpListSelAllDetalle_Contactos_Empresa>("sp_ListSelAll_Detalle_Contactos_Empresa", padWhere, padOrder, padstartRowIndex, padmaximumRows);

            Detalle_Contactos_EmpresaPagingModel result = null;

            if (data != null)
            {
                result = new Detalle_Contactos_EmpresaPagingModel
                {
                    Detalle_Contactos_Empresas =
                        data.Select(m => new Spartane.Core.Classes.Detalle_Contactos_Empresa.Detalle_Contactos_Empresa
                    {
                        Folio                 = m.Detalle_Contactos_Empresa_Folio
                        , Folio_Empresas      = m.Detalle_Contactos_Empresa_Folio_Empresas
                        , Nombre_completo     = m.Detalle_Contactos_Empresa_Nombre_completo
                        , Correo              = m.Detalle_Contactos_Empresa_Correo
                        , Telefono            = m.Detalle_Contactos_Empresa_Telefono
                        , Contacto_Principal  = m.Detalle_Contactos_Empresa_Contacto_Principal ?? false
                        , Area                = m.Detalle_Contactos_Empresa_Area
                        , Area_areas_Empresas = new Core.Classes.areas_Empresas.areas_Empresas()
                        {
                            Clave = m.Detalle_Contactos_Empresa_Area.GetValueOrDefault(), Nombre = m.Detalle_Contactos_Empresa_Area_Nombre
                        }
                        , Acceso_al_Sistema = m.Detalle_Contactos_Empresa_Acceso_al_Sistema ?? false
                        , Nombre_de_usuario = m.Detalle_Contactos_Empresa_Nombre_de_usuario
                        , Recibe_Alertas    = m.Detalle_Contactos_Empresa_Recibe_Alertas ?? false
                        , Estatus           = m.Detalle_Contactos_Empresa_Estatus
                        , Estatus_Estatus   = new Core.Classes.Estatus.Estatus()
                        {
                            Clave = m.Detalle_Contactos_Empresa_Estatus.GetValueOrDefault(), Descripcion = m.Detalle_Contactos_Empresa_Estatus_Descripcion
                        }

                        //,Id = m.Id
                    }).ToList()
                };
            }
            return(result);
        }
        public Spartane.Core.Domain.Detalle_Contactos_Empresa.Detalle_Contactos_EmpresaPagingModel ListaSelAll(int startRowIndex, int maximumRows, string Where, string Order)
        {
            Detalle_Contactos_EmpresaPagingModel result = null;

            return(result);
        }