本文整理汇总了C#中MonoTests.System.Web.UI.WebControls.ObjectDataSourcePoker.DoRaiseDataSourceChangedEvent方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectDataSourcePoker.DoRaiseDataSourceChangedEvent方法的具体用法?C# ObjectDataSourcePoker.DoRaiseDataSourceChangedEvent怎么用?C# ObjectDataSourcePoker.DoRaiseDataSourceChangedEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoTests.System.Web.UI.WebControls.ObjectDataSourcePoker
的用法示例。
在下文中一共展示了ObjectDataSourcePoker.DoRaiseDataSourceChangedEvent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ObjectDataSource_DataSourceChanged
public void ObjectDataSource_DataSourceChanged ()
{
ObjectDataSourcePoker ods = new ObjectDataSourcePoker ();
InitObjectDataSource (ods, "");
((IDataSource) ods).DataSourceChanged += new EventHandler (ObjectDataSourceTest_DataSourceChanged);
// Check if event raised
ods.DoRaiseDataSourceChangedEvent ();
Assert.IsTrue (eventChecker, "DataSourceChanged#1");
eventChecker = false;
ods.ConflictDetection = ConflictOptions.CompareAllValues;
Assert.IsFalse (eventChecker, "DataSourceChanged#2");
eventChecker = false;
ods.DataObjectTypeName = "MyData";
Assert.IsFalse (eventChecker, "DataSourceChanged#3");
eventChecker = false;
ods.EnablePaging = true;
Assert.IsFalse (eventChecker, "DataSourceChanged#4");
eventChecker = false;
ods.FilterExpression = "ID='{0}'";
Assert.IsFalse (eventChecker, "DataSourceChanged#5");
eventChecker = false;
TextBox TextBox1 = new TextBox ();
TextBox1.Text = "1001";
FormParameter p = new FormParameter ("ID", "TextBox1");
p.DefaultValue = "1002";
ods.FilterParameters.Add (p);
Assert.IsFalse (eventChecker, "DataSourceChanged#6");
eventChecker = false;
ods.MaximumRowsParameterName = "SelectCount";
Assert.IsFalse (eventChecker, "DataSourceChanged#7");
eventChecker = false;
ods.OldValuesParameterFormatString = "ID";
Assert.IsFalse (eventChecker, "DataSourceChanged#8");
eventChecker = false;
Parameter dummy = new Parameter ();
dummy.Name = "Test";
ods.SelectParameters.Add (dummy);
Assert.IsFalse (eventChecker, "DataSourceChanged#9");
eventChecker = false;
ods.SortParameterName = "sortExpression";
Assert.IsFalse (eventChecker, "DataSourceChanged#10");
eventChecker = false;
ods.StartRowIndexParameterName = "ID";
Assert.IsFalse (eventChecker, "DataSourceChanged#11");
eventChecker = false;
ods.CacheDuration = 1000;
Assert.IsFalse (eventChecker, "DataSourceChanged#12");
eventChecker = false;
ods.CacheExpirationPolicy = DataSourceCacheExpiry.Sliding;
Assert.IsFalse (eventChecker, "DataSourceChanged#13");
eventChecker = false;
ods.CacheKeyDependency = "ID";
Assert.IsFalse (eventChecker, "DataSourceChanged#14");
eventChecker = false;
ods.ConvertNullToDBNull = true;
Assert.IsFalse (eventChecker, "DataSourceChanged#15");
eventChecker = false;
ods.EnableCaching = true;
Assert.IsFalse (eventChecker, "DataSourceChanged#16");
eventChecker = false;
ods.SqlCacheDependency = "Northwind:Employees";
Assert.IsFalse (eventChecker, "DataSourceChanged#17");
}