本文整理汇总了C#中PokerDetailsView.DeleteItem方法的典型用法代码示例。如果您正苦于以下问题:C# PokerDetailsView.DeleteItem方法的具体用法?C# PokerDetailsView.DeleteItem怎么用?C# PokerDetailsView.DeleteItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PokerDetailsView
的用法示例。
在下文中一共展示了PokerDetailsView.DeleteItem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DetailsView_DeleteItem
public static void DetailsView_DeleteItem (Page p)
{
LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG);
LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG);
PokerDetailsView dv = new PokerDetailsView ();
ObjectDataSource ds = new ObjectDataSource ();
ds.ID = "ObjectDataSource1";
ds.TypeName = "MonoTests.System.Web.UI.WebControls.TableObject";
ds.SelectMethod = "GetMyData";
ds.DeleteMethod = "Delete";
ds.InsertMethod = "Insert";
ds.UpdateMethod = "Update";
Parameter p1 = new Parameter ("ID", TypeCode.String);
Parameter p2 = new Parameter ("FName", TypeCode.String);
Parameter p3 = new Parameter ("LName", TypeCode.String);
ds.DeleteParameters.Add (p1);
ds.DeleteParameters.Add (p2);
ds.DeleteParameters.Add (p3);
dv.Page = p;
ds.Page = p;
p.Form.Controls.Add (lcb);
p.Form.Controls.Add (dv);
p.Form.Controls.Add (ds);
p.Form.Controls.Add (lce);
dv.AllowPaging = true;
dv.DataKeyNames = new string[] { "ID", "FName", "LName" };
dv.DataSourceID = "ObjectDataSource1";
dv.DataBind ();
dv.DeleteItem ();
}
示例2: DetailsView_DeleteItemHandler
public void DetailsView_DeleteItemHandler ()
{
PokerDetailsView dv = new PokerDetailsView ();
dv.DataSource = myds;
dv.DataBind ();
Assert.AreEqual (false, isDeleted, "BeforeDeleteItem");
dv.ItemDeleting += new DetailsViewDeleteEventHandler (dv_DeleteingHandler);
dv.DeleteItem ();
Assert.AreEqual (true, isDeleted, "BeforeDeleteItem");
}