Ejemplo n.º 1
0
 public UserProfileCollection FetchAll()
 {
     UserProfileCollection coll = new UserProfileCollection();
     Query qry = new Query(UserProfile.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
Ejemplo n.º 2
0
        public List <ProfileShortInfoVM> GetAllUserProfileShortInfo()
        {
            var result = new List <ProfileShortInfoVM>();

            if (UserProfileCollection.Any())
            {
                foreach (var item in UserProfileCollection)
                {
                    result.Add(new ProfileShortInfoVM(item));
                }
            }
            return(result);
        }
Ejemplo n.º 3
0
        public List <ProfileUpdateInfoVM> GetAllUserProfileUpdateInfo()
        {
            var result = new List <ProfileUpdateInfoVM>();

            if (UserProfileCollection.Any())
            {
                foreach (var item in UserProfileCollection)
                {
                    //result.Add(new ProfileUpdateInfoVM(item));
                    result.Add(ServiceAutoMapModelMapper.CreateProfileUpdateInfoVM(item));
                }
            }
            return(result);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Loads a collection of UserProfile objects from the database.
        /// </summary>
        /// <returns>A collection containing all of the UserProfile objects in the database.</returns>
        public static UserProfileCollection LoadCollection(string spName, SqlParameter[] parms)
        {
            UserProfileCollection result = new UserProfileCollection();

            using (SqlDataReader reader = SqlHelper.Default.ExecuteReader(spName, parms))
            {
                while (reader.Read())
                {
                    UserProfile tmp = new UserProfile();
                    tmp.LoadFromReader(reader);
                    result.Add(tmp);
                }
            }
            return(result);
        }
Ejemplo n.º 5
0
 public UserProfileCollection FetchByQuery(Query qry)
 {
     UserProfileCollection coll = new UserProfileCollection();
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
Ejemplo n.º 6
0
 public UserProfileCollection FetchByID(object Id)
 {
     UserProfileCollection coll = new UserProfileCollection().Where("ID", Id).Load();
     return coll;
 }