예제 #1
0
        public bool InsertUserHistory(UserHistory UserHistory)
        {
            if (UserHistory is null)
            {
                return(false);
            }


            DALUserHistory dalUserHistory = new DALUserHistory(connectionString);


            return(dalUserHistory.Insert(UserHistory));
        }
예제 #2
0
        public List <UserHistory> GetUserHistoryByUserId(string UserId)
        {
            if (string.IsNullOrEmpty(UserId))
            {
                return(null);
            }

            DALUserHistory     dalUserHistory = new DALUserHistory(connectionString);
            List <UserHistory> lstUserHistory = dalUserHistory.GetByUserId(UserId);

            lstUserHistory.ForEach(EntityBuilder);

            return(lstUserHistory);
        }
예제 #3
0
        // USER_HISTORY METHODS.
        public UserHistory GetUserHistoryById(string Id)
        {
            if (string.IsNullOrEmpty(Id))
            {
                return(null);
            }

            DALUserHistory dalUserHistory = new DALUserHistory(connectionString);           // Gets an user history by its id.
            UserHistory    userHistory    = dalUserHistory.GetById(Id);

            EntityBuilder(userHistory);

            return(userHistory);
        }
예제 #4
0
        public UserHistory GetCurrentUserHistoryByUserId(string UserId)
        {
            if (string.IsNullOrEmpty(UserId))
            {
                return(null);
            }

            DALUserHistory dalUserHistory = new DALUserHistory(connectionString);
            UserHistory    userHistory    = dalUserHistory.GetCurrentByUserId(UserId);

            if (userHistory is null)
            {
                return(null);
            }

            EntityBuilder(userHistory);

            return(userHistory);
        }