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

📄 transactdetail.ascx.cs

📁 很不错的公文流转系统
💻 CS
字号:
namespace OI.UserControls
{
	using System;
	using System.Data;
	using System.Drawing;
	using System.Web;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;

	/// <summary>
	///		transactDetail 的摘要说明。
	/// </summary>
	public class transactDetail : System.Web.UI.UserControl
	{
		protected System.Web.UI.WebControls.Table tabTransact;
        protected int reDocumentID			;
        protected bool isView ;
		private void Page_Load(object sender, System.EventArgs e)
		{
			// 在此处放置用户代码以初始化页面
			
				GetDate();
			
		}
		public int ReDocumentID
		{
			set { reDocumentID=value ;}
		}
		public bool IsView
		{
			set {isView=value ;}
		}
		private void GetDate()
		{
			string str="";
			if (!isView)
			{
				 str=" select d.*,au.username  from documentmittransaction d ,accounts_users au where d.userid=au.userid and Istransact=1 and reDocumentID=" + reDocumentID.ToString () ;
			}
			else
			{
				str=" select d.*,au.username  from documentmittransaction d ,accounts_users au where d.userid=au.userid  and reDocumentID=" + reDocumentID.ToString () ;
			}
			OI.DatabaseOper .DatabaseConnect Dbc=new OI.DatabaseOper.DatabaseConnect ();
			DataSet ds=new DataSet ();
			try
			{
				ds=Dbc.getBinding (str,"t");
				if (ds.Tables[0].Rows .Count >0)
				{
                   print (ds.Tables[0]);
				}
			}
			catch
			{
				
			}
		}
		private void print( DataTable dt)
		{   
			tabTransact.Width =System.Web .UI.WebControls .Unit .Parse ("100%");
			foreach (DataRow dr in dt.Rows )
			{
				TableRow tr_one =new TableRow ();
				tr_one.BackColor =System.Drawing .ColorTranslator.FromHtml ("#FFFFD9" );
				
				TableCell tc_Tuser=new TableCell ();
				tc_Tuser.Text ="处理用户:";
				tc_Tuser.Width =System.Web .UI.WebControls .Unit .Parse ("10%");
				tr_one.Cells .Add (tc_Tuser); //增加第一列

				TableCell tc_user = new TableCell ();
				tc_user.Width =System.Web .UI.WebControls .Unit .Parse ("90%");
				tc_user.Text =dr["username"].ToString ();
				tr_one.Cells .Add (tc_user); //增加第二列

				tabTransact.Rows .Add (tr_one);  //增加第一行
                
                TableRow tr_two =new TableRow ();

				TableCell tc_Ttime=new TableCell ();
				tc_Ttime.Text ="处理日期:";
				tr_two.Cells .Add (tc_Ttime);  //增加第一列
           		TableCell tc_time=new TableCell (); //
				tc_time.Text =dr["TransactDate"].ToString ();
				tr_two.Cells .Add (tc_time); //增加第二列
                tabTransact.Rows .Add (tr_two); //增加第二行
           
				TableRow tr_three =new TableRow ();
                tr_three.BackColor =System.Drawing .ColorTranslator.FromHtml ("#FDF1DB" );
				TableCell tc_Tidea=new TableCell ();
				tc_Tidea.Text ="处理意见:";
				tr_three.Cells .Add (tc_Tidea);  //增加第一列
				TableCell tc_idea=new TableCell (); //
                
				tc_idea.Text =Server.HtmlEncode (dr["Idea"].ToString()).Replace ("\r\n","<br/>").Replace (" " ,"&nbsp");
				tr_three.Cells .Add (tc_idea); //增加第二列
				tabTransact.Rows .Add (tr_three); //增加第三行
				

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

		}
		#endregion
	}
}

⌨️ 快捷键说明

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