Ejemplo n.º 1
0
        /// <summary>
        /// no. 1 constructor that takes id, user id and profession to create the object.
        /// </summary>

        public ProjectPos(int id, int userID, int profession)
        {
            this.id         = id;
            this.profession = new Profession(profession);
            this.userID     = userID;
            DataTable programsTable = ProjectDB.GetProgramsAtPosition(id);

            if (programsTable != null)
            {
                List <Knowledge> Programs = new List <Knowledge>();
                foreach (DataRow row in programsTable.Rows)
                {
                    Knowledge program = new Knowledge();
                    program.ProgPath = (string)row["ProgPath"];
                    Programs.Add(program);
                }
                this.Programs = Programs;
            }
        }