Esempio n. 1
0
        public tbl_ChangePassword FindChangePwdUserName(string userName)
        {
            IGenericDataRepository <tbl_ChangePassword> repository = new GenericDataRepository <tbl_ChangePassword>();
            tbl_ChangePassword tblChangePassword = repository.GetSingle(c => c.UserName.ToUpper() == userName.ToUpper());

            return(tblChangePassword);
        }
        public TranslationDto GetSingle(Expression <Func <TranslationDto, bool> > where,
                                        params Expression <Func <TranslationDto, object> >[] navigationProperties)
        {
            var where2  = _mapper.Map <Func <Translation, bool> >(where);
            var navProp = _mapper.Map <Expression <Func <Translation, object> >[]>(navigationProperties);

            return(_mapper.Map <TranslationDto>(_translationRepo.GetSingle(where2, navProp)));
        }
Esempio n. 3
0
 public tbl_Region FindRegionName(string regionName)
 {
     try
     {
         IGenericDataRepository <tbl_Region> repository = new GenericDataRepository <tbl_Region>();
         tbl_Region tblRegion = repository.GetSingle(c => c.Region.ToUpper() == regionName.ToUpper());
         return(tblRegion);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 4
0
 public tbl_ChangePassword FindChangePwdDetails(int?changePwdId)
 {
     try
     {
         IGenericDataRepository <tbl_ChangePassword> repository = new GenericDataRepository <tbl_ChangePassword>();
         tbl_ChangePassword changePwd = repository.GetSingle(c => c.UserID == changePwdId);
         return(changePwd);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Esempio n. 5
0
 public tbl_Module FindModuleName(string modName, int applicationId)
 {
     try
     {
         IGenericDataRepository <tbl_Module> repository = new GenericDataRepository <tbl_Module>();
         tbl_Module module = repository.GetSingle(m => m.ModuleName.ToUpper() == modName.ToUpper() && m.ApplicationId == applicationId);
         return(module);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 6
0
 public tbl_Attribute FindAttribDesc(string attributeDesc, int daid)
 {
     try
     {
         IGenericDataRepository <tbl_Attribute> repository = new GenericDataRepository <tbl_Attribute>();
         tbl_Attribute tblattribDesc = repository.GetSingle(b => b.AttributeDesc.ToUpper() == attributeDesc.ToUpper() && b.daId == daid);
         return(tblattribDesc);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 7
0
 public tbl_DesignAccelerator FindDA(int?DAID)
 {
     try
     {
         IGenericDataRepository <tbl_DesignAccelerator> repository = new GenericDataRepository <tbl_DesignAccelerator>();
         tbl_DesignAccelerator DA = repository.GetSingle(c => c.daid == DAID);
         return(DA);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 8
0
 public tbl_FrequencyType FindFrequencyTypes(int?FreqTypeID)
 {
     try
     {
         IGenericDataRepository <tbl_FrequencyType> repository = new GenericDataRepository <tbl_FrequencyType>();
         tbl_FrequencyType tblFrequencyTypes = repository.GetSingle(b => b.FreqTypeID == FreqTypeID);
         return(tblFrequencyTypes);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 9
0
 public tbl_Roles FindRoleName(string roleName)
 {
     try
     {
         IGenericDataRepository <tbl_Roles> repository = new GenericDataRepository <tbl_Roles>();
         tbl_Roles tblRole = repository.GetSingle(c => c.RoleName.ToUpper() == roleName.ToUpper());
         return(tblRole);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 10
0
 public tbl_Applications FindApplication(int?applicationID)
 {
     try
     {
         IGenericDataRepository <tbl_Applications> repository = new GenericDataRepository <tbl_Applications>();
         tbl_Applications application = repository.GetSingle(c => c.ApplicationID == applicationID);
         return(application);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 11
0
 public tbl_Clients FindClientName(string clientName)
 {
     try
     {
         IGenericDataRepository <tbl_Clients> repository = new GenericDataRepository <tbl_Clients>();
         tbl_Clients tblclientName = repository.GetSingle(c => c.ClientName.ToUpper() == clientName.ToUpper());
         return(tblclientName);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 12
0
 public tbl_Clients FindClient(int?clientID)
 {
     try
     {
         IGenericDataRepository <tbl_Clients> repository = new GenericDataRepository <tbl_Clients>();
         tbl_Clients client = repository.GetSingle(c => c.ClientID == clientID);
         return(client);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 13
0
 public tbl_Transactions FindTransaction(int?TransactionSeq)
 {
     try
     {
         IGenericDataRepository <tbl_Transactions> repository = new GenericDataRepository <tbl_Transactions>();
         tbl_Transactions tblTransactions = repository.GetSingle(b => b.TransactionSeq == TransactionSeq);
         return(tblTransactions);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 14
0
 public tbl_Projects FindProjectName(string projectName, int clientId, int regionId)
 {
     try
     {
         IGenericDataRepository <tbl_Projects> repository = new GenericDataRepository <tbl_Projects>();
         tbl_Projects Project = repository.GetSingle(c => c.ProjectName.ToUpper() == projectName.ToUpper() && c.ClientId == clientId && c.RegionId == regionId);
         return(Project);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 15
0
 public tbl_Roles FindRoles(int?roleId)
 {
     try
     {
         IGenericDataRepository <tbl_Roles> repository = new GenericDataRepository <tbl_Roles>();
         tbl_Roles roles = repository.GetSingle(c => c.RoleID == roleId);
         return(roles);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 16
0
 public tbl_BuzProd FindBuzProd(int?buzProdID)
 {
     try
     {
         IGenericDataRepository <tbl_BuzProd> repository = new GenericDataRepository <tbl_BuzProd>();
         tbl_BuzProd tblbuzprod = repository.GetSingle(b => b.BuzProdID == buzProdID);
         return(tblbuzprod);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 17
0
 public tbl_LifeCycle FindLifeCycles(int?LifeCycleID)
 {
     try
     {
         IGenericDataRepository <tbl_LifeCycle> repository = new GenericDataRepository <tbl_LifeCycle>();
         tbl_LifeCycle tblLifeCycles = repository.GetSingle(b => b.LifeCycleID == LifeCycleID);
         return(tblLifeCycles);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 18
0
 public tbl_UserData FindUser(string userName)
 {
     try
     {
         IGenericDataRepository <tbl_UserData> repository = new GenericDataRepository <tbl_UserData>();
         tbl_UserData UsrData = repository.GetSingle(c => c.UserName == userName);
         return(UsrData);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 19
0
 //changed as per requirement for flow implementation on - 15/11/2016
 public tbl_Products FindProduct(int?ProductID)
 {
     try
     {
         IGenericDataRepository <tbl_Products> repository = new GenericDataRepository <tbl_Products>();
         tbl_Products tblProducts = repository.GetSingle(b => b.ProductID == ProductID);
         return(tblProducts);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 20
0
 public tbl_FrequencyType FindFrequencyTypeDesc(string freqTypeDesc, int daid)
 {
     try
     {
         IGenericDataRepository <tbl_FrequencyType> repository = new GenericDataRepository <tbl_FrequencyType>();
         tbl_FrequencyType tblFrequencyTypes = repository.GetSingle(b => b.FreqTypeDesc.ToUpper() == freqTypeDesc.ToUpper() && b.daId == daid);
         return(tblFrequencyTypes);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 21
0
 public tbl_ModeType FindModeTypes(int?ModeTypeID)
 {
     try
     {
         IGenericDataRepository <tbl_ModeType> repository = new GenericDataRepository <tbl_ModeType>();
         tbl_ModeType tblModeTypes = repository.GetSingle(b => b.ModeTypeID == ModeTypeID);
         return(tblModeTypes);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 22
0
 public tbl_UserData FindUserData(int?userId)
 {
     try
     {
         IGenericDataRepository <tbl_UserData> repository = new GenericDataRepository <tbl_UserData>();
         tbl_UserData userData = repository.GetSingle(c => c.UserID == userId);
         return(userData);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 23
0
 public tbl_ModeType FindModeDesc(string modeTypedesc, int daid)
 {
     try
     {
         IGenericDataRepository <tbl_ModeType> repository = new GenericDataRepository <tbl_ModeType>();
         tbl_ModeType tblModeTypes = repository.GetSingle(b => b.ModeTypeDesc.ToUpper() == modeTypedesc.ToUpper() && b.daId == daid);
         return(tblModeTypes);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 24
0
 public tbl_AttributeType FindAttribType(int?attributeTypeID)
 {
     try
     {
         IGenericDataRepository <tbl_AttributeType> repository = new GenericDataRepository <tbl_AttributeType>();
         tbl_AttributeType tblattribTypeID = repository.GetSingle(b => b.AttributeTypeID == attributeTypeID);
         return(tblattribTypeID);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 25
0
 public void DeleteMappedScreenRole(tbl_RoleScreenMapping roleScreenMapping)
 {
     try
     {
         IGenericDataRepository <tbl_RoleScreenMapping> repository = new GenericDataRepository <tbl_RoleScreenMapping>();
         var a = repository.GetSingle(q => q.RoleScreenMappingID == roleScreenMapping.RoleScreenMappingID);
         repository.Remove(roleScreenMapping);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 26
0
 public tbl_Module FindModuleNameForRunPlan(int?moduleId)
 {
     try
     {
         IGenericDataRepository <tbl_Module> repository = new GenericDataRepository <tbl_Module>();
         tbl_Module module = repository.GetSingle(m => m.ModuleID == moduleId);
         return(module);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 27
0
 public tbl_AppVersion FindAppVersion(int?Id)
 {
     try
     {
         IGenericDataRepository <tbl_AppVersion> repository = new GenericDataRepository <tbl_AppVersion>();
         tbl_AppVersion appVersion = repository.GetSingle(c => c.Id == Id);
         return(appVersion);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 28
0
 public tbl_Projects FindProject(int?projectID)
 {
     try
     {
         IGenericDataRepository <tbl_Projects> repository = new GenericDataRepository <tbl_Projects>();
         tbl_Projects Project = repository.GetSingle(c => c.ProjectID == projectID);
         return(Project);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 29
0
        public ApiResponse <DTODerechohabiente> GetDerechohabienteByNoIssste(string noIssste)
        {
            ApiResponse <DTODerechohabiente> apiResponse = new ApiResponse <DTODerechohabiente>();

            try
            {
                MapperConfiguration mapperConfiguration = new MapperConfiguration(x => { x.CreateMap <Derechohabiente, DTODerechohabiente>(); });

                IMapper mapper = mapperConfiguration.CreateMapper();

                Derechohabiente derechohabiente = _repository.GetSingle(x => x.NoIssste == noIssste);

                if (derechohabiente != null)
                {
                    GenericDataRepository <CatEstados> estadosRepository = new GenericDataRepository <CatEstados>();

                    DTODerechohabiente derechohabienteDto = mapper.Map <Derechohabiente, DTODerechohabiente>(derechohabiente);

                    if (derechohabienteDto != null)
                    {
                        derechohabienteDto.TipoDerechohabiente = derechohabienteDto.TipoDerechohabiente == "T" ? "TRABAJADOR" : "PENSIONADO";
                        derechohabienteDto.NombreCompleto      = string.Join(" ", new[] { derechohabienteDto.Nombre, derechohabienteDto.ApellidoPaterno, derechohabienteDto.ApellidoMaterno });
                        derechohabienteDto.Genero = derechohabienteDto.IdGenero == 1 ? "MUJER" : "HOMBRE";
                        derechohabienteDto.Edad   = DateTime.Now.Year - derechohabienteDto.FechaNacimiento.Year;
                        derechohabienteDto.Estado = estadosRepository.GetSingle(x => x.IdEstado == derechohabienteDto.IdEstado).Nombre.ToUpper();

                        apiResponse.Data    = derechohabienteDto;
                        apiResponse.Result  = (int)ApiResult.Success;
                        apiResponse.Message = Resources.ConsultaExitosa;
                    }

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

                else if (derechohabiente == null)
                {
                    apiResponse.Result = (int)ApiResult.Success;
                }
            }
            catch (Exception ex)
            {
                apiResponse.Result  = (int)ApiResult.Exception;
                apiResponse.Message = ex.Message;
            }

            return(apiResponse);
        }
Esempio n. 30
0
        public tbl_Destination FindDestinationDesc(string destDesc, int daid)
        {
            try
            {
                IGenericDataRepository <tbl_Destination> repository = new GenericDataRepository <tbl_Destination>();
                tbl_Destination tblDestination = repository.GetSingle(d => d.DestDesc.ToUpper() == destDesc.ToUpper() && d.daId == daid);

                return(tblDestination);
            }
            catch (Exception)
            {
                throw;
            }
        }