本文整理汇总了C#中IDnaDataReader.ExecuteDEBUGONLY方法的典型用法代码示例。如果您正苦于以下问题:C# IDnaDataReader.ExecuteDEBUGONLY方法的具体用法?C# IDnaDataReader.ExecuteDEBUGONLY怎么用?C# IDnaDataReader.ExecuteDEBUGONLY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDnaDataReader
的用法示例。
在下文中一共展示了IDnaDataReader.ExecuteDEBUGONLY方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateNewSite
private static int CreateNewSite(IDnaDataReader reader, string urlname)
{
string sql = @"exec createnewsite @urlname = '"+urlname+"',"+
"@shortname = '"+urlname+"',"+
"@description = '"+urlname+"',"+
"@defaultskin = 'default',"+
"@skindescription = '',"+
"@skinset ='boards',"+
"@useframes =0,"+
"@premoderation = 0,"+
"@noautoswitch =0,"+
"@customterms = 0,"+
"@moderatorsemail = '[email protected]',"+
"@editorsemail = '[email protected]',"+
"@feedbackemail = '[email protected]',"+
"@automessageuserid = 245,"+
"@passworded = 0,"+
"@unmoderated = 0,"+
"@articleforumstyle =0,"+
"@threadorder =1,"+
"@threadedittimelimit = 0,"+
"@eventemailsubject = '',"+
"@eventalertmessageuserid = 254,"+
"@includecrumbtrail = 0,"+
"@allowpostcodesinsearch = 0,"+
"@ssoservice = null,"+
"@siteemergencyclosed = 0,"+
"@allowremovevote = 0,"+
"@queuepostings = 0,"+
"@modclassid = 1,"+
"@identitypolicy = 'http://identity/policies/dna/adult'";
reader.ExecuteDEBUGONLY(sql);
reader.Read();
int siteid = reader.GetInt32("siteid");
return siteid;
}
示例2: SiteExists
private static bool SiteExists(IDnaDataReader reader,string urlname)
{
using (IDnaDataReader r = reader.ExecuteDEBUGONLY("select * from sites where urlname='"+urlname+"'"))
{
while (r.Read())
{
if (r.GetString("urlname") == urlname)
return true;
}
}
return false;
}
示例3: SetSiteID
private void SetSiteID(IDnaDataReader dataReader, String urlname)
{
dataReader.ExecuteDEBUGONLY("select siteid from sites where urlname='" + urlname + "'");
if (dataReader.Read())
{
_siteId = dataReader.GetInt32("SiteID");
}
else
{
Assert.Fail("Unable to read the Sites table");
}
}
示例4: SetForumID
private void SetForumID(IDnaDataReader dataReader)
{
dataReader.ExecuteDEBUGONLY("select forumid from forums where canread = 1 and canwrite=1 and siteid =" + Convert.ToString(_siteId) );
if (dataReader.Read())
{
_forumId = dataReader.GetInt32("ForumID");
}
else
{
Assert.Fail("Unable to find a forum for site");
}
}
示例5: ReadTopDateRangeRecord
private void ReadTopDateRangeRecord(IDnaDataReader dataReader, ref DateRangeInfo drInfo)
{
dataReader.ExecuteDEBUGONLY("select top 1 * from articledaterange order by entryid desc");
if (dataReader.Read())
{
drInfo.entryId= dataReader.GetInt32("EntryID");
drInfo.startDate = dataReader.GetDateTime("StartDate");
drInfo.endDate = dataReader.GetDateTime("EndDate");
drInfo.timeIntervalNull = dataReader.IsDBNull("TimeInterval");
if (!drInfo.timeIntervalNull)
{
drInfo.timeInterval = dataReader.GetInt32("TimeInterval");
}
}
else
{
Assert.Fail("Unable to read the ArticleDateRange table");
}
}