本文整理汇总了C#中IDnaDataReader.GetGuid方法的典型用法代码示例。如果您正苦于以下问题:C# IDnaDataReader.GetGuid方法的具体用法?C# IDnaDataReader.GetGuid怎么用?C# IDnaDataReader.GetGuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDnaDataReader
的用法示例。
在下文中一共展示了IDnaDataReader.GetGuid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTopicFromReader
/// <summary>
/// Gets the topic elements from the current reader.
/// </summary>
/// <param name="reader"></param>
/// <returns></returns>
static public TopicElement GetTopicFromReader(IDnaDataReader reader)
{
var topicEdit = new TopicElement();
topicEdit.TopicId = reader.GetInt32NullAsZero("topicid");
topicEdit.H2G2Id = reader.GetInt32NullAsZero("h2g2ID");
topicEdit.SiteId = reader.GetInt32NullAsZero("SiteID");
topicEdit.TopicStatus = (TopicStatus)reader.GetInt32NullAsZero("TopicStatus");
topicEdit.Title = reader.GetStringNullAsEmpty("TITLE");
topicEdit.ForumId = reader.GetInt32NullAsZero("ForumID");
topicEdit.Description = reader.GetStringNullAsEmpty("description");
topicEdit.Position = reader.GetInt32NullAsZero("position");
topicEdit.TopicLinkId = reader.GetInt32NullAsZero("topiclinkid");
topicEdit.Createdby = new TopicCreatedDate
{
CreatedDate = new DateElement(reader.GetDateTime("createddate")),
Username = reader.GetStringNullAsEmpty("CreatedByUserName"),
Userid = reader.GetInt32NullAsZero("CreatedByUserID")
};
topicEdit.Updatedby = new TopicLastUpdated()
{
LastUpdated = new DateElement(reader.GetDateTime("LastUpdated")),
Username = reader.GetStringNullAsEmpty("UpdatedByUserName"),
Userid = reader.GetInt32NullAsZero("UpdatedByUserID")
};
topicEdit.Style = reader.GetInt32NullAsZero("style");
topicEdit.ForumPostCount = reader.GetInt32NullAsZero("forumpostcount");
topicEdit.FrontPageElement.Elementid = reader.GetInt32NullAsZero("FP_ElementID");
topicEdit.FrontPageElement.Position = reader.GetInt32NullAsZero("FP_Position");
topicEdit.FrontPageElement.Title = reader.GetStringNullAsEmpty("FP_Title");
topicEdit.FrontPageElement.TemplateElement = reader.GetInt32NullAsZero("FP_Template");
topicEdit.FrontPageElement.Text = reader.GetStringNullAsEmpty("FP_Text");
topicEdit.FrontPageElement.ImageName = reader.GetStringNullAsEmpty("FP_ImageName");
topicEdit.FrontPageElement.ImageAltText = reader.GetStringNullAsEmpty("FP_ImageAltText");
topicEdit.FrontPageElement.ForumPostCount = reader.GetInt32NullAsZero("forumpostcount");
topicEdit.FrontPageElement.TopicId = reader.GetInt32NullAsZero("topicid");
topicEdit.Fastmod = reader.GetInt32NullAsZero("fastmod");
topicEdit.Editkey = reader.GetGuid("editkey");
topicEdit.FrontPageElement.Editkey = reader.GetGuid("FP_EditKey");
return topicEdit;
}
示例2: ReadTemplateData
/// <summary>
/// Method that reads the datareader and extracts the template and field info
/// </summary>
/// <param name="dataReader"></param>
private void ReadTemplateData(IDnaDataReader dataReader)
{
if (dataReader.HasRows)
{
//Clear existing field data List ready for new set
_uiFieldData.Clear();
if (dataReader.Read())
{
_name = dataReader.GetStringNullAsEmpty("TemplateName");
_UITemplateID = dataReader.GetInt32NullAsZero("UITemplateID");
_builderGUID = dataReader.GetGuid("BuilderGUID");
if (dataReader.NextResult())
{
while (dataReader.Read())
{
UIField uiField = new UIField(InputContext);
uiField.LoadFieldFromDatabase(dataReader);
_uiFieldData.Add(uiField.Name, uiField);
}
}
}
}
else
{
AddErrorXml("ReadTemplateData", "No template data returned, invalid UI Template ID.", null);
_hasErrors = true;
}
}