Пример #1
0
		public void PagerSettings_AssignProperty ()
		{
			PagerSettings pager = new PagerSettings ();
			pager.FirstPageImageUrl = "test";
			Assert.AreEqual ("test", pager.FirstPageImageUrl, "FirstPageImageUrl");
			pager.FirstPageText = "test";
			Assert.AreEqual ("test", pager.FirstPageText, "FirstPageText");
			pager.LastPageImageUrl = "test";
			Assert.AreEqual ("test", pager.LastPageImageUrl, "LastPageImageUrl");
			pager.LastPageText = "test";
			Assert.AreEqual ("test", pager.LastPageText, "LastPageText");
			pager.Mode = PagerButtons.NextPrevious;
			Assert.AreEqual (PagerButtons.NextPrevious, pager.Mode, "Mode");
			pager.NextPageImageUrl = "test";
			Assert.AreEqual ("test", pager.NextPageImageUrl, "NextPageImageUrl");
			pager.NextPageText = "test";
			Assert.AreEqual ("test", pager.NextPageText, "NextPageText");
			pager.PageButtonCount = 20;
			Assert.AreEqual (20, pager.PageButtonCount, "PageButtonCount");
			pager.Position = PagerPosition.Top;
			Assert.AreEqual (PagerPosition.Top, pager.Position, "Position");
			pager.PreviousPageImageUrl = "test";
			Assert.AreEqual ("test", pager.PreviousPageImageUrl, "PreviousPageImageUrl");
			pager.PreviousPageText = "test";
			Assert.AreEqual ("test", pager.PreviousPageText, "PreviousPageText");
			pager.Visible = false;
			Assert.AreEqual (false, pager.Visible, "Visible");
		}
Пример #2
0
 public DataPager(PagerSettings setting, int pageIndex, int recordCount, int pageSize)
 {
     _settings = setting;
     _pageIndex = pageIndex;
     _recordCount = recordCount;
     _pageSize = pageSize;
     _pageCount = _recordCount % _pageSize == 0 ? _recordCount / _pageSize : _recordCount / _pageSize + 1;
     GeneratePage();
 }
Пример #3
0
 /// <summary>
 /// 设置pageSettings对象
 /// </summary>
 /// <param name="sysPageSettings"></param>
 /// <remarks>
 /// 设置pageSettings对象
 /// </remarks>
 public void LoadData(System.Web.UI.WebControls.PagerSettings sysPageSettings)
 {
     this.FirstPageImageUrl = sysPageSettings.FirstPageImageUrl;
     this.FirstPageText     = sysPageSettings.FirstPageText;
     this.LastPageImageUrl  = sysPageSettings.LastPageImageUrl;
     this.LastPageText      = sysPageSettings.LastPageText;
     this.Mode                 = this.GetDeluxePagerMode(sysPageSettings.Mode);
     this.NextPageImageUrl     = sysPageSettings.NextPageImageUrl;
     this.NextPageText         = sysPageSettings.NextPageText;
     this.PageButtonCount      = sysPageSettings.PageButtonCount;
     this.PreviousPageImageUrl = sysPageSettings.PreviousPageImageUrl;
     this.PreviousPageText     = sysPageSettings.PreviousPageText;
 }
Пример #4
0
		public void PagerSettings_DefaultProperty ()
		{
			PagerSettings pager = new PagerSettings ();
			Assert.AreEqual ("", pager.FirstPageImageUrl, "FirstPageImageUrl");
			Assert.AreEqual ("&lt;&lt;", pager.FirstPageText, "FirstPageText");
			Assert.AreEqual ("", pager.LastPageImageUrl, "LastPageImageUrl");
			Assert.AreEqual ("&gt;&gt;", pager.LastPageText, "LastPageText");
			Assert.AreEqual (PagerButtons.Numeric, pager.Mode, "Mode");
			Assert.AreEqual ("", pager.NextPageImageUrl, "NextPageImageUrl");
			Assert.AreEqual ("&gt;", pager.NextPageText, "NextPageText");
			Assert.AreEqual (10, pager.PageButtonCount, "PageButtonCount");
			Assert.AreEqual (PagerPosition.Bottom, pager.Position, "Position");
			Assert.AreEqual ("", pager.PreviousPageImageUrl, "PreviousPageImageUrl");
			Assert.AreEqual ("&lt;", pager.PreviousPageText, "PreviousPageText");
			Assert.AreEqual (true, pager.Visible, "Visible");
		}
Пример #5
0
 private void @__BuildControl__control9(System.Web.UI.WebControls.PagerSettings @__ctrl)
 {
     @__ctrl.Mode     = global::System.Web.UI.WebControls.PagerButtons.NumericFirstLast;
     @__ctrl.Position = global::System.Web.UI.WebControls.PagerPosition.TopAndBottom;
 }
Пример #6
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="sysPagerSettings"></param>
 /// <remarks>
 /// 构造函数
 /// </remarks>
 public PagerSettings(System.Web.UI.WebControls.PagerSettings sysPagerSettings)
     : this()
 {
     LoadData(sysPagerSettings);
 }
Пример #7
0
		public void PagerSettings_ToString ()
		{
			PagerSettings pager = new PagerSettings ();
			string result = pager.ToString ();
			Assert.AreEqual ("", result, "ToString");
		}
Пример #8
0
		public void PagerSettings_PropertyChanged ()
		{
			PagerSettings pager = new PagerSettings ();
			pager.PropertyChanged += new EventHandler (pager_PropertyChanged);
			pager.FirstPageImageUrl = "test";
			eventassert ("FirstPageImageUrl");
			pager.FirstPageText = "test";
			eventassert ("FirstPageText");
			pager.LastPageImageUrl = "test";
			eventassert ("LastPageImageUrl");
			pager.LastPageText = "test";
			eventassert ("LastPageText");
			pager.Mode = PagerButtons.NextPrevious;
			eventassert ("Mode");
			pager.NextPageImageUrl = "test";
			eventassert ("NextPageImageUrl");
			pager.NextPageText = "test";
			eventassert ("NextPageText");
			pager.PageButtonCount = 20;
			eventassert ("PageButtonCount");
			pager.PreviousPageImageUrl = "test";
			eventassert ("PreviousPageImageUrl");
			pager.PreviousPageText = "test";
			eventassert ("PreviousPageText");
		}