本文整理汇总了C#中Business.Load方法的典型用法代码示例。如果您正苦于以下问题:C# Business.Load方法的具体用法?C# Business.Load怎么用?C# Business.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Business
的用法示例。
在下文中一共展示了Business.Load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetTermValue
private static void SetTermValue(DataRow rowPattern, List<string> errors, DataColumn col, Business.Term term, string rowColumnValue, DataRow row)
{
string value = string.Empty;
char delimiter = _FIELD_DELIMITER;
switch (term.TermType)
{
case Business.TermType.Text:
case Business.TermType.Date:
case Business.TermType.PickList: //e.g. '1,2,3,4'
case Business.TermType.Renewal: //e.g. 'EffectiveDate,InitialCount,RenewalCount'
value = rowColumnValue;
break;
case Business.TermType.Facility: //e.g. 'OwningFacilityID|2,3,4,5'
value = string.Format("{0}{1}{2}", row[_COL_OWNING_FAC_ID].ToString(), _TERM_DELIMITER, rowColumnValue);
delimiter = _TERM_DELIMITER;
break;
//Not loaded
case Business.TermType.MSO:
case Business.TermType.Link:
case Business.TermType.External:
case Business.TermType.PlaceHolderAttachments:
case Business.TermType.PlaceHolderComments:
default:
return;
}
try
{
term.Load(value, rowPattern[col.ColumnName].ToString(), delimiter);
}
catch (Exception ex)
{
errors.Add(string.Format("Load of term {0} threw exception: {1}.", term.Name, ex.Message));
}
}