本文整理汇总了C#中PokerDetailsView.DoCreateFieldSet方法的典型用法代码示例。如果您正苦于以下问题:C# PokerDetailsView.DoCreateFieldSet方法的具体用法?C# PokerDetailsView.DoCreateFieldSet怎么用?C# PokerDetailsView.DoCreateFieldSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PokerDetailsView
的用法示例。
在下文中一共展示了PokerDetailsView.DoCreateFieldSet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DetailsView_CreateFieldSet_useDataSource
public void DetailsView_CreateFieldSet_useDataSource ()
{
DataTable ds = TableObject.CreateDataTable ();
PokerDetailsView dv2 = new PokerDetailsView ();
dv2.DataSource = ds;
dv2.DataBind ();
ICollection fieldSet2 = dv2.DoCreateFieldSet ("FieldTest", false);
Assert.AreEqual (3, fieldSet2.Count, "FiledSetCount");
Assert.AreEqual ("ID", ((ArrayList) fieldSet2)[0].ToString (), "FieldValue1");
Assert.AreEqual (typeof (Int32), ((AutoGeneratedField) ((ArrayList) fieldSet2)[0]).DataType, "FieldType1");
Assert.AreEqual ("FName", ((ArrayList) fieldSet2)[1].ToString (), "FieldValue2");
Assert.AreEqual (typeof (String), ((AutoGeneratedField) ((ArrayList) fieldSet2)[1]).DataType, "FieldType2");
Assert.AreEqual ("LName", ((ArrayList) fieldSet2)[2].ToString (), "FieldValue3");
Assert.AreEqual (typeof (String), ((AutoGeneratedField) ((ArrayList) fieldSet2)[2]).DataType, "FieldType3");
}
示例2: DetailsView_CreateFieldSet_dont_useDataSource
public void DetailsView_CreateFieldSet_dont_useDataSource ()
{
DataTable ds = TableObject.CreateDataTable ();
PokerDetailsView dv1 = new PokerDetailsView ();
dv1.DataSource = ds;
dv1.DataBind ();
ICollection fieldSet1 = dv1.DoCreateFieldSet ("FieldTest", true);
Assert.AreEqual (1, fieldSet1.Count, "FiledSetCount");
AutoGeneratedField agf = (AutoGeneratedField) ((ArrayList) fieldSet1)[0];
Assert.AreEqual ("Item", agf.HeaderText, "FieldSetCount");
}