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


C# IDnaDataReader.GetNullableInt32方法代码示例

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


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

示例1: SetProperties

        protected override void SetProperties(IDnaDataReader reader)
        {
            base.SetProperties(reader);

            ThreadEntryId = reader.GetNullableInt32("ThreadEntryId");
            ModClassId = reader.GetInt32("ModClassId");
            SiteId = reader.GetInt32("SiteId");
            ForumId = reader.GetInt32("ForumId");
            ThreadId = reader.GetNullableInt32("ThreadId");
            UserId = reader.GetInt32("UserId");
            DatePosted = reader.GetDateTime("DatePosted");
            Text = reader.GetString("text");
            RiskModThreadEntryQueueId = reader.GetInt32("RiskModThreadEntryQueueId");
        }
开发者ID:rocketeerbkw,项目名称:DNA,代码行数:14,代码来源:BIPostNeedsRiskAssessmentEvent.cs

示例2: SetProperties

        protected override void SetProperties(IDnaDataReader reader)
        {
            base.SetProperties(reader);

            ThreadEntryId = reader.GetInt32("ThreadEntryId");
            ModClassId = reader.GetInt32("ModClassId");
            SiteId = reader.GetInt32("SiteId");
            ForumId = reader.GetInt32("ForumId");
            ThreadId = reader.GetInt32("ThreadId");
            UserId = reader.GetInt32("UserId");
            NextSibling = reader.GetNullableInt32("NextSibling");
            Parent = reader.GetNullableInt32("Parent");
            PrevSibling = reader.GetNullableInt32("PrevSibling");
            FirstChild = reader.GetNullableInt32("FirstChild");
            DatePosted = reader.GetDateTime("DatePosted");
            Text = reader.GetString("text");
        }
开发者ID:rocketeerbkw,项目名称:DNA,代码行数:17,代码来源:BIPostToForumEvent.cs

示例3: TestNullableIntField

 void TestNullableIntField(IDnaDataReader reader, string fieldName, int? expected)
 {
     int? v = reader.GetNullableInt32(fieldName);
     if (expected.HasValue)
         Assert.AreEqual(expected, v);
     else
         Assert.IsFalse(v.HasValue);
 }
开发者ID:rocketeerbkw,项目名称:DNA,代码行数:8,代码来源:RiskModTests.cs

示例4: RiskModTestPostHelper

        void RiskModTestPostHelper(IDnaDataReader reader, int forumid, int? threadid, int? inreplyto, int userid, string content, out int? newthreadid, out int? newthreadentryid, bool ignoremoderation, bool forcepremodposting)
        {
            string sql = string.Format(@"
                
                -- Pretend this user has never posted to this forum, to make sure the check in posttoforuminternal
                -- that stops the same user from creating a new conversation within a minute of the last one, doesn't stop the post
                update threadentries set forumid=-{0} where forumid={0} and userid={3}

                declare @hash uniqueidentifier, @returnthread int, @returnpost int, @premodpostingmodid int, @ispremoderated int
                set @hash=newid()
                exec posttoforuminternal    @userid= {3}, 
										    @forumid = {0}, 
										    @inreplyto = {2}, 
										    @threadid = {1}, 
										    @subject ='The Cabinet', 
										    @content ='{4}', 
										    @poststyle =1, 
										    @hash [email protected],
										    @keywords ='', 
										    @nickname ='the furry one', 
										    @returnthread = @returnthread OUTPUT, 
										    @returnpost = @returnpost OUTPUT, 
										    @type = NULL, 
										    @eventdate = NULL,
										    @forcemoderate = 0, 
										    @forcepremoderation = 0,
										    @ignoremoderation = {6}, 
										    @allowevententries = 1, 
										    @nodeid = 0, 
										    @ipaddress = 'testip',
										    @queueid = null, 
										    @clubid = 0, 
										    @premodpostingmodid [email protected] OUTPUT,
										    @ispremoderated [email protected] OUTPUT, 
										    @bbcuid = '{5}',
										    @isnotable = 0, 
										    @iscomment = 0,
										    @modnotes = NULL,
										    @isthreadedcomment = 0,
										    @ignoreriskmoderation = 0,
										    @forcepremodposting = {7},
										    @forcepremodpostingdate = NULL,
										    @riskmodthreadentryqueueid = NULL;

                -- put the userids back
                update threadentries set forumid={0} where forumid =-{0} and userid={3}

                select @returnthread AS returnthread, @returnpost as returnpost",
                                            forumid,
                                            threadid.HasValue ? threadid.ToString() : "NULL",
                                            inreplyto.HasValue ? inreplyto.ToString() : "NULL",
                                            userid,
                                            content,
                                            testGUID.ToString(),
                                            ignoremoderation ? 1 : 0,
                                            forcepremodposting ? 1 : 0);

            reader.ExecuteWithinATransaction(sql);
            reader.Read();
            newthreadid = reader.GetNullableInt32("returnthread");
            newthreadentryid = reader.GetNullableInt32("returnpost");
            reader.Close();
        }
开发者ID:rocketeerbkw,项目名称:DNA,代码行数:63,代码来源:RiskModTests.cs


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