当前位置: 首页>>代码示例>>C#>>正文


C# ColumnFieldList.IsColumnPresent方法代码示例

本文整理汇总了C#中Next2Friends.Data.ColumnFieldList.IsColumnPresent方法的典型用法代码示例。如果您正苦于以下问题:C# ColumnFieldList.IsColumnPresent方法的具体用法?C# ColumnFieldList.IsColumnPresent怎么用?C# ColumnFieldList.IsColumnPresent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Next2Friends.Data.ColumnFieldList的用法示例。


在下文中一共展示了ColumnFieldList.IsColumnPresent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PopulateContentViewObject

        /// <summary>
        /// Takes an prepopulated IDataReader and creates an array of ContentViews
        /// </summary>
        public static List<ContentView> PopulateContentViewObject(IDataReader dr)
        {
            ColumnFieldList list = new ColumnFieldList(dr);

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

            ContentView obj;

            while (dr.Read())
            {
                obj = new ContentView();
                if (list.IsColumnPresent("WebMemberID")) { obj.WebMemberID = (string)dr["WebMemberID"]; }
                if (list.IsColumnPresent("PhotoURL")) { obj.PhotoURL = (string)dr["PhotoURL"]; }
                if (list.IsColumnPresent("NickName")) { obj.NickName = (string)dr["NickName"]; }
                if (list.IsColumnPresent("FirstName")) { obj.FirstName = (string)dr["FirstName"]; }
                if (list.IsColumnPresent("LastName")) { obj.LastName = (string)dr["LastName"]; }
                if (list.IsColumnPresent("DTCreated")) { obj.DTCreated = (DateTime)dr["DTCreated"]; }

                arr.Add(obj);
            }

            dr.Close();

            return arr;
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:28,代码来源:ContentView.cs

示例2: PopulateFriendTagWithJoin

        public static List<FriendTag> PopulateFriendTagWithJoin(IDataReader dr)
        {
            ColumnFieldList list = new ColumnFieldList(dr);

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

            FriendTag obj;

            while (dr.Read())
            {
                obj = new FriendTag();

                if (list.IsColumnPresent("MemberID")) { obj.MemberID = (int)dr["MemberID"]; }
                if (list.IsColumnPresent("WebMemberID")) { obj.WebMemberID = (string)dr["WebMemberID"]; }
                if (list.IsColumnPresent("CountryName")) { obj.CountryName = (string)dr["CountryName"]; }
                if (list.IsColumnPresent("NickName")) { obj.NickName = (string)dr["NickName"]; }
                if (list.IsColumnPresent("FirstName")) { obj.FirstName = (string)dr["FirstName"]; }
                if (list.IsColumnPresent("LastName")) { obj.LastName = (string)dr["LastName"]; }
                if (list.IsColumnPresent("ProfilePhotoURL")) { obj.ProfilePhotoURL = (string)dr["ProfilePhotoURL"]; }
                if (list.IsColumnPresent("TaggedDT")) { obj.TaggedDT = (DateTime)dr["TaggedDT"]; }
                if (list.IsColumnPresent("CreatedDT")) { obj._createdDT = (DateTime)dr["CreatedDT"]; }

                arr.Add(obj);
            }

            return arr;
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:27,代码来源:FriendTag.cs

示例3: PopulateObjectWithJoinCustom

        /// <summary>
        /// Takes an prepopulated IDataReader and creates an array of ChatMessages
        /// </summary>
        public static List<ChatMessage> PopulateObjectWithJoinCustom(IDataReader dr)
        {
            ColumnFieldList list = new ColumnFieldList(dr);

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

            ChatMessage obj;

            while (dr.Read())
            {
                obj = new ChatMessage();
                if (list.IsColumnPresent("ChatMessageID")) { obj._chatMessageID = (int)dr["ChatMessageID"]; }
                if (list.IsColumnPresent("ChatMessageWebID")) { obj._chatMessageWebID = (string)dr["ChatMessageWebID"]; }
                if (list.IsColumnPresent("MemberIDFrom")) { obj._memberIDFrom = (int)dr["MemberIDFrom"]; }
                if (list.IsColumnPresent("MemberIDTo")) { obj._memberIDTo = (int)dr["MemberIDTo"]; }
                if (list.IsColumnPresent("Message")) { obj._message = (string)dr["Message"]; }
                if (list.IsColumnPresent("Delivered")) { obj._delivered = (bool)dr["Delivered"]; }
                if (list.IsColumnPresent("DTCreated")) { obj._dTCreated = (DateTime)dr["DTCreated"]; }
                if (list.IsColumnPresent("WebMemberIDFrom")) { obj.WebMemberIDFrom = (String)dr["WebMemberIDFrom"]; }

                
                arr.Add(obj);
            }

            dr.Close();

            return arr;
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:31,代码来源:ChatMessage.cs

示例4: PopulateObjectWithJoinCustom

        /// <summary>
        /// Takes an prepopulated IDataReader and creates an array of ChatOnlines
        /// </summary>
        public static List<ChatOnline> PopulateObjectWithJoinCustom(IDataReader dr)
        {
            ColumnFieldList list = new ColumnFieldList(dr);

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

            ChatOnline obj;

            while (dr.Read())
            {
                obj = new ChatOnline();
                if (list.IsColumnPresent("ChatOnlineID")) { obj._chatOnlineID = (int)dr["ChatOnlineID"]; }
                if (list.IsColumnPresent("MemberID")) { obj._memberID = (int)dr["MemberID"]; }
                if (list.IsColumnPresent("LastCommDt")) { obj._lastCommDt = (DateTime)dr["LastCommDt"]; }
                if (list.IsColumnPresent("Status")) { obj._status = (int)dr["Status"]; }

                if (list.IsColumnPresent("NickName")) { obj.NickName = (string)dr["NickName"]; }
                if (list.IsColumnPresent("FirstName")) { obj.FirstName = (string)dr["FirstName"]; }
                if (list.IsColumnPresent("LastName")) { obj.LastName = (string)dr["LastName"]; }
                if (list.IsColumnPresent("Email")) { obj.Email = (string)dr["Email"]; }
                if (list.IsColumnPresent("WebMemberID")) { obj.WebMemberID = (string)dr["WebMemberID"]; }
                if (list.IsColumnPresent("AvatorUrl")) { obj.AvatorUrl = (string)dr["AvatorUrl"]; }
                if (list.IsColumnPresent("CustomMessage")) { obj.CustomMessage = (string)dr["CustomMessage"]; }

                arr.Add(obj);
            }

            dr.Close();

            return arr;
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:34,代码来源:ChatOnline.cs

示例5: PopulateObject

        /// <summary>
        /// Takes an prepopulated IDataReader and creates an array of FeaturedMembers
        /// </summary>
        public static List<FeaturedMember> PopulateObject(IDataReader dr)
        {
            ColumnFieldList list = new ColumnFieldList(dr);

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

            FeaturedMember obj;

            while (dr.Read())
            {
                obj = new FeaturedMember();
                if (list.IsColumnPresent("FeaturedMemberID")) { obj._featuredMemberID = (int)dr["FeaturedMemberID"]; }
                if (list.IsColumnPresent("MemberID")) { obj._memberID = (int)dr["MemberID"]; }
                if (list.IsColumnPresent("Position")) { obj._position = (int)dr["Position"]; }
                if (list.IsColumnPresent("IsDisplayed")) { obj._isDisplayed = (bool)dr["IsDisplayed"]; }
                if (list.IsColumnPresent("DTCreated")) { obj._dTCreated = (DateTime)dr["DTCreated"]; }

                arr.Add(obj);
            }

            dr.Close();

            return arr;
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:27,代码来源:AutoGenerated.cs

示例6: EmailReferral

        /// <summary>
        /// Instanciates a EmailReferral object from the database via the EmailReferralID
        /// </summary>
        public EmailReferral(int EmailReferralID)
        {
            db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("AG_GetEmailReferralByEmailReferralID");
            db.AddInParameter(dbCommand, "EmailReferralID", DbType.Int32, EmailReferralID);

            //execute the stored procedure
            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                ColumnFieldList list = new ColumnFieldList(dr);

                if (dr.Read())
                {
                    if (list.IsColumnPresent("EmailReferralID")) { this._emailReferralID = (int)dr["EmailReferralID"]; }
                    if (list.IsColumnPresent("NewMemberID")) { this._newMemberID = (int)dr["NewMemberID"]; }
                    if (list.IsColumnPresent("Email")) { this._email = (string)dr["Email"]; }
                    if (list.IsColumnPresent("DTCreated")) { this._dTCreated = (DateTime)dr["DTCreated"]; }

                }
                else
                {
                    throw new Exception("There is no EmailReferral in the database with the ID " + EmailReferralID);
                }

                dr.Close();
            }
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:30,代码来源:AutoGenerated.cs

示例7: ContactImport

        /// <summary>
        /// Instanciates a ContactImport object from the database via the ContactImportID
        /// </summary>
        public ContactImport(int ContactImportID)
        {
            db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("AG_GetContactImportByContactImportID");
            db.AddInParameter(dbCommand, "ContactImportID", DbType.Int32, ContactImportID);

            //execute the stored procedure
            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                ColumnFieldList list = new ColumnFieldList(dr);

                if (dr.Read())
                {
                    if (list.IsColumnPresent("ContactImportID")) { this._contactImportID = (int)dr["ContactImportID"]; }
                    if (list.IsColumnPresent("ImporterMemberID")) { this._importerMemberID = (int)dr["ImporterMemberID"]; }
                    if (list.IsColumnPresent("Email")) { this._email = (string)dr["Email"]; }
                    if (list.IsColumnPresent("Name")) { this._name = (string)dr["Name"]; }
                    if (list.IsColumnPresent("InviteState")) { this._inviteState = (int)dr["InviteState"]; }
                    if (list.IsColumnPresent("FriendState")) { this._friendState = (int)dr["FriendState"]; }
                    if (list.IsColumnPresent("OpenedEmailInvite")) { this._openedEmailInvite = (bool)dr["OpenedEmailInvite"]; }
                    if (list.IsColumnPresent("ClickedEmailInvite")) { this._clickedEmailInvite = (bool)dr["ClickedEmailInvite"]; }
                    if (list.IsColumnPresent("JoinedFromInvite")) { this._joinedFromInvite = (bool)dr["JoinedFromInvite"]; }
                    if (list.IsColumnPresent("BecameMemberID")) { this._becameMemberID = (int)dr["BecameMemberID"]; }
                    if (list.IsColumnPresent("ImportToken")) { this._importToken = (string)dr["ImportToken"]; }
                    if (list.IsColumnPresent("DTCreated")) { this._dTCreated = (DateTime)dr["DTCreated"]; }

                }
                else
                {
                    throw new Exception("There is no ContactImport in the database with the ID " + ContactImportID);
                }

                dr.Close();
            }
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:38,代码来源:AutoGenerated.cs

示例8: Comment

        /// <summary>
        /// Instanciates a Comment object from the database via the CommentID
        /// </summary>
        public Comment(int CommentID)
        {
            db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("AG_GetCommentByCommentID");
            db.AddInParameter(dbCommand, "CommentID", DbType.Int32, CommentID);

            //execute the stored procedure
            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                ColumnFieldList list = new ColumnFieldList(dr);

                if (dr.Read())
                {
                    if (list.IsColumnPresent("CommentID")) { this._commentID = (int)dr["CommentID"]; }
                    if (list.IsColumnPresent("WebCommentID")) { this._webCommentID = (string)dr["WebCommentID"]; }
                    if (list.IsColumnPresent("ObjectID")) { this._objectID = (int)dr["ObjectID"]; }
                    if (list.IsColumnPresent("MemberIDFrom")) { this._memberIDFrom = (int)dr["MemberIDFrom"]; }
                    if (list.IsColumnPresent("InReplyToCommentID")) { this._inReplyToCommentID = (int)dr["InReplyToCommentID"]; }
                    if (list.IsColumnPresent("Text")) { this._text = (string)dr["Text"]; }
                    if (list.IsColumnPresent("IsDeleted")) { this._isDeleted = (bool)dr["IsDeleted"]; }
                    if (list.IsColumnPresent("Path")) { this._path = (string)dr["Path"]; }
                    if (list.IsColumnPresent("CommentType")) { this._commentType = (int)dr["CommentType"]; }
                    if (list.IsColumnPresent("ThreadNo")) { this._threadNo = (int)dr["ThreadNo"]; }
                    if (list.IsColumnPresent("DTCreated")) { this._dTCreated = (DateTime)dr["DTCreated"]; }
                    if (list.IsColumnPresent("SentFromMobile")) { this._sentFromMobile = (int)dr["SentFromMobile"]; }

                }
                else
                {
                    throw new Exception("There is no Comment in the database with the ID " + CommentID);
                }

                dr.Close();
            }
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:38,代码来源:AutoGenerated.cs

示例9: EmailMessage

        /// <summary>
        /// Instanciates a EmailMessage object from the database via the EmailMessageID
        /// </summary>
        public EmailMessage(int EmailMessageID)
        {
            db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("AG_GetEmailMessageByEmailMessageID");
            db.AddInParameter(dbCommand, "EmailMessageID", DbType.Int32, EmailMessageID);

            //execute the stored procedure
            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                ColumnFieldList list = new ColumnFieldList(dr);

                if (dr.Read())
                {
                    if (list.IsColumnPresent("EmailMessageID")) { this._emailMessageID = (int)dr["EmailMessageID"]; }
                    if (list.IsColumnPresent("WebEmailMessageID")) { this._webEmailMessageID = (string)dr["WebEmailMessageID"]; }
                    if (list.IsColumnPresent("ResourceFileID")) { this._resourceFileID = (int)dr["ResourceFileID"]; }
                    if (list.IsColumnPresent("MemberID")) { this._memberID = (int)dr["MemberID"]; }
                    if (list.IsColumnPresent("EmailAddress")) { this._emailAddress = (string)dr["EmailAddress"]; }
                    if (list.IsColumnPresent("Text")) { this._text = (string)dr["Text"]; }
                    if (list.IsColumnPresent("IsRead")) { this._isRead = (bool)dr["IsRead"]; }
                    if (list.IsColumnPresent("DTCreated")) { this._dTCreated = (DateTime)dr["DTCreated"]; }

                }
                else
                {
                    throw new Exception("There is no EmailMessage in the database with the ID " + EmailMessageID);
                }

                dr.Close();
            }
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:34,代码来源:AutoGenerated.cs

示例10: PopulateObjectWithJoin

        /// <summary>
        /// Takes an prepopulated IDataReader and creates an array of EmailMessages
        /// </summary>
        public static List<EmailMessage> PopulateObjectWithJoin(IDataReader dr)
        {
            ColumnFieldList list = new ColumnFieldList(dr);

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

            EmailMessage obj;

            while (dr.Read())
            {
                obj = new EmailMessage();
                if (list.IsColumnPresent("EmailMessageID")) { obj._emailMessageID = (int)dr["EmailMessageID"]; }
                if (list.IsColumnPresent("WebEmailMessageID")) { obj._webEmailMessageID = (string)dr["WebEmailMessageID"]; }
                if (list.IsColumnPresent("ResourceFileID")) { obj._resourceFileID = (int)dr["ResourceFileID"]; }
                if (list.IsColumnPresent("MemberID")) { obj._memberID = (int)dr["MemberID"]; }
                if (list.IsColumnPresent("EmailAddress")) { obj._emailAddress = (string)dr["EmailAddress"]; }
                if (list.IsColumnPresent("Text")) { obj._text = (string)dr["Text"]; }
                if (list.IsColumnPresent("IsRead")) { obj._isRead = (bool)dr["IsRead"]; }
                if (list.IsColumnPresent("DTCreated")) { obj._dTCreated = (DateTime)dr["DTCreated"]; }

                obj.VideoMessage = new ResourceFile();
                if (list.IsColumnPresent("VideoMessageResourceFileID")) { obj.VideoMessage.ResourceFileID = (int)dr["VideoMessageResourceFileID"]; }
                if (list.IsColumnPresent("VideoMessageWebResourceFileID")) { obj.VideoMessage.WebResourceFileID = (string)dr["VideoMessageWebResourceFileID"]; }
                if (list.IsColumnPresent("VideoMessageResourceType")) { obj.VideoMessage.ResourceType = (int)dr["VideoMessageResourceType"]; }
                if (list.IsColumnPresent("VideoMessageStorageLocation")) { obj.VideoMessage.StorageLocation = (int)dr["VideoMessageStorageLocation"]; }
                if (list.IsColumnPresent("VideoMessageServer")) { obj.VideoMessage.Server = (int)dr["VideoMessageServer"]; }
                if (list.IsColumnPresent("VideoMessagePath")) { obj.VideoMessage.Path = (string)dr["VideoMessagePath"]; }
                if (list.IsColumnPresent("VideoMessageFileName")) { obj.VideoMessage.FileName = (string)dr["VideoMessageFileName"]; }
                if (list.IsColumnPresent("VideoMessageCreatedDT")) { obj.VideoMessage.CreatedDT = (DateTime)dr["VideoMessageCreatedDT"]; }

                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;
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:62,代码来源:AutoGenerated.cs

示例11: ContentView

        /// <summary>
        /// Instanciates a ContentView object from the database via the ContentViewID
        /// </summary>
        public ContentView(int ContentViewID)
        {
            db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("AG_GetContentViewByContentViewID");
            db.AddInParameter(dbCommand, "ContentViewID", DbType.Int32, ContentViewID);

            //execute the stored procedure
            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                ColumnFieldList list = new ColumnFieldList(dr);

                if (dr.Read())
                {
                    if (list.IsColumnPresent("ContentViewID")) { this._contentViewID = (int)dr["ContentViewID"]; }
                    if (list.IsColumnPresent("MemberID")) { this._memberID = (int)dr["MemberID"]; }
                    if (list.IsColumnPresent("ObjectID")) { this._objectID = (int)dr["ObjectID"]; }
                    if (list.IsColumnPresent("ObjectType")) { this._objectType = (int)dr["ObjectType"]; }
                    if (list.IsColumnPresent("DTCreated")) { this._dTCreated = (DateTime)dr["DTCreated"]; }

                }
                else
                {
                    throw new Exception("There is no ContentView in the database with the ID " + ContentViewID);
                }

                dr.Close();
            }
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:31,代码来源:AutoGenerated.cs

示例12: AdminStatus

        /// <summary>
        /// Instanciates a AdminStatus object from the database via the AdminStatusID
        /// </summary>
        public AdminStatus(int AdminStatusID)
        {
            db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("AG_GetAdminStatusByAdminStatusID");
            db.AddInParameter(dbCommand, "AdminStatusID", DbType.Int32, AdminStatusID);

            //execute the stored procedure
            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                ColumnFieldList list = new ColumnFieldList(dr);

                if (dr.Read())
                {
                    if (list.IsColumnPresent("AdminStatusID")) { this._adminStatusID = (int)dr["AdminStatusID"]; }
                    if (list.IsColumnPresent("Description")) { this._description = (string)dr["Description"]; }

                }
                else
                {
                    throw new Exception("There is no AdminStatus in the database with the ID " + AdminStatusID);
                }

                dr.Close();
            }
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:28,代码来源:AutoGenerated.cs

示例13: Abuse

        /// <summary>
        /// Instanciates a Abuse object from the database via the AbuseID
        /// </summary>
        public Abuse(int AbuseID)
        {
            db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("AG_GetAbuseByAbuseID");
            db.AddInParameter(dbCommand, "AbuseID", DbType.Int32, AbuseID);

            //execute the stored procedure
            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                ColumnFieldList list = new ColumnFieldList(dr);

                if (dr.Read())
                {
                    if (list.IsColumnPresent("AbuseID")) { this._abuseID = (int)dr["AbuseID"]; }
                    if (list.IsColumnPresent("MemberID")) { this._memberID = (int)dr["MemberID"]; }
                    if (list.IsColumnPresent("ResourceFileID")) { this._resourceFileID = (string)dr["ResourceFileID"]; }
                    if (list.IsColumnPresent("URL")) { this._uRL = (string)dr["URL"]; }
                    if (list.IsColumnPresent("DTCreated")) { this._dTCreated = (DateTime)dr["DTCreated"]; }

                }
                else
                {
                    throw new Exception("There is no Abuse in the database with the ID " + AbuseID);
                }

                dr.Close();
            }
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:31,代码来源:AutoGenerated.cs

示例14: Dashboard

        /// <summary>
        /// Instanciates a Dashboard object from the database via the DashboardID
        /// </summary>
        public Dashboard(int DashboardID)
        {
            db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("AG_GetDashboardByDashboardID");
            db.AddInParameter(dbCommand, "DashboardID", DbType.Int32, DashboardID);

            //execute the stored procedure
            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                ColumnFieldList list = new ColumnFieldList(dr);

                if (dr.Read())
                {
                    if (list.IsColumnPresent("DashboardID")) { this._dashboardID = (int)dr["DashboardID"]; }
                    if (list.IsColumnPresent("MemberID")) { this._memberID = (int)dr["MemberID"]; }
                    if (list.IsColumnPresent("Inbox")) { this._inbox = (int)dr["Inbox"]; }
                    if (list.IsColumnPresent("ProfileComment")) { this._profileComment = (int)dr["ProfileComment"]; }
                    if (list.IsColumnPresent("FriendRequest")) { this._friendRequest = (int)dr["FriendRequest"]; }
                    if (list.IsColumnPresent("FriendRequestAccept")) { this._friendRequestAccept = (int)dr["FriendRequestAccept"]; }
                    if (list.IsColumnPresent("FriendRequestOutstanding")) { this._friendRequestOutstanding = (int)dr["FriendRequestOutstanding"]; }
                    if (list.IsColumnPresent("NetworkNewVideo")) { this._networkNewVideo = (int)dr["NetworkNewVideo"]; }
                    if (list.IsColumnPresent("NetworkNewGallery")) { this._networkNewGallery = (int)dr["NetworkNewGallery"]; }
                    if (list.IsColumnPresent("NetworkUpdatedProfile")) { this._networkUpdatedProfile = (int)dr["NetworkUpdatedProfile"]; }
                    if (list.IsColumnPresent("NetworkFavourite")) { this._networkFavourite = (int)dr["NetworkFavourite"]; }

                }
                else
                {
                    throw new Exception("There is no Dashboard in the database with the ID " + DashboardID);
                }

                dr.Close();
            }
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:37,代码来源:AutoGenerated.cs

示例15: FavouriteGroup

        /// <summary>
        /// Instanciates a FavouriteGroup object from the database via the FavouriteGroupID
        /// </summary>
        public FavouriteGroup(int FavouriteGroupID)
        {
            db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("AG_GetFavouriteGroupByFavouriteGroupID");
            db.AddInParameter(dbCommand, "FavouriteGroupID", DbType.Int32, FavouriteGroupID);

            //execute the stored procedure
            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                ColumnFieldList list = new ColumnFieldList(dr);

                if (dr.Read())
                {
                    if (list.IsColumnPresent("FavouriteGroupID")) { this._favouriteGroupID = (int)dr["FavouriteGroupID"]; }
                    if (list.IsColumnPresent("MemberID")) { this._memberID = (int)dr["MemberID"]; }
                    if (list.IsColumnPresent("TheFavouriteGroupID")) { this._theFavouriteGroupID = (int)dr["TheFavouriteGroupID"]; }
                    if (list.IsColumnPresent("DTCreated")) { this._dTCreated = (DateTime)dr["DTCreated"]; }

                }
                else
                {
                    throw new Exception("There is no FavouriteGroup in the database with the ID " + FavouriteGroupID);
                }

                dr.Close();
            }
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:30,代码来源:AutoGenerated.cs


注:本文中的Next2Friends.Data.ColumnFieldList.IsColumnPresent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。