Esempio n. 1
0
        /// <summary>
        /// Takes an prepopulated IDataReader and creates an array of FriendRequests
        /// </summary>
        public static List<FriendRequest> PopulateObjectWithJoin(IDataReader dr)
        {
            ColumnFieldList list = new ColumnFieldList(dr);

            List<FriendRequest> arr = new List<FriendRequest>();

            FriendRequest obj;

            while (dr.Read())
            {
                obj = new FriendRequest();
                if (list.IsColumnPresent("FriendRequestID")) { obj._friendRequestID = (int)dr["FriendRequestID"]; }
                if (list.IsColumnPresent("WebFriendRequestID")) { obj._webFriendRequestID = (string)dr["WebFriendRequestID"]; }
                if (list.IsColumnPresent("MemberID")) { obj._memberID = (int)dr["MemberID"]; }
                if (list.IsColumnPresent("FriendMemberID")) { obj._friendMemberID = (int)dr["FriendMemberID"]; }
                if (list.IsColumnPresent("Origin")) { obj._origin = (int)dr["Origin"]; }
                if (list.IsColumnPresent("Response")) { obj._response = (int)dr["Response"]; }
                if (list.IsColumnPresent("Status")) { obj._status = (int)dr["Status"]; }
                if (list.IsColumnPresent("DTCreated")) { obj._dTCreated = (DateTime)dr["DTCreated"]; }

                obj.FriendMember = new Member();
                if (list.IsColumnPresent("FriendMemberMemberID")) { obj.FriendMember.MemberID = (int)dr["FriendMemberMemberID"]; }
                if (list.IsColumnPresent("FriendMemberWebMemberID")) { obj.FriendMember.WebMemberID = (string)dr["FriendMemberWebMemberID"]; }
                if (list.IsColumnPresent("FriendMemberAdminStatusID")) { obj.FriendMember.AdminStatusID = (int)dr["FriendMemberAdminStatusID"]; }
                if (list.IsColumnPresent("FriendMemberNickName")) { obj.FriendMember.NickName = (string)dr["FriendMemberNickName"]; }
                if (list.IsColumnPresent("FriendMemberChannelID")) { obj.FriendMember.ChannelID = (int)dr["FriendMemberChannelID"]; }
                if (list.IsColumnPresent("FriendMemberPassword")) { obj.FriendMember.Password = (string)dr["FriendMemberPassword"]; }
                if (list.IsColumnPresent("FriendMemberEmail")) { obj.FriendMember.Email = (string)dr["FriendMemberEmail"]; }
                if (list.IsColumnPresent("FriendMemberGender")) { obj.FriendMember.Gender = (int)dr["FriendMemberGender"]; }
                if (list.IsColumnPresent("FriendMemberFirstName")) { obj.FriendMember.FirstName = (string)dr["FriendMemberFirstName"]; }
                if (list.IsColumnPresent("FriendMemberLastName")) { obj.FriendMember.LastName = (string)dr["FriendMemberLastName"]; }
                if (list.IsColumnPresent("FriendMemberProfilePhotoResourceFileID")) { obj.FriendMember.ProfilePhotoResourceFileID = (int)dr["FriendMemberProfilePhotoResourceFileID"]; }
                if (list.IsColumnPresent("FriendMemberDOB")) { obj.FriendMember.DOB = (DateTime)dr["FriendMemberDOB"]; }
                if (list.IsColumnPresent("FriendMemberISOCountry")) { obj.FriendMember.ISOCountry = (string)dr["FriendMemberISOCountry"]; }
                if (list.IsColumnPresent("FriendMemberAccountType")) { obj.FriendMember.AccountType = (int)dr["FriendMemberAccountType"]; }
                if (list.IsColumnPresent("FriendMemberZipPostcode")) { obj.FriendMember.ZipPostcode = (string)dr["FriendMemberZipPostcode"]; }
                if (list.IsColumnPresent("FriendMemberPhoneNumber")) { obj.FriendMember.PhoneNumber = (string)dr["FriendMemberPhoneNumber"]; }
                if (list.IsColumnPresent("FriendMemberMobilePhoneID")) { obj.FriendMember.MobilePhoneID = (int)dr["FriendMemberMobilePhoneID"]; }
                if (list.IsColumnPresent("FriendMemberIPLocationID")) { obj.FriendMember.IPLocationID = (int)dr["FriendMemberIPLocationID"]; }
                if (list.IsColumnPresent("FriendMemberCreatedDT")) { obj.FriendMember.CreatedDT = (DateTime)dr["FriendMemberCreatedDT"]; }

                obj.Member = new Member();
                if (list.IsColumnPresent("MemberMemberID")) { obj.Member.MemberID = (int)dr["MemberMemberID"]; }
                if (list.IsColumnPresent("MemberWebMemberID")) { obj.Member.WebMemberID = (string)dr["MemberWebMemberID"]; }
                if (list.IsColumnPresent("MemberAdminStatusID")) { obj.Member.AdminStatusID = (int)dr["MemberAdminStatusID"]; }
                if (list.IsColumnPresent("MemberNickName")) { obj.Member.NickName = (string)dr["MemberNickName"]; }
                if (list.IsColumnPresent("MemberChannelID")) { obj.Member.ChannelID = (int)dr["MemberChannelID"]; }
                if (list.IsColumnPresent("MemberPassword")) { obj.Member.Password = (string)dr["MemberPassword"]; }
                if (list.IsColumnPresent("MemberEmail")) { obj.Member.Email = (string)dr["MemberEmail"]; }
                if (list.IsColumnPresent("MemberGender")) { obj.Member.Gender = (int)dr["MemberGender"]; }
                if (list.IsColumnPresent("MemberFirstName")) { obj.Member.FirstName = (string)dr["MemberFirstName"]; }
                if (list.IsColumnPresent("MemberLastName")) { obj.Member.LastName = (string)dr["MemberLastName"]; }
                if (list.IsColumnPresent("MemberProfilePhotoResourceFileID")) { obj.Member.ProfilePhotoResourceFileID = (int)dr["MemberProfilePhotoResourceFileID"]; }
                if (list.IsColumnPresent("MemberDOB")) { obj.Member.DOB = (DateTime)dr["MemberDOB"]; }
                if (list.IsColumnPresent("MemberISOCountry")) { obj.Member.ISOCountry = (string)dr["MemberISOCountry"]; }
                if (list.IsColumnPresent("MemberAccountType")) { obj.Member.AccountType = (int)dr["MemberAccountType"]; }
                if (list.IsColumnPresent("MemberZipPostcode")) { obj.Member.ZipPostcode = (string)dr["MemberZipPostcode"]; }
                if (list.IsColumnPresent("MemberPhoneNumber")) { obj.Member.PhoneNumber = (string)dr["MemberPhoneNumber"]; }
                if (list.IsColumnPresent("MemberMobilePhoneID")) { obj.Member.MobilePhoneID = (int)dr["MemberMobilePhoneID"]; }
                if (list.IsColumnPresent("MemberIPLocationID")) { obj.Member.IPLocationID = (int)dr["MemberIPLocationID"]; }
                if (list.IsColumnPresent("MemberCreatedDT")) { obj.Member.CreatedDT = (DateTime)dr["MemberCreatedDT"]; }


                arr.Add(obj);
            }

            dr.Close();

            return arr;
        }
Esempio n. 2
0
        /// <summary>
        /// Takes an prepopulated IDataReader and creates an array of FriendRequests
        /// </summary>
        public static List<FriendRequest> PopulateObject(IDataReader dr)
        {
            ColumnFieldList list = new ColumnFieldList(dr);

            List<FriendRequest> arr = new List<FriendRequest>();

            FriendRequest obj;

            while (dr.Read())
            {
                obj = new FriendRequest();
                if (list.IsColumnPresent("FriendRequestID")) { obj._friendRequestID = (int)dr["FriendRequestID"]; }
                if (list.IsColumnPresent("WebFriendRequestID")) { obj._webFriendRequestID = (string)dr["WebFriendRequestID"]; }
                if (list.IsColumnPresent("MemberID")) { obj._memberID = (int)dr["MemberID"]; }
                if (list.IsColumnPresent("FriendMemberID")) { obj._friendMemberID = (int)dr["FriendMemberID"]; }
                if (list.IsColumnPresent("Origin")) { obj._origin = (int)dr["Origin"]; }
                if (list.IsColumnPresent("Response")) { obj._response = (int)dr["Response"]; }
                if (list.IsColumnPresent("Status")) { obj._status = (int)dr["Status"]; }
                if (list.IsColumnPresent("DTCreated")) { obj._dTCreated = (DateTime)dr["DTCreated"]; }

                arr.Add(obj);
            }

            dr.Close();

            return arr;
        }
Esempio n. 3
0
        /// <summary>
        /// Takes an prepopulated IDataReader and creates an array of FriendRequests
        /// </summary>
        public static List <FriendRequest> PopulateFriendRequestWithJoin(IDataReader dr)
        {
            ColumnFieldList list = new ColumnFieldList(dr);

            List <FriendRequest> arr = new List <FriendRequest>();

            FriendRequest obj;

            while (dr.Read())
            {
                obj = new FriendRequest();
                obj._friendRequestID    = (int)dr["FriendRequestID"];
                obj._webFriendRequestID = (string)dr["WebFriendRequestID"];
                obj._memberID           = (int)dr["MemberID"];
                obj._origin             = (int)dr["Origin"];
                obj._friendMemberID     = (int)dr["FriendMemberID"];
                obj._status             = (int)dr["Status"];
                obj._dTCreated          = (DateTime)dr["DTCreated"];

                obj.FriendMember = new Member();
                if (list.IsColumnPresent("FriendMemberMemberID"))
                {
                    obj.FriendMember.MemberID = (int)dr["FriendMemberMemberID"];
                }
                if (list.IsColumnPresent("FriendMemberWebMemberID"))
                {
                    obj.FriendMember.WebMemberID = (string)dr["FriendMemberWebMemberID"];
                }
                if (list.IsColumnPresent("FriendMemberAdminStatusID"))
                {
                    obj.FriendMember.AdminStatusID = (int)dr["FriendMemberAdminStatusID"];
                }
                if (list.IsColumnPresent("FriendMemberNickName"))
                {
                    obj.FriendMember.NickName = (string)dr["FriendMemberNickName"];
                }
                if (list.IsColumnPresent("FriendMemberChannelID"))
                {
                    obj.FriendMember.ChannelID = (int)dr["FriendMemberChannelID"];
                }
                if (list.IsColumnPresent("FriendMemberPassword"))
                {
                    obj.FriendMember.Password = (string)dr["FriendMemberPassword"];
                }
                if (list.IsColumnPresent("FriendMemberEmail"))
                {
                    obj.FriendMember.Email = (string)dr["FriendMemberEmail"];
                }
                if (list.IsColumnPresent("FriendMemberGender"))
                {
                    obj.FriendMember.Gender = (int)dr["FriendMemberGender"];
                }
                if (list.IsColumnPresent("FriendMemberFirstName"))
                {
                    obj.FriendMember.FirstName = (string)dr["FriendMemberFirstName"];
                }
                if (list.IsColumnPresent("FriendMemberLastName"))
                {
                    obj.FriendMember.LastName = (string)dr["FriendMemberLastName"];
                }
                if (list.IsColumnPresent("FriendMemberProfilePhotoResourceFileID"))
                {
                    obj.FriendMember.ProfilePhotoResourceFileID = (int)dr["FriendMemberProfilePhotoResourceFileID"];
                }
                if (list.IsColumnPresent("FriendMemberDOB"))
                {
                    obj.FriendMember.DOB = (DateTime)dr["FriendMemberDOB"];
                }
                if (list.IsColumnPresent("FriendMemberISOCountry"))
                {
                    obj.FriendMember.ISOCountry = (string)dr["FriendMemberISOCountry"];
                }
                if (list.IsColumnPresent("FriendMemberZipPostcode"))
                {
                    obj.FriendMember.ZipPostcode = (string)dr["FriendMemberZipPostcode"];
                }
                if (list.IsColumnPresent("FriendMemberCreatedDT"))
                {
                    obj.FriendMember.CreatedDT = (DateTime)dr["FriendMemberCreatedDT"];
                }
                if (list.IsColumnPresent("FriendMemberLastOnline"))
                {
                    obj.FriendMember.LastOnline = (DateTime)dr["FriendMemberLastOnline"];
                }

                if (list.IsColumnPresent("PhotoURL"))
                {
                    obj.PhotoURL = (string)dr["PhotoURL"];
                }


                arr.Add(obj);
            }

            return(arr);
        }