예제 #1
0
        /// <summary>
        /// gets all of the protfolio creation of the user. (a list of objects)
        /// </summary>
        public static List <ProtfolioCreation> GetUserCreations(int userID)
        {
            DataTable protfoliodt = UserDB.GetUserCreations(userID);
            List <ProtfolioCreation> protfolioList = new List <ProtfolioCreation>();

            foreach (DataRow row in protfoliodt.Rows)
            {
                ProtfolioCreation creation = new ProtfolioCreation(row);
                protfolioList.Add(creation);
            }
            return(protfolioList);
        }
예제 #2
0
        /// <summary>
        /// setter for user's creations
        /// </summary>
        public void SetUserCreations()
        {
            List <ProtfolioCreation> Lusercreations = new List <ProtfolioCreation>();
            DataTable creations = UserDB.GetUserCreations(this.ID);

            if (creations.Rows.Count > 0)
            {
                foreach (DataRow creation in creations.Rows)
                {
                    ProtfolioCreation creation_obj = new ProtfolioCreation(creation);
                    Lusercreations.Add(creation_obj);
                }
            }
            this.UserCreations = Lusercreations;
        }