forked from siteserver/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModalUserView.cs
More file actions
79 lines (73 loc) · 3.16 KB
/
ModalUserView.cs
File metadata and controls
79 lines (73 loc) · 3.16 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
using System;
using System.Collections.Specialized;
using System.Web.UI.WebControls;
using BaiRong.Core;
using BaiRong.Core.Model;
namespace SiteServer.BackgroundPages.Users
{
public class ModalUserView : BasePage
{
protected Literal ltlUserID;
protected Literal ltlUserName;
protected Literal ltlGroup;
protected Literal ltlDisplayName;
protected Literal ltlCreateDate;
protected Literal ltlLastResetPasswordDate;
protected Literal ltlLastActivityDate;
protected Literal ltlEmail;
protected Literal ltlMobile;
protected Literal ltlLoginCount;
protected Literal ltlWritingCount;
protected Literal ltlOrganization;
protected Literal ltlDepartment;
protected Literal ltlPosition;
protected Literal ltlGender;
protected Literal ltlBirthday;
protected Literal ltlEducation;
protected Literal ltlGraduation;
protected Literal ltlAddress;
protected Literal ltlWeiXin;
protected Literal ltlQQ;
protected Literal ltlWeiBo;
protected Literal ltlInterests;
protected Literal ltlSignature;
private UserInfo _userInfo;
public static string GetOpenWindowString(string userName)
{
return PageUtils.GetOpenWindowString("查看用户信息", PageUtils.GetUsersUrl(nameof(ModalUserView), new NameValueCollection
{
{"UserName", userName}
}), 700, 560, true);
}
public void Page_Load(object sender, EventArgs e)
{
if (IsForbidden) return;
var userName = Request.QueryString["UserName"];
_userInfo = BaiRongDataProvider.UserDao.GetUserInfoByAccount(userName);
ltlUserID.Text = _userInfo.UserId.ToString();
ltlUserName.Text = _userInfo.UserName;
ltlGroup.Text = UserGroupManager.GetGroupName(_userInfo.GroupId);
ltlDisplayName.Text = _userInfo.DisplayName;
ltlCreateDate.Text = DateUtils.GetDateAndTimeString(_userInfo.CreateDate);
ltlLastActivityDate.Text = DateUtils.GetDateAndTimeString(_userInfo.LastActivityDate);
ltlLastResetPasswordDate.Text = DateUtils.GetDateAndTimeString(_userInfo.LastResetPasswordDate);
ltlEmail.Text = _userInfo.Email;
ltlMobile.Text = _userInfo.Mobile;
ltlLoginCount.Text = _userInfo.CountOfLogin.ToString();
ltlWritingCount.Text = _userInfo.CountOfWriting.ToString();
ltlOrganization.Text = _userInfo.Organization;
ltlDepartment.Text = _userInfo.Department;
ltlPosition.Text = _userInfo.Position;
ltlGender.Text = _userInfo.Gender;
ltlBirthday.Text = _userInfo.Birthday;
ltlEducation.Text = _userInfo.Education;
ltlGraduation.Text = _userInfo.Graduation;
ltlAddress.Text = _userInfo.Address;
ltlWeiXin.Text = _userInfo.WeiXin;
ltlQQ.Text = _userInfo.Qq;
ltlWeiBo.Text = _userInfo.WeiBo;
ltlInterests.Text = _userInfo.Interests;
ltlSignature.Text = _userInfo.Signature;
}
}
}