forked from siteserver/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModalAdminView.cs
More file actions
41 lines (37 loc) · 1.48 KB
/
ModalAdminView.cs
File metadata and controls
41 lines (37 loc) · 1.48 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
using System;
using System.Collections.Specialized;
using System.Web.UI.WebControls;
using BaiRong.Core;
namespace SiteServer.BackgroundPages.Users
{
public class ModalAdminView : BasePage
{
protected Literal ltlUserName;
protected Literal ltlDisplayName;
protected Literal ltlCreationDate;
protected Literal ltlLastActivityDate;
protected Literal ltlEmail;
protected Literal ltlMobile;
protected Literal ltlRoles;
public static string GetOpenWindowString(string userName)
{
return PageUtils.GetOpenWindowString("查看管理员资料", PageUtils.GetUsersUrl(nameof(ModalAdminView), new NameValueCollection
{
{"UserName", userName}
}), 400, 450, true);
}
public void Page_Load(object sender, EventArgs e)
{
if (IsForbidden) return;
var userName = Body.GetQueryString("UserName");
var adminInfo = BaiRongDataProvider.AdministratorDao.GetByUserName(userName);
ltlUserName.Text = adminInfo.UserName;
ltlDisplayName.Text = adminInfo.DisplayName;
ltlCreationDate.Text = DateUtils.GetDateAndTimeString(adminInfo.CreationDate);
ltlLastActivityDate.Text = DateUtils.GetDateAndTimeString(adminInfo.LastActivityDate);
ltlEmail.Text = adminInfo.Email;
ltlMobile.Text = adminInfo.Mobile;
ltlRoles.Text = AdminManager.GetRolesHtml(userName);
}
}
}