OATest/Flow/MyPass.aspx.cs
(完整代码) 1KBusing System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NS_DBOP;
public partial class Flow_MyPass : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Bind();
}
}
public void Bind()
{
int userid = Convert.ToInt32(new DBoperate().ExecuteScalar("select Employeeid from Employee where username='" + Session["UserName"] + "'"));
DataSet ds = new DBoperate().ExecuteQuery("select * from FlowDoc where ID in (select DocID from FlowPath where UserID="+userid+")" , 0, 0, "table1");
DataView dv = ds.Tables[0].DefaultView;
PagedDataSource pds = new PagedDataSource();
AspNetPager1.RecordCount = dv.Count;
pds.DataSource = dv;
pds.AllowPaging = true;
pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
pds.PageSize = AspNetPager1.PageSize;
this.GridView1.DataSource = pds;
this.GridView1.DataBind();
this.lblCount.Text = "共" + ds.Tables[0].Rows.Count + "条记录";
}
public string getFlow(string id)
{
string flow = new DBoperate().ExecuteScalar("select Name from Flow where ID=" + Convert.ToInt32(id)).ToString();
return flow;
}
public string getUser(string id)
{
string user = new DBoperate().ExecuteScalar("select Name from Employee where Employeeid=" + Convert.ToInt32(id)).ToString();
return user;
}
protected void AspNetPager1_PageChanged(object sender, EventArgs e)
{
Bind();
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
