本文整理匯總了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");
}