本文整理汇总了C#中SPListItem.GetFieldStringValue方法的典型用法代码示例。如果您正苦于以下问题:C# SPListItem.GetFieldStringValue方法的具体用法?C# SPListItem.GetFieldStringValue怎么用?C# SPListItem.GetFieldStringValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SPListItem
的用法示例。
在下文中一共展示了SPListItem.GetFieldStringValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Default
public Default(SPListItem spItem)
{
//base.GetSPListItemData(spItem);
base.Init(spItem, Zeppelin.ShP.Helper.Enums.AttachmentsLoadMode.Short);
SingleLineOfText = spItem.GetFieldStringValue(DefaultList.Fields.SingleLineOfText);
Number = spItem.GetFieldDoubleValue(DefaultList.Fields.Number, 0);
NumberDecimals = spItem.GetFieldDoubleValue(DefaultList.Fields.NumberDecimals, 0);
MultipleLinesOfText = spItem.GetFieldStringValue(DefaultList.Fields.MultipleLinesOfText);
MultiRichTextHTML = spItem.GetFieldStringValue(DefaultList.Fields.MultiRichTextHTML);
PublishingHTML = spItem.GetFieldStringValue(DefaultList.Fields.PublishingHTML);
Lookup = spItem.GetFieldLookupValue(DefaultList.Fields.Lookup);
MultiLookupColumns = spItem.GetFieldMultiLookupValues(DefaultList.Fields.MultiLookupColumns);
Boolean = spItem.GetFieldBooleanValueOrNull(DefaultList.Fields.Boolean);
}
示例2: GetSPListItemData
public void GetSPListItemData(SPListItem spItem)
{
//base.Init(spItem, AttachmentsLoadMode.Short);
ID = spItem.GetFieldIntValue(ListItemDefaultFields.ID);
Title = spItem.GetFieldStringValue(ListItemDefaultFields.Title);
GUID = spItem.GetFieldGuidValue(ListItemDefaultFields.GUID);
Created = spItem.GetFieldDateTimeValue(ListItemDefaultFields.Created);
CreatedBy = spItem.GetFieldUserValueOrEmpty(ListItemDefaultFields.CreatedBy);
Modified = spItem.GetFieldDateTimeValue(ListItemDefaultFields.Modified);
ModifiedBy = spItem.GetFieldUserValueOrEmpty(ListItemDefaultFields.ModifiedBy);
ContentTypeId = Convert.ToString(spItem.ContentTypeId);
ContentType = spItem.ContentType.Name;
SPContentTypeCollection ctsParentList = spItem.ParentList.ContentTypes;
foreach (SPContentType ct in ctsParentList)
{
UlsLogging.LogInformation("SPContentType Name: {0} Id: {1}", ct.Name, Convert.ToString(ct.Id));
//ContentTypes.Add(ct.Name, Convert.ToString(ct.Id));
}
if (spItem.ModerationInformation != null)
{
ModerationStatus = spItem.ModerationInformation.Status;
ModerationComments = Convert.ToString(spItem.ModerationInformation.Comment);
}
//ListID = spItem.ParentList.ID;
//ListTitle = spItem.ParentList.Title;
//WebID = spItem.Web.ID;
//WebUrl = spItem.Web.Url;
UIVersionString = spItem[ListItemDefaultFields.UIVersionString];
OriginInfo OriginInfo = new OriginInfo();
OriginInfo.GetData(spItem.ParentList);
}
示例3: InitBaseFields
/// <summary>
/// Инизиализация базовых полей данных полей из SPListItem
/// </summary>
/// <param name="spItem">Элемент списка</param>
protected void InitBaseFields(SPListItem spItem)
{
_id = spItem.ID;
Title = spItem.Title;
if (spItem.Fields.ContainsField(Constants.FieldNamesBaseTypes.DocIcon))
this.ItemIcon = UrlHelper.GetFileIconUrl(spItem.GetFieldStringValue(Constants.FieldNamesBaseTypes.DocIcon));
else
this.ItemIcon = UrlHelper.GetFileIconUrl(null);
}