Exemplo n.º 1
0
        public IList <ASMemberAspnetUsersMapEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression)
        {
            IList <ASMemberAspnetUsersMapEntity> aSMemberAspnetUsersMapEntityList = new List <ASMemberAspnetUsersMapEntity>();

            try
            {
                if (pageSize == -1)
                {
                    pageSize = 1000000000;
                }

                if (String.IsNullOrEmpty(sortExpression))
                {
                    sortExpression = ASMemberAspnetUsersMapEntity.FLD_NAME_ASMemberAspnetUsersMapID + " " + SQLConstants.SORT_ORDER_DESCENDING;
                }

                startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1;

                aSMemberAspnetUsersMapEntityList = FCCASMemberAspnetUsersMap.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression);

                if (aSMemberAspnetUsersMapEntityList != null && aSMemberAspnetUsersMapEntityList.Count > 0)
                {
                    totalRowCount = aSMemberAspnetUsersMapEntityList[0].TotalRowCount;
                }
            }
            catch (Exception ex)
            {
            }

            return(aSMemberAspnetUsersMapEntityList ?? new List <ASMemberAspnetUsersMapEntity>());
        }
Exemplo n.º 2
0
        public static void MapMemberWithASPNETUser(Int64 memberID, MembershipUser user)
        {
            if (user != null)
            {
                ASMemberAspnetUsersMapEntity aspnetUsersMemberMapEntity = new ASMemberAspnetUsersMapEntity();

                aspnetUsersMemberMapEntity.UserId   = (Guid)user.ProviderUserKey;
                aspnetUsersMemberMapEntity.MemberID = memberID;

                FCCASMemberAspnetUsersMap.GetFacadeCreate().Add(aspnetUsersMemberMapEntity, DatabaseOperationType.Add, TransactionRequired.No);
            }
        }
Exemplo n.º 3
0
        public IList <ASMemberAspnetUsersMapEntity> GetData()
        {
            IList <ASMemberAspnetUsersMapEntity> aSMemberAspnetUsersMapEntityList = new List <ASMemberAspnetUsersMapEntity>();

            try
            {
                aSMemberAspnetUsersMapEntityList = FCCASMemberAspnetUsersMap.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load);

                if (aSMemberAspnetUsersMapEntityList != null && aSMemberAspnetUsersMapEntityList.Count > 0)
                {
                    totalRowCount = aSMemberAspnetUsersMapEntityList[0].TotalRowCount;
                }
            }
            catch (Exception ex)
            {
            }

            return(aSMemberAspnetUsersMapEntityList ?? new List <ASMemberAspnetUsersMapEntity>());
        }
Exemplo n.º 4
0
        public static HRMemberEntity GetMemberByASPNETUserName(String userName)
        {
            HRMemberEntity member = null;

            MembershipUser user = GetASPNETUserByUserName(userName);

            if (user != null)
            {
                Guid userID = (Guid)user.ProviderUserKey;

                String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(ASMemberAspnetUsersMapEntity.FLD_NAME_UserId, userID.ToString(), SQLMatchType.Equal);

                IList <ASMemberAspnetUsersMapEntity> aSMemberAspnetUsersMapEntityList = FCCASMemberAspnetUsersMap.GetFacadeCreate().GetIL(null, null, null, filterExpression, DatabaseOperationType.LoadWithFilterExpression);

                if (aSMemberAspnetUsersMapEntityList != null && aSMemberAspnetUsersMapEntityList.Count > 0)
                {
                    filterExpression = SqlExpressionBuilder.PrepareFilterExpression(HRMemberEntity.FLD_NAME_MemberID, aSMemberAspnetUsersMapEntityList[0].MemberID.ToString(), SQLMatchType.Equal);

                    IList <HRMemberEntity> memberEntityList = FCCHRMember.GetFacadeCreate().GetIL(null, null, null, filterExpression, DatabaseOperationType.LoadWithFilterExpression);

                    if (memberEntityList != null && memberEntityList.Count > 0)
                    {
                        member = memberEntityList[0];
                    }
                }
            }

            return(member);
        }