本文整理汇总了C#中TableRow.ContainsKey方法的典型用法代码示例。如果您正苦于以下问题:C# TableRow.ContainsKey方法的具体用法?C# TableRow.ContainsKey怎么用?C# TableRow.ContainsKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TableRow
的用法示例。
在下文中一共展示了TableRow.ContainsKey方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetCell
public static string GetCell(TableRow row, string header)
{
if (row.ContainsKey(header))
return row[header];
var lookup = CleanAndShrink(header);
foreach (var key in row.Keys)
{
if (CleanAndShrink(key) == lookup)
return row[key];
}
// This WILL trigger an exception, but it's the exception we need.
return row[header];
}
示例2: SetGeneralTabFields
/// <summary>
/// Set the fields on the 'General' tab.
/// </summary>
/// <param name="fields">Mapping of the field captions to their desired values.</param>
public static void SetGeneralTabFields(TableRow fields)
{
string dialogId = GetDialogId(DialogIds);
OpenTab("General", dialogId);
if (fields.ContainsKey("Date"))
{
if (fields["Date"] == "Today") SetDropDown(getXInput(dialogId, "_ACKNOWLEDGEDATETYPECODE_value"), fields["Date"]);
else
{
SetDropDown(getXInput(dialogId, "_ACKNOWLEDGEDATETYPECODE_value"), "<Specific date>");
SetTextField(getXInput(dialogId, "_ACKNOWLEDGEDATE_value"), fields["Date"]);
}
fields["Date"] = null;
}
SetFields(dialogId, fields, SupportedFields);
}
示例3: CustomSetFieldsLogic
private static TableRow CustomSetFieldsLogic(TableRow fieldValues, string dialogId)
{
if (fieldValues.ContainsKey("Pay installments automatically by"))
{
var value = fieldValues["Pay installments automatically by"];
try
{
var boolValue = ConvertToBool(value);
SetCheckbox(getXInput(dialogId, "AUTOPAY"), boolValue);
}
catch (NotSupportedException)
{
SetCheckbox(getXInput(dialogId, "AUTOPAY"), true);
SetDropDown(getXInput(dialogId, "PAYMENTMETHODCODE"), value);
}
fieldValues["Pay installments automatically by"] = null;
}
return fieldValues;
}
示例4: SetDetails
//FIXME - this needs deprecated and removed
/// <summary>
/// The fields on the Details tab of the dialog.
/// </summary>
/// <param name="details">Mapping of the field captions to their desired values.</param>
public static void SetDetails(TableRow details)
{
string dialogId = GetDialogId(DialogIds);
if (dialogId == AddDialogId) OpenTab("Details");
if (details.ContainsKey("Start date")) SetPlanStartDate(details["Start date"]);
details["Start date"] = null;
SetFields(dialogId, details, SupportedFields);
}