?? webform2.aspx.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 RSFlow
{
/// <summary>
/// WebForm2 的摘要說明。
/// </summary>
public class WebForm2 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Button Button1;
private void Page_Load(object sender, System.EventArgs e)
{
// 在此處放置用戶代碼以初始化頁面
}
#region Web 窗體設計器生成的代碼
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 該調用是 ASP.NET Web 窗體設計器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內容。
/// </summary>
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
public void GetUserInfo(string userid,ref string DepID,ref string DepName,ref string JobID,ref string JobName)
{
string dbconn=NaMultiClass.MultiClass.DBConn;
string sqlstr="select * from R_OrgJobUser where UserID='"+userid+"'";
DepID="";DepName="";JobID="";JobName="";
DataTable Vtable=RemotintControl.ServiceControl.GetTable(dbconn,sqlstr);
if (Vtable!=null)
{
if (Vtable.Rows.Count>0)
{
DepID=Vtable.Rows[0]["DepID"].ToString();
DepName=Vtable.Rows[0]["DepName"].ToString();
JobID=Vtable.Rows[0]["JobID"].ToString();
JobName=Vtable.Rows[0]["JobName"].ToString();
}
}
}
private void Button1_Click(object sender, System.EventArgs e)
{
string depid="";
string depname="";
string jobid="";
string jobname="";
GetUserInfo("edc81d29-885b-4bdc-9f9a-5314bf15a579",ref depid,ref depname,ref jobid,ref jobname);
this.TextBox1.Text=depid+"+"+depname+jobid+"+"+jobname;
// public static void GetUserInfo(string userid,ref string DepID,ref string DepName,ref string JobID,ref string JobName)
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -