⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 datagrid.cs

📁 不错的人事管理系统
💻 CS
📖 第 1 页 / 共 3 页
字号:
		}


		public virtual bool AutoGenerateColumns
		{
			get
			{
				object local0;

				local0 = this.ViewState["AutoGenerateColumns"];
				if (local0 != null)
					return (bool) local0;
				return true;
			}
			set
			{
				this.ViewState["AutoGenerateColumns"] = value;
			}
		}

		private PagedDataSource CreatePagedDataSource()
		{
			//TODO:
			throw new Exception("TODO");
		}

		public virtual int EditItemIndex
		{
			get
			{
				object local0;

				local0 = this.ViewState["EditItemIndex"];
				if (local0 != null)
					return (int) local0;
				return -1;
			}
			set
			{
				if (value < -1)
					throw new ArgumentOutOfRangeException("value");
				this.ViewState["EditItemIndex"] = value;
			}
		}

		public event System.Web.UI.WebControls.DataGridCommandEventHandler CancelCommand
		{
			add
			{
				this.Events.AddHandler(DataGrid.EventCancelCommand, value);
			}
			remove
			{
				this.Events.RemoveHandler(DataGrid.EventCancelCommand, value);
			}
		}
		public event System.Web.UI.WebControls.DataGridCommandEventHandler DeleteCommand
		{
			add
			{
				this.Events.AddHandler(DataGrid.EventDeleteCommand, value);
			}
			remove
			{
				this.Events.RemoveHandler(DataGrid.EventDeleteCommand, value);
			}
		}
		public event System.Web.UI.WebControls.DataGridCommandEventHandler EditCommand
		{
			add
			{
				this.Events.AddHandler(DataGrid.EventEditCommand, value);
			}
			remove
			{
				this.Events.RemoveHandler(DataGrid.EventEditCommand, value);
			}
		}

		public event System.Web.UI.WebControls.DataGridCommandEventHandler ItemCommand
		{
			add
			{
				this.Events.AddHandler(DataGrid.EventItemCommand, value);
			}
			remove
			{
				this.Events.RemoveHandler(DataGrid.EventItemCommand, value);
			}
		}
		public event System.Web.UI.WebControls.DataGridItemEventHandler ItemCreated
		{
			add
			{
				this.Events.AddHandler(DataGrid.EventItemCreated, value);
			}
			remove
			{
				this.Events.RemoveHandler(DataGrid.EventItemCreated, value);
			}
		}

		public event System.Web.UI.WebControls.DataGridItemEventHandler ItemDataBound
		{
			add
			{
				this.Events.AddHandler(DataGrid.EventItemDataBound, value);
			}
			remove
			{
				this.Events.RemoveHandler(DataGrid.EventItemDataBound, value);
			}
		}
		public event System.Web.UI.WebControls.DataGridPageChangedEventHandler PageIndexCh
		{
			add
			{
				this.Events.AddHandler(DataGrid.EventPageIndexChanged, value);
			}
			remove
			{
				this.Events.RemoveHandler(DataGrid.EventPageIndexChanged, value);
			}
		}

		public event System.Web.UI.WebControls.DataGridSortCommandEventHandler SortCommand
		{
			add
			{
				this.Events.AddHandler(DataGrid.EventSortCommand, value);
			}
			remove
			{
				this.Events.RemoveHandler(DataGrid.EventSortCommand, value);
			}
		}

		public event System.Web.UI.WebControls.DataGridCommandEventHandler UpdateCommand
		{
			add
			{
				this.Events.AddHandler(DataGrid.EventUpdateCommand, value);
			}
			remove
			{
				this.Events.RemoveHandler(DataGrid.EventUpdateCommand, value);
			}
		}

		public virtual bool AllowCustomPaging
		{
			get
			{
				object local0;

				local0 = this.ViewState["AllowCustomPaging"];
				if (local0 != null)
					return (Boolean) local0;
				return false;
			}
			set
			{
				this.ViewState["AllowCustomPaging"]= value;
			}
		}

		
		public virtual bool AllowPaging
		{
			get
			{
				object local0;

				local0 = this.ViewState["AllowPaging"];
				if (local0 != null)
					return (Boolean) local0;
				return false;
			}
			set
			{
				this.ViewState["AllowPaging"]= value;
			}
		}

		public virtual bool AllowSorting
		{
			get
			{
				object local0;

				local0 = this.ViewState["AllowSorting"];
				if (local0 != null)
					return (Boolean) local0;
				return false;
			}
			set
			{
				this.ViewState["AllowSorting"]=value;
			}
		}

		
		public virtual TableItemStyle AlternatingItemStyle
		{
			get
			{
				if (this.alternatingItemStyle == null) 
				{
					this.alternatingItemStyle = new TableItemStyle();
					if (this.IsTrackingViewState)
						this.alternatingItemStyle.TrackViewState();
				}
				return this.alternatingItemStyle;
			}
		}

		


		
		public virtual string BackImageUrl
		{
			get
			{
				if (!(this.ControlStyleCreated))
					return System.String.Empty;
				return ((TableStyle)this.ControlStyle).BackImageUrl;
			}
			set
			{
				((TableStyle)this.ControlStyle).BackImageUrl = value;
			}
		}

//		public virtual DataGridColumnCollection Columns
//		{
//			get
//			{
//				if (this.columnCollection == null) 
//				{
//					this.columns = new ArrayList();
//					this.columnCollection = new DataGridColumnCollection(this, this.columns);
//					if (this.IsTrackingViewState)
//						this.columnCollection.TrackViewState();
//				}
//				return this.columnCollection;
//			}
//		}


		
		public int CurrentPageIndex
		{
			get
			{
				object local0;

				local0 = this.ViewState["CurrentPageIndex"];
				if (local0 != null)
					return (Int32) local0;
				return 0;
			}
			set
			{
				if (value < 0)
					throw new ArgumentOutOfRangeException("value");
				this.ViewState["CurrentPageIndex"]= value;
			}

		}

		
//		public virtual int EditItemIndex
//		{
//			get
//			{
//				object local0;
//
//				local0 = this.ViewState["EditItemIndex"];
//				if (local0 != null)
//					return (Int32) local0;
//				return -1;
//			}
//			set
//			{
//				if (value < -1)
//					throw new ArgumentOutOfRangeException("value");
//				this.ViewState["EditItemIndex"]= value;
//			}
//		}

		
		public virtual TableItemStyle EditItemStyle
		{
			get
			{
				if (this.editItemStyle == null) 
				{
					this.editItemStyle = new TableItemStyle();
					if (this.IsTrackingViewState)
						this.editItemStyle.TrackViewState();
				}
				return this.editItemStyle;
			}
		}

		
		public virtual TableItemStyle FooterStyle
		{
			get
			{
				if (this.footerStyle == null) 
				{
					this.footerStyle = new TableItemStyle();
					if (this.IsTrackingViewState)
						this.footerStyle.TrackViewState();
				}
				return this.footerStyle;
			}
		}

		
		public virtual TableItemStyle HeaderStyle
		{
			get
			{
				if (this.headerStyle == null) 
				{
					this.headerStyle = new TableItemStyle();
					if (this.IsTrackingViewState)
						this.headerStyle.TrackViewState();
				}
				return this.headerStyle;
			}
		}

		
		public virtual DataGridItemCollection Items
		{
			get
			{
				if (this.itemsCollection == null) 
				{
					if (this.itemsArray == null)
						this.EnsureChildControls();
					if (this.itemsArray == null)
						this.itemsArray = new ArrayList();
					this.itemsCollection = new DataGridItemCollection(this.itemsArray);
				}
				return this.itemsCollection;
			}
		}

		public virtual TableItemStyle ItemStyle
		{
			get
			{
				if (this.itemStyle == null) 
				{
					this.itemStyle = new TableItemStyle();
					if (this.IsTrackingViewState)
						this.itemStyle.TrackViewState();
				}
				return this.itemStyle;
			}
		}

		
		public int PageCount
		{
			get
			{
				object local0;

				if (this.pagedDataSource != null)
					return this.pagedDataSource.PageCount;
				local0 = this.ViewState["PageCount"];
				if (local0 == null)
					return 0;
				return (Int32) local0;
			}
		}

		
		public virtual DataGridPagerStyle PagerStyle
		{
			get
			{
				if (this.pagerStyle == null) 
				{
					this.pagerStyle = new DataGridPagerStyle(this);
					if (this.IsTrackingViewState)
						this.pagerStyle.TrackViewState();
				}
				return this.pagerStyle;
			}
		}

		
		public virtual int PageSize
		{
			get
			{
				object local0;

				local0 = this.ViewState["PageSize"];
				if (local0 != null)
					return (Int32) local0;
				return 10;
			}
			set
			{
				if (value < 1)
					throw new ArgumentOutOfRangeException("value");
				this.ViewState["PageSize"]= value;
			}
		}

		public virtual int SelectedIndex
		{
			get
			{
				object local0;

				local0 = this.ViewState["SelectedIndex"];
				if (local0 != null)
					return (int) local0;
				return -1;
			}
			set
			{
				/*
				int local0;
				DataGridItem local1;
				ListItemType local2;

				if (value < -1)
					throw new ArgumentOutOfRangeException("value");
				local0 = this.SelectedIndex;
				this.ViewState["SelectedIndex"] = value;
				if (this.itemsArray != null) 
				{
					if (local0 != -1 && this.itemsArray.Count > local0) 
					{
						local1 = (DataGridItem) this.itemsArray[local0];
						if (local1.ItemType != 5) 
						{
							local2 = 2;
							if (local0 % 2 != 0)
								local2 = 3;
							local1.SetItemType(local2);
						}
					}
					if (value != -1 && this.itemsArray.Count > value) 
					{
						local1 = (DataGridItem) this.itemsArray[value];
						if (local1.ItemType != 5)
							local1.SetItemType(4);
					}
				}
				*/
			}
		}


		
		public virtual DataGridItem SelectedItem
		{
			get
			{
				int local0;
				DataGridItem local1;

				local0 = this.SelectedIndex;
				local1 = null;
				if (local0 != -1)
					local1 = this.Items[local0];
				return local1;
			}
		}

		
		public virtual TableItemStyle SelectedItemStyle
		{
			get
			{
				if (this.selectedItemStyle == null) 
				{
					this.selectedItemStyle = new TableItemStyle();
					if (this.IsTrackingViewState)
						this.selectedItemStyle.TrackViewState();
				}
				return this.selectedItemStyle;
			}
		}

		
		public virtual bool ShowFooter
		{
			get
			{
				object local0;

				local0 = this.ViewState["ShowFooter"];
				if (local0 != null)
					return (Boolean) local0;
				return false;
			}
			set
			{
				this.ViewState["ShowFooter"] =  value;
			}
		}

		
		public virtual bool ShowHeader
		{
			get
			{
				object local0;

				local0 = this.ViewState["ShowHeader"];
				if (local0 != null)
					return (Boolean) local0;
				return true;
			}
			set
			{
				this.ViewState["ShowHeader"]= value;
			}
		}

		
		public virtual int VirtualItemCount
		{
			get
			{
				object local0;

				local0 = this.ViewState["VirtualItemCount"];
				if (local0 != null)
					return (Int32) local0;
				return 0;
			}
			set
			{
				if (value < 0)
					throw new ArgumentOutOfRangeException("value");
				this.ViewState["VirtualItemCount"]= value;
			}
		}

	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -