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

📄 datagrid.cs

📁 不错的人事管理系统
💻 CS
📖 第 1 页 / 共 3 页
字号:
//					local15 = local14.ToString(NumberFormatInfo.InvariantInfo);
//					if (local14 == local7) 
//					{
//						local16 = new Label();
//						local16.Text = local15;
//						local0.Controls.Add(local16);
//					}
//					else 
//					{
//						local13 = new DataGridLinkButton();
//						local13.Text = local15;
//						local13.CommandName = "Page";
//						local13.CommandArgument = local15;
//						local13.CausesValidation = false;
//						local0.Controls.Add(local13);
//					}
//					if (local14 < local11)
//						local0.Controls.Add(new LiteralControl("&nbsp;"));
//					local14++;
//				}
//				if (local6 > local11) 
//				{
//					local0.Controls.Add(new LiteralControl("&nbsp;"));
//					local13 = new DataGridLinkButton();
//					local13.Text = "...";
//					local13.CommandName = "Page";
//					local17 = local11 + 1;
//					local13.CommandArgument = local17.ToString(NumberFormatInfo.InvariantInfo);
//					local13.CausesValidation = false;
//					local0.Controls.Add(local13);
//				}
//			}
//			i4: item.Cells.Add(local0);
		}

		
		protected override void LoadViewState(object savedState) 
		{
//			object[] local0;
//			object[] local1;
//			int local2;
//			int local3;
//			BoundColumn local4;
//
//			if (savedState != null) 
//			{
//				local0 = (object[]) savedState;
//				if (local0[0])
//					this.LoadViewState(local0[0]);
//				if (local0[1])
//					this.Columns.LoadViewState(local0[1]);
//				if (local0[2])
//					this.PagerStyle.LoadViewState(local0[2]);
//				if (local0[3])
//					this.HeaderStyle.LoadViewState(local0[3]);
//				if (local0[4])
//					this.FooterStyle.LoadViewState(local0[4]);
//				if (local0[5])
//					this.ItemStyle.LoadViewState(local0[5]);
//				if (local0[6])
//					this.AlternatingItemStyle.LoadViewState(local0[6]);
//				if (local0[7])
//					this.SelectedItemStyle.LoadViewState(local0[7]);
//				if (local0[8])
//					this.EditItemStyle.LoadViewState(local0[8]);
//				if (local0[9]) 
//				{
//					local1 = (object[]) local0[9];
//					local2 = (int) local1.Length;
//					if (local2 != 0)
//						this.autoGenColumnsArray = new ArrayList();
//					else
//						this.autoGenColumnsArray = null;
//					local3 = 0;
//					while (local3 < local2) 
//					{
//						local4 = new BoundColumn();
//						local4.TrackViewState();
//						local4.LoadViewState(local1[local3]);
//						local4.SetOwner(this);
//						this.autoGenColumnsArray.Add(local4);
//						local3++;
//					}
//				}
//			}
		}

		
		protected override bool OnBubbleEvent(object source, EventArgs e) 
		{
			throw new Exception("dd");
//			bool local0;
//			DataGridCommandEventArgs local1;
//			string local2;
//			string local3;
//			int local4;
//			DataGridPageChangedEventArgs local5;
//			DataGridSortCommandEventArgs local6;
//
//			local0 = false;
//			if (e as DataGridCommandEventArgs != null) 
//			{
//				local1 = (DataGridCommandEventArgs) e;
//				this.OnItemCommand(local1);
//				local0 = true;
//				local2 = local1.CommandName;
//				if (System.String.Compare(local2, "Select", true) == 0) 
//				{
//					this.SelectedIndex = local1.Item.ItemIndex;
//					this.OnSelectedIndexChanged(System.EventArgs.Empty);
//				}
//				else 
//				{
//					if (System.String.Compare(local2, "Page", true) == 0) 
//					{
//						local3 = (String) local1.CommandArgument;
//						local4 = this.CurrentPageIndex;
//						if (System.String.Compare(local3, "Next", true) == 0)
//							local4++;
//						else 
//						{
//							if (System.String.Compare(local3, "Prev", true) == 0)
//								local4 = local4 - 1;
//							else
//								local4 = System.Int32.Parse(local3) - 1;
//						}
//						local5 = new DataGridPageChangedEventArgs(source, local4);
//						this.OnPageIndexChanged(local5);
//					}
//					else 
//					{
//						if (System.String.Compare(local2, "Sort", true) == 0) 
//						{
//							local6 = new DataGridSortCommandEventArgs(source, local1);
//							this.OnSortCommand(local6);
//						}
//						else 
//						{
//							if (System.String.Compare(local2, "Edit", true) == 0)
//								this.OnEditCommand(local1);
//							else 
//							{
//								if (System.String.Compare(local2, "Update", true) == 0)
//									this.OnUpdateCommand(local1);
//								else 
//								{
//									if (System.String.Compare(local2, "Cancel", true) == 0)
//										this.OnCancelCommand(local1);
//									else 							if (System.String.Compare(local2, "Delete", true) == 0)
//										this.OnDeleteCommand(local1);
//								}
//							}
//						}
//					}
//				}
//			}
//			return local0;
		}

		
		protected virtual void OnCancelCommand(DataGridCommandEventArgs e) 
		{
			DataGridCommandEventHandler local0;

			local0 = (DataGridCommandEventHandler) this.Events[DataGrid.EventCancelCommand];
			if (local0 != null)
				local0(this, e);
		}

		
		internal void OnColumnsChanged() 
		{
		}

		
		protected virtual void OnDeleteCommand(DataGridCommandEventArgs e) 
		{
			DataGridCommandEventHandler local0;

			local0 = (DataGridCommandEventHandler) this.Events[DataGrid.EventDeleteCommand];
			if (local0 != null)
				local0(this, e);
		}

		
		protected virtual void OnEditCommand(DataGridCommandEventArgs e) 
		{
			DataGridCommandEventHandler local0;

			local0 = (DataGridCommandEventHandler) this.Events[DataGrid.EventEditCommand];
			if (local0 != null)
				local0(this, e);
		}

		
		protected virtual void OnItemCommand(DataGridCommandEventArgs e) 
		{
			DataGridCommandEventHandler local0;

			local0 = (DataGridCommandEventHandler) this.Events[DataGrid.EventItemCommand];
			if (local0 != null)
				local0(this, e);
		}

		
		protected virtual void OnItemCreated(DataGridItemEventArgs e) 
		{
			DataGridItemEventHandler local0;

			local0 = (DataGridItemEventHandler) this.Events[DataGrid.EventItemCreated];
			if (local0 != null)
				local0(this, e);
		}

		
		protected virtual void OnItemDataBound(DataGridItemEventArgs e) 
		{
			DataGridItemEventHandler local0;

			local0 = (DataGridItemEventHandler) this.Events[DataGrid.EventItemDataBound];
			if (local0 != null)
				local0(this, e);
		}

		
		protected virtual void OnPageIndexChanged(DataGridPageChangedEventArgs e) 
		{
			DataGridPageChangedEventHandler local0;

			local0 = (DataGridPageChangedEventHandler) this.Events[DataGrid.EventPageIndexChanged];
			if (local0 != null)
				local0(this, e);
		}

		
		internal void OnPagerChanged() 
		{
		}

		
		protected virtual void OnSortCommand(DataGridSortCommandEventArgs e) 
		{
			DataGridSortCommandEventHandler local0;

			local0 = (DataGridSortCommandEventHandler) this.Events[DataGrid.EventSortCommand];
			if (local0 != null)
				local0(this, e);
		}

		
		protected virtual void OnUpdateCommand(DataGridCommandEventArgs e) 
		{
			DataGridCommandEventHandler local0;

			local0 = (DataGridCommandEventHandler) this.Events[DataGrid.EventUpdateCommand];
			if (local0 != null)
				local0(this, e);
		}

		private DataGridItem CreateItem(
			int itemIndex, 
			int dataSourceIndex, 
			ListItemType itemType, 
			bool dataBind, 
			object dataItem, 
			DataGridColumn[] columns, 
			TableRowCollection rows, 
			PagedDataSource pagedDataSource
			) 
		{
			throw new Exception("TODO");
			/*
			DataGridItem local0;
			DataGridItemEventArgs local1;

			local0 = this.CreateItem(itemIndex, dataSourceIndex, itemType);
			local1 = new DataGridItemEventArgs(local0);
			if (itemType != ListItemType.Pager) 
			{
				this.InitializeItem(local0, columns);
				if (dataBind)
					local0.DataItem = dataItem;
				this.OnItemCreated(local1);
				rows.Add(local0);
				if (!(dataBind))
					goto i0;
				local0.DataBind();
				this.OnItemDataBound(local1);
				local0.DataItem = null;
			}
			else 
			{
				this.InitializePager(local0, (int) columns.Length, pagedDataSource);
				this.OnItemCreated(local1);
				rows.Add(local0);
			}
			i0: return local0;
			*/
		}

		protected override void PrepareControlHierarchy() 
		{
//			Table local0;
//			TableRowCollection local1;
//			int local2;
//			int local3;
//			System.Web.UI.WebControls.DataGridColumn[] local4;
//			Style local5;
//			int local6;
//			DataGridItem local7;
//			Style local8;
//			Style local9;
//			TableCellCollection local10;
//			int local11;
//			int local12;
//			int local13;
//			Style local14;
//			ListItemType local15;
//
//			if (this.Controls.Count == 0)
//				return;
//			local0 = (Table) this.Controls[0];
//			local0.CopyBaseAttributes(this);
//			if (this.ControlStyleCreated)
//				local0.ApplyStyle(this.ControlStyle);
//			else 
//			{
//				local0.GridLines = GridLines.Both;
//				local0.CellSpacing = 0;
//			}
//			local1 = local0.Rows;
//			local2 = local1.Count;
//			if (local2 == 0)
//				return;
//			local3 = this.Columns.Count;
//			local4 = new DataGridColumn[checked((uint) local3)];
//			if (local3 > 0)
//				this.Columns.CopyTo(local4, 0);
//			local5 = null;
//			if (this.alternatingItemStyle != null) 
//			{
//				local5 = new TableItemStyle();
//				local5.CopyFrom(this.itemStyle);
//				local5.CopyFrom(this.alternatingItemStyle);
//			}
//			else
//				local5 = this.itemStyle;
//			local6 = 0;
//			while (local6 < local2) 
//			{
//				local7 = (DataGridItem) local1[local6];
//				local15 = local7.ItemType;
//				switch (local15) 
//				{
//					case 0:
//						if (!(this.ShowHeader)) 
//						{
//							local7.Visible = false;
//							goto i5;
//						}
//						if (this.headerStyle == null)
//							break;
//						local7.MergeStyle(this.headerStyle);
//						break;
////						break;
//					case 1:
//						if (!(this.ShowFooter)) 
//						{
//							local7.Visible = false;
//							goto i5;
//						}
//						local7.MergeStyle(this.footerStyle);
//						break;
////						break;
//					case 7:
//						if (!(this.pagerStyle.Visible)) 
//						{
//							local7.Visible = false;
//							goto i5;
//						}
//						if (local6 == 0) 
//						{
//							if (this.pagerStyle.IsPagerOnTop)
//								goto i6;
//							local7.Visible = false;
//							goto i5;
//						}
//						if (!(this.pagerStyle.IsPagerOnBottom)) 
//						{
//							local7.Visible = false;
//							goto i5;
//						}
//						i6: local7.MergeStyle(this.pagerStyle);
//						break;
//						break;
//					case 2:
//						local7.MergeStyle(this.itemStyle);
//						break;
//						break;
//					case 3:
//						local7.MergeStyle(local5);
//						break;
//						break;
//					case 4:
//						local8 = new TableItemStyle();
//						if (local7.ItemIndex % 2 != 0)
//							local8.CopyFrom(local5);
//						else
//							local8.CopyFrom(this.itemStyle);
//						local8.CopyFrom(this.selectedItemStyle);
//						local7.MergeStyle(local8);
//						break;
//						break;
//					case 5:
//						local9 = new TableItemStyle();
//						if (local7.ItemIndex % 2 != 0)
//							local9.CopyFrom(local5);
//						else
//							local9.CopyFrom(this.itemStyle);
//						if (local7.ItemIndex == this.SelectedIndex)
//							local9.CopyFrom(this.selectedItemStyle);
//						local9.CopyFrom(this.editItemStyle);
//						local7.MergeStyle(local9);
//						break;
//				}
//				local10 = local7.Cells;
//				local11 = local10.Count;
//				if (local3 > 0 && local7.ItemType != 7) 
//				{
//					local12 = local11;
//					if (local3 < local11)
//						local12 = local3;
//					local13 = 0;
//					while (local13 < local12) 
//					{
//						if (!(local4[local13].Visible))
//							local10[local13].Visible = false;
//						else 
//						{
//							local14 = null;
//							local15 = local7.ItemType;
//							switch (local15) 
//							{
//								case 0:
//									local14 = local4[local13].HeaderStyleInternal;
//									goto i7;
//									break;
//								case 1:
//									local14 = local4[local13].FooterStyleInternal;
//									goto i7;
//									break;
//							}
//							local14 = local4[local13].ItemStyleInternal;
//						i7: local10.get_Item(local13).MergeStyle(local14);
//						}
//						local13++;
//					}
//				}
//			i5: local6++;
//			}
		}

		
		protected override object SaveViewState() 
		{
			throw new Exception("");
//			object local0;
//			object local1;
//			object local2;
//			object local3;
//			object local4;
//			object local5;
//			object local6;
//			object local7;
//			object local8;
//			object[] local9;
//			int local10;
//			object[] local11;
//
//			local0 = this.SaveViewState();
//			if (this.columnCollection == null)
//				goto i-1;
//			local1 = this.columnCollection.SaveViewState();
//			if (this.pagerStyle == null)
//				goto i-1;
//			local2 = this.pagerStyle.SaveViewState();
//			if (this.headerStyle == null)
//				goto i-1;
//			local3 = this.headerStyle.SaveViewState();
//			if (this.footerStyle == null)
//				goto i-1;
//			local4 = this.footerStyle.SaveViewState();
//			if (this.itemStyle == null)
//				goto i-1;
//			local5 = this.itemStyle.SaveViewState();
//			if (this.alternatingItemStyle == null)
//				goto i-1;
//			local6 = this.alternatingItemStyle.SaveViewState();
//			if (this.selectedItemStyle == null)
//				goto i-1;
//			local7 = this.selectedItemStyle.SaveViewState();
//			if (this.editItemStyle == null)
//				goto i-1;
//			local8 = this.editItemStyle.SaveViewState();
//			local9 = null;
//			if (this.autoGenColumnsArray != null && this.autoGenColumnsArray.Count != 0) 
//			{
//				local9 = new Object[checked((uint) this.autoGenColumnsArray.Count)];
//				local10 = 0;
//				while (local10 < (int) local9.Length) 
//				{
//					local9[local10] = (IStateManager) this.autoGenColumnsArray.get_Item(local10).SaveViewState();
//					local10++;
//				}
//			}
//			local11 = new Object[10];
//			local11[0] = local0;
//			local11[1] = local1;
//			local11[2] = local2;
//			local11[3] = local3;
//			local11[4] = local4;
//			local11[5] = local5;
//			local11[6] = local6;
//			local11[7] = local7;
//			local11[8] = local8;
//			local11[9] = local9;
//			return local11;
		}

		
		internal void StoreEnumerator(IEnumerator dataSource, object firstDataItem) 
		{
			this.storedData = dataSource;
			this.firstDataItem = firstDataItem;
			this.storedDataValid = true;
		}

		
		protected override void TrackViewState() 
		{
			this.TrackViewState();
			if (this.columnCollection != null)
				((System.Web.UI.IStateManager)(this.columnCollection)).TrackViewState();
			if (this.pagerStyle != null)
				this.pagerStyle.TrackViewState();
			if (this.headerStyle != null)
				this.headerStyle.TrackViewState();
			if (this.footerStyle != null)
				this.footerStyle.TrackViewState();
			if (this.itemStyle != null)
				this.itemStyle.TrackViewState();
			if (this.alternatingItemStyle != null)
				this.alternatingItemStyle.TrackViewState();
			if (this.selectedItemStyle != null)
				this.selectedItemStyle.TrackViewState();
			if (this.editItemStyle != null)
				this.editItemStyle.TrackViewState();

⌨️ 快捷键说明

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