-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHeader.ascx.cs
43 lines (41 loc) · 1.32 KB
/
Header.ascx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
public partial class Header : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
//绑定用户正在进行的项目
public int DataBind(List<OA_item> itemList, string userName,string loginName)
{
List<OA_item> userItemList = new List<OA_item>();
userNameLiteral.Text = loginName;
foreach (OA_item item in itemList)
{
if (item.status < 100 & (item.leaderName == userName | item.frontendName == userName | item.planeName == userName | item.programName == userName | item.flashName == userName))
{
userItemList.Add(item);
}
}
if (userItemList != null)
{
userItemRptList.DataSource = userItemList;
userItemRptList.DataBind();
}
return userItemList.Count;
}
protected void OutButton_Click(object sender, EventArgs e)
{
Session["user"] = null;
FormsAuthentication.SignOut();
Response.Redirect("sign.aspx");
}
}