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

📄 mycarapply.aspx.cs

📁 视野车辆管理系统源码
💻 CS
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace Views.Car
{
	/// <summary>
	/// MyCarApply 的摘要说明。
	/// </summary>
	public class MyCarApply : Views.CarModule.CarPage
	{
		protected System.Web.UI.WebControls.Label lblDeptCheck;
		protected System.Web.UI.WebControls.Label lblCarsCheck;
		protected System.Web.UI.WebControls.Label lblDeanCheck;
		protected System.Web.UI.WebControls.TextBox txtDeptMemo;
		protected System.Web.UI.WebControls.TextBox txtCarsMemo;
		protected System.Web.UI.WebControls.TextBox txtDeanMemo;
		protected System.Web.UI.HtmlControls.HtmlTableRow trCheckInfo;
		protected System.Web.UI.WebControls.DataGrid dgMyCarApply;
		protected System.Web.UI.WebControls.Label lblCEOCheck;
		protected System.Web.UI.WebControls.TextBox txtCEOMemo;

		private int m_iCurCarApply=-1;

		//
		//页面加载事件代理
		//本代理函数初始化当前选择的数据行
		//
		private void Page_Load(object sender, System.EventArgs e)
		{
			// 在此处放置用户代码以初始化页面
			try
			{
				this.m_iCurCarApply=(int)this.ViewState["CurCarApply"];
			}
			catch
			{
				this.m_iCurCarApply=-1;
			}
		}
		//
		//页面预输出事件代理
		//本代理函数绑定数据,同时根据当前是否选择了数据而显示该申请数据对应的审批状态
		//
		private void Page_PreRender(object sender, System.EventArgs e)
		{
			System.Data.DataView dvTmp=this.DB.GetData("vMyCarApply",-1,"UserID="+this.theUserInfo.UserID.ToString(),"ApplyID Desc").DefaultView;
			this.dgMyCarApply.DataSource=dvTmp;
			this.dgMyCarApply.DataBind();
			this.ViewState["CurCarApply"]=this.m_iCurCarApply;
			this.trCheckInfo.Visible=this.m_iCurCarApply>=0;
			if(this.m_iCurCarApply>=0)
			{
				System.Data.DataRowView drvTmp=dvTmp[this.dgMyCarApply.SelectedIndex];
				this.lblDeptCheck.Text="等待";
				this.lblCarsCheck.Text="等待";
				this.lblDeanCheck.Text="等待";
				this.lblCEOCheck.Text=((bool)drvTmp["CEOCheck"])?"等待":"免审";
				this.txtDeptMemo.Text="";
				this.txtCarsMemo.Text="";
				this.txtDeanMemo.Text="";
				this.txtCEOMemo.Text="";
				System.Data.DataView dvCheckTmp=this.DB.GetData("ApplyCheck",4,"ApplyID="+drvTmp["ApplyID"].ToString(),"CheckID Asc").DefaultView;
				int iCnt=dvCheckTmp.Count;
				if(iCnt>0)
				{
					this.lblDeptCheck.Text=((bool)dvCheckTmp[0]["CheckStatus"])?"通过":"不通过";
					this.txtDeptMemo.Text=dvCheckTmp[0]["Memo"].ToString();
				}
				if(iCnt>1)
				{
					this.lblCarsCheck.Text=((bool)dvCheckTmp[1]["CheckStatus"])?"通过":"不通过";
					this.txtCarsMemo.Text=dvCheckTmp[1]["Memo"].ToString();
				}
				if(iCnt>2)
				{
					this.lblDeanCheck.Text=((bool)dvCheckTmp[2]["CheckStatus"])?"通过":"不通过";
					this.txtDeanMemo.Text=dvCheckTmp[2]["Memo"].ToString();
				}
				if(iCnt>3&&(bool)drvTmp["CEOCheck"])
				{
					this.lblCEOCheck.Text=((bool)dvCheckTmp[3]["CheckStatus"])?"通过":"不通过";
					this.txtCEOMemo.Text=dvCheckTmp[3]["Memo"].ToString();
				}
			}
		}

		#region Web 窗体设计器生成的代码
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{    
			this.dgMyCarApply.SelectedIndexChanged += new System.EventHandler(this.dgMyCarApply_SelectedIndexChanged);
			this.Load += new System.EventHandler(this.Page_Load);
			this.PreRender += new System.EventHandler(this.Page_PreRender);

		}
		#endregion

		//
		//数据选择索引修改事件代理
		//
		private void dgMyCarApply_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			 this.m_iCurCarApply=this.dgMyCarApply.SelectedIndex;
		}
	}
}

⌨️ 快捷键说明

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