当前位置: 首页>>代码示例>>C#>>正文


C# Poker.DoCreateDataSourceSelectArguments方法代码示例

本文整理汇总了C#中Poker.DoCreateDataSourceSelectArguments方法的典型用法代码示例。如果您正苦于以下问题:C# Poker.DoCreateDataSourceSelectArguments方法的具体用法?C# Poker.DoCreateDataSourceSelectArguments怎么用?C# Poker.DoCreateDataSourceSelectArguments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Poker的用法示例。


在下文中一共展示了Poker.DoCreateDataSourceSelectArguments方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FormView_CreateDataSourceSelectArguments2

		public void FormView_CreateDataSourceSelectArguments2 () {
			DataSourceView view;
			Page p = new Page ();

			Poker dv = new Poker ();
			p.Controls.Add (dv);

			ObjectDataSource data = new ObjectDataSource ();
			data.TypeName = typeof (DataSourceObject).AssemblyQualifiedName;
			data.SelectMethod = "GetList";
			data.SortParameterName = "sortExpression";
			DataSourceSelectArguments arg;
			p.Controls.Add (data);

			dv.DataSource = data;
			dv.DataBind ();

			arg = dv.DoCreateDataSourceSelectArguments ();
			Assert.IsTrue (arg.Equals (DataSourceSelectArguments.Empty), "Default");

			dv.AllowPaging = true;
			dv.PageIndex = 2;
			arg = dv.DoCreateDataSourceSelectArguments ();
			view = dv.DoGetData ();
			Assert.IsFalse (view.CanPage);
			Assert.IsTrue (view.CanRetrieveTotalRowCount);
			Assert.IsTrue (arg.Equals (DataSourceSelectArguments.Empty), "AllowPaging = true, CanPage = false, CanRetrieveTotalRowCount = true");

			// make DataSourceView.CanPage = true
			data.EnablePaging = true;

			arg = dv.DoCreateDataSourceSelectArguments ();
			view = dv.DoGetData ();
			Assert.IsTrue (view.CanPage);
			Assert.IsFalse (view.CanRetrieveTotalRowCount);
			Assert.IsTrue (arg.Equals (new DataSourceSelectArguments (2, -1)), "AllowPaging = true, CanPage = true, CanRetrieveTotalRowCount = false");

			dv.AllowPaging = false;
			arg = dv.DoCreateDataSourceSelectArguments ();
			Assert.IsTrue (arg.Equals (DataSourceSelectArguments.Empty), "AllowPaging = false, CanPage = true, CanRetrieveTotalRowCount = false");

			// make DataSourceView.CanRetrieveTotalRowCount = true
			data.SelectCountMethod = "GetCount";

			arg = dv.DoCreateDataSourceSelectArguments ();
			Assert.IsTrue (arg.Equals (DataSourceSelectArguments.Empty), "AllowPaging = false, CanPage = true, CanRetrieveTotalRowCount = true");

			dv.AllowPaging = true;
			arg = dv.DoCreateDataSourceSelectArguments ();
			DataSourceSelectArguments arg1 = new DataSourceSelectArguments (2, 1);
			arg1.RetrieveTotalRowCount = true;
			view = dv.DoGetData ();
			Assert.IsTrue (view.CanPage);
			Assert.IsTrue (view.CanRetrieveTotalRowCount);
			Assert.IsTrue (arg.Equals (arg1), "AllowPaging = true, CanPage = true, CanRetrieveTotalRowCount = true");
		}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:56,代码来源:FormViewTest.cs

示例2: FormView_CreateDataSourceSelectArguments

		public void FormView_CreateDataSourceSelectArguments ()
		{
			//Checks the default DataSourceSelectArgument object returned.
			Poker fv = new Poker ();
			DataSourceSelectArguments selectArgs = fv.DoCreateDataSourceSelectArguments ();
			Assert.AreEqual (0, selectArgs.MaximumRows, "CreateDataSourceSelectArguments1");
			Assert.AreEqual (false, selectArgs.RetrieveTotalRowCount, "CreateDataSourceSelectArguments2");						

		}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:9,代码来源:FormViewTest.cs

示例3: Repeater_DefaultsSelectArguments

		public void Repeater_DefaultsSelectArguments ()
		{
			Poker p = new Poker ();
			DataSourceSelectArguments args, args2;

			args = p.GetSelectArguments();
			args2 = p.DoCreateDataSourceSelectArguments();

			Assert.AreEqual (args, args2, "call == prop");

			Assert.IsNotNull (args, "property null check");
			Assert.IsTrue    (args != DataSourceSelectArguments.Empty, "property != Empty check");
			Assert.IsTrue    (args.Equals (DataSourceSelectArguments.Empty), "property but they are empty check");

			Assert.IsNotNull (args2, "method null check");
			Assert.IsTrue    (args2 != DataSourceSelectArguments.Empty, "method != Empty check");
			Assert.IsTrue    (args2.Equals (DataSourceSelectArguments.Empty), "method but they are empty check");

			/* check to see whether multiple calls give us different refs */
			args = p.DoCreateDataSourceSelectArguments();
			
			Assert.AreEqual (args, args2, "multiple calls, same ref");
			Assert.AreEqual (string.Empty, p.DataSourceID, "DataSourceID");
			Assert.AreEqual (false, p.RequiresDataBinding, "RequiresDataBinding");
		}
开发者ID:nobled,项目名称:mono,代码行数:25,代码来源:RepeaterTest.cs


注:本文中的Poker.DoCreateDataSourceSelectArguments方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。