⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userinfoviewer.aspx.cs

📁 在编写管理信统软件中,您是否对于繁琐的多用户权限管理而头痛?需要对不同的用户设置不同的权限,需要添加/删除用户,并进行相应的管理.您是否对这些功能感到厌烦? 现在,RGP(Red Glove Perm
💻 CS
字号:
using 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 PermissionBase.Core.Domain;
using PermissionBase.Core.Service;

public partial class Admin_Modules_UserMgr_UserInfoViewer : System.Web.UI.Page
{
    private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(Admin_Modules_UserMgr_UserInfoViewer));

    protected void Page_Load(object sender, EventArgs e)
    {
        
        Response.Cache.SetCacheability(HttpCacheability.NoCache);

        try
        {
            string id = Request.QueryString["id"];
            if (id != null)
            {
                User u = CommonSrv.LoadObjectById(typeof(User), id) as User;

                txtUserLoginId.Value = u.LoginId;
                txtUserName.Value = u.Name;
                txtUserDisabled.Value = ((u.Disabled == 1) ? "已禁用" : "未禁用");
                txtUserIdCard.Value = u.IdCard;
                if (u.Sex.HasValue)
                {
                    txtUserSex.Value = ((u.Sex.Value.ToString() == "0") ? "男" : "女");
                }
                if (u.Birthday.HasValue)
                {
                    txtUserBirthday.Value = u.Birthday.Value.ToString("yyyy-MM-dd");
                }
                txtUserOfficePhone.Value = u.OfficePhone;
                txtUserCellPhone.Value = u.CellPhone;
                txtUserFamilyPhone.Value = u.FamilyPhone;
                txtUserEmail.Value = u.Email;
                txtUserZipCode.Value = u.ZipCode;
                txtaUserRemark.Value = u.Remark;
                txtaUserAddress.Value = u.Address;
                txtUserRegisterDate.Value = u.RegisterDate.ToString("yyyy-MM-dd HH:mm:ss");
            }
        }
        catch (Exception ex)
        {
            ClientScript.RegisterClientScriptBlock(this.GetType(), "error", "<script type=\"text/javascript\">window.returnValue = false;window.close();</script>");
            log.Error(null, ex);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -