public IList <tbl_ChangePassword> GetChangePwdDetails()
        {
            IGenericDataRepository <tbl_ChangePassword> repository = new GenericDataRepository <tbl_ChangePassword>();
            IList <tbl_ChangePassword> lstChangePwd = repository.GetAll();

            return(lstChangePwd);
        }
Beispiel #2
0
        public void DeleteRoleMapping(int roleId)
        {
            IGenericDataRepository <tbl_Roles>             roleRepository = new GenericDataRepository <tbl_Roles>();
            IGenericDataRepository <tbl_RoleScreenMapping> roleScreenMappingRepository = new GenericDataRepository <tbl_RoleScreenMapping>();

            try
            {
                var rolesScreenMapping = roleRepository.GetAll(a => a.tbl_RoleScreenMapping).SingleOrDefault(a => a.RoleID == roleId);

                if (rolesScreenMapping != null)
                {
                    foreach (var roleScreen in rolesScreenMapping.tbl_RoleScreenMapping
                             .Where(at => at.RoleID == roleId).ToList())
                    {
                        roleScreen.EntityState = DA.DomainModel.EntityState.Deleted;
                        roleScreenMappingRepository.Remove(roleScreen);
                    }

                    rolesScreenMapping.EntityState = DA.DomainModel.EntityState.Deleted;
                    roleRepository.Remove(rolesScreenMapping);
                    //repository.SaveChanges();
                }
                //var roles = repository1.GetAll(b => b.tbl_Roles).SingleOrDefault(b => b.RoleID == roleId);
                //roles.EntityState = DA.DomainModel.EntityState.Deleted;
                //repository1.Remove(roles);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #3
0
 public IList <tbl_Applications> GetAllApplicationDetailsforMIS()//int? projectId
 {
     try
     {
         IGenericDataRepository <tbl_Applications> repository = new GenericDataRepository <tbl_Applications>();
         IList <tbl_Applications> lstApplications             = repository.GetAll();
         return(lstApplications);
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #4
0
        public IList <tbl_Roles> GetRoles(int?userId)
        {
            try
            {
                IGenericDataRepository <tbl_Roles> repository = new GenericDataRepository <tbl_Roles>();
                IList <tbl_Roles> lstRoles = repository.GetAll();

                return(lstRoles);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #5
0
        public IList <tbl_Clients> GetAllClientDetailsforMIS()
        {
            try
            {
                IGenericDataRepository <tbl_Clients> repository = new GenericDataRepository <tbl_Clients>();
                IList <tbl_Clients> lstClient = repository.GetAll();

                return(lstClient);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #6
0
        public IList <tbl_Region> GetAllRegionDetailsforMIS()
        {
            try
            {
                IGenericDataRepository <tbl_Region> repository = new GenericDataRepository <tbl_Region>();
                IList <tbl_Region> lstRegion = repository.GetAll();

                return(lstRegion);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #7
0
        public IList <tbl_Actions> GetActions()
        {
            try
            {
                IGenericDataRepository <tbl_Actions> repository = new GenericDataRepository <tbl_Actions>();
                IList <tbl_Actions> lstActions = repository.GetAll();

                return(lstActions);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #8
0
        public IList <tbl_UserData> GetUserDetails()
        {
            try
            {
                IGenericDataRepository <tbl_UserData> repository = new GenericDataRepository <tbl_UserData>();
                IList <tbl_UserData> lstUsrData = repository.GetAll();

                return(lstUsrData);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #9
0
        public IList <tbl_AppVersion> GetApplVersionDetails()
        {
            try
            {
                IGenericDataRepository <tbl_AppVersion> repository = new GenericDataRepository <tbl_AppVersion>();
                IList <tbl_AppVersion> lstAppVersion = repository.GetAll();

                return(lstAppVersion);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #10
0
        public IList <tbl_RoleScreenMapping> GetMappedScreenRoles()
        {
            try
            {
                IGenericDataRepository <tbl_RoleScreenMapping> repository = new GenericDataRepository <tbl_RoleScreenMapping>();
                IList <tbl_RoleScreenMapping> lstscreenRoles = repository.GetAll();

                return(lstscreenRoles);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #11
0
        public IList <tbl_PeriodType> GetSPeriodTypeDetails()
        {
            try
            {
                IGenericDataRepository <tbl_PeriodType> repository = new GenericDataRepository <tbl_PeriodType>();
                IList <tbl_PeriodType> lstPeriodType = repository.GetAll();

                return(lstPeriodType);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #12
0
        public IList <tbl_Reports> GetReports(int id)
        {
            try
            {
                IGenericDataRepository <tbl_Reports> repository = new GenericDataRepository <tbl_Reports>();
                IList <tbl_Reports> lstscreenRoles = repository.GetAll();

                return(lstscreenRoles);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #13
0
        public IList <tbl_UserData> GetUserDetails()//int userId
        {
            try
            {
                IGenericDataRepository <tbl_UserData> repository = new GenericDataRepository <tbl_UserData>();
                IList <tbl_UserData> lstUsrData = repository.GetAll();
                //IList<tbl_UserData> lstUsrData = repository.GetList(e => e.UserID.Equals(userId));

                return(lstUsrData);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public ApiResponse <IList <DTOCatPaquetesTuristicos> > GetPaquetesTuristicos()
        {
            ApiResponse <IList <DTOCatPaquetesTuristicos> > apiResponse = new ApiResponse <IList <DTOCatPaquetesTuristicos> >();

            try
            {
                GenericDataRepository <CatTiposDestino> tiposDestinoRepository = new GenericDataRepository <CatTiposDestino>();

                IList <CatTiposDestino> tiposDestinoList = tiposDestinoRepository.GetAll();

                IList <CatPaquetesTuristicos> paquetesTuristicosList = _repository.GetAll();

                apiResponse.Data = (from paquete in paquetesTuristicosList
                                    join tipoDestino in tiposDestinoList on paquete.IdTipoDestino equals tipoDestino.IdTipoDestino
                                    select new DTOCatPaquetesTuristicos
                {
                    IdPaqueteTuristico = paquete.IdPaqueteTuristico,
                    Nombre = paquete.Nombre,
                    Descripcion = paquete.Descripcion,
                    Imagen = paquete.Imagen,
                    IdTipoDestino = paquete.IdTipoDestino,
                    Promocionado = paquete.Promocionado,
                    TipoDestino = tipoDestino.Nombre
                }).ToList();

                if (apiResponse.Data != null)
                {
                    apiResponse.Result  = (int)ApiResult.Success;
                    apiResponse.Message = Resources.ConsultaExitosa;
                }

                else
                {
                    apiResponse.Result  = (int)ApiResult.Failure;
                    apiResponse.Message = Resources.ConsultaFallida;
                }
            }
            catch (Exception ex)
            {
                apiResponse.Result  = (int)ApiResult.Exception;
                apiResponse.Message = ex.Message;
            }

            return(apiResponse);
        }
Beispiel #15
0
 public IList <T> GetAll()
 {
     return(_repository.GetAll());
 }
 public IEnumerable <TranslationDto> GetAll()
 {
     return(_mapper.Map <List <TranslationDto> >(_translationRepo.GetAll()));
 }