本文整理汇总了C#中PokerDetailsView.DoExtractRowValues方法的典型用法代码示例。如果您正苦于以下问题:C# PokerDetailsView.DoExtractRowValues方法的具体用法?C# PokerDetailsView.DoExtractRowValues怎么用?C# PokerDetailsView.DoExtractRowValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PokerDetailsView
的用法示例。
在下文中一共展示了PokerDetailsView.DoExtractRowValues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DetailsView_ExtractRowValues
public void DetailsView_ExtractRowValues ()
{
PokerDetailsView dv = new PokerDetailsView ();
DataTable ds = TableObject.CreateDataTable ();
dv.DataSource = ds;
dv.DataBind ();
OrderedDictionary fieldsValues = new OrderedDictionary ();
dv.DoExtractRowValues (fieldsValues, true, true);
Assert.AreEqual (3, fieldsValues.Count, "ExtractRowValues1");
Assert.AreEqual (3, fieldsValues.Keys.Count, "ExtractRowValues2");
Assert.AreEqual (3, fieldsValues.Values.Count, "ExtractRowValues3");
Assert.AreEqual (true, fieldsValues.Contains ("ID"), "ExtractRowValues4");
IDictionaryEnumerator enumerator=fieldsValues.GetEnumerator ();
enumerator.MoveNext ();
Assert.AreEqual ("ID",enumerator.Key,"FieldValue1");
Assert.AreEqual ("1001", enumerator.Value , "FieldValue2");
enumerator.MoveNext ();
Assert.AreEqual ("FName", enumerator.Key, "FieldValue3");
Assert.AreEqual ("Mahesh", enumerator.Value, "FieldValue4");
enumerator.MoveNext ();
Assert.AreEqual ("LName", enumerator.Key, "FieldValue5");
Assert.AreEqual ("Chand", enumerator.Value, "FieldValue6");
fieldsValues = new OrderedDictionary ();
dv.DoExtractRowValues (fieldsValues, false, false);
Assert.AreEqual (0, fieldsValues.Count, "ExtractRowValues-NotReadOnly1");
fieldsValues = new OrderedDictionary ();
dv.DoExtractRowValues (fieldsValues, true, false);
Assert.AreEqual (3, fieldsValues.Count, "ExtractRowValues-NoPrimaryKeys1");
Assert.AreEqual (3, fieldsValues.Keys.Count, "ExtractRowValues-NoPrimaryKeys2");
fieldsValues = new OrderedDictionary ();
dv.DoExtractRowValues (fieldsValues, false, true);
Assert.AreEqual (0, fieldsValues.Count, "ExtractRowValues-NotReadOnly2");
Assert.AreEqual (0, fieldsValues.Keys.Count, "ExtractRowValues-NotReadOnly3");
}