Exemplo n.º 1
0
    private void RetrieveUserData(ISession session)
    {
        int userId = WebUtil.ParamInt("id", -1);

        if (userId > 0)
        {
            User user = Magic.Sys.User.Retrieve(session, userId);
            if (user != null)
            {
                this.txtUserId.Value           = user.UserId.ToString();
                this.txtPassword.Text          = user.Password;
                this.txtUserName.Text          = user.UserName;
                this.txtFullName.Text          = user.FullName;
                this.txtEmail.Text             = user.Email;
                this.ddlUserType.SelectedValue = user.UserType.ToString();
                this.rblStatus.SelectedValue   = user.Status.ToString();
                this.txtExt.Text           = user.Ext;
                this.txtLastLogonTime.Text = RenderUtil.FormatDatetime(user.LastLogonTime);
                this.txtOrgId.Text         = user.OrgId.ToString();
                Org org = Org.Retrieve(session, user.OrgId); //加载组织的描述
                if (org != null)
                {
                    txtOrgDesc.Text = org.OrgName;
                }
            }
        }
    }