private void ShowUserInfo()
        {
            MemberInfo model = MemberInfo.GetFullInfo(CurrentUser.UserId);

            this.lbluserId.Text    = model.UserId.ToString();
            this.lblUserEmail.Text = model.UserEmail;
            this.txtUserName.Text  = model.UserName;
            this.lblCurScore.Text  = model.CurScore.ToString();
            this.lblRegTime.Text   = model.RegisterTime.ToString("yyyy-MM-dd HH:mm");
            switch (model.Status)
            {
            case MemberStatus.Initiation:
                lblStatus.Text = "初始注册";
                break;

            case MemberStatus.Deleted:
                lblStatus.Text = "已删除";
                break;

            case MemberStatus.Formal:
                lblStatus.Text = "正式";
                break;

            case MemberStatus.Locked:
                lblStatus.Text = "锁定";
                break;
            }

            IShowExtentInfo con = phExtentInfo.FindControl("uccon") as IShowExtentInfo;

            if (con != null)
            {
                con.ShowInfo(model);
            }
        }
Exemplo n.º 2
0
        private void ShowInfo(string userId)
        {
            MemberInfo model = MemberInfo.GetBaseInfo(userId);

            this.lbluserId.Text    = model.UserId.ToString();
            this.txtUserEmail.Text = model.UserEmail;
            this.txtUserName.Text  = model.UserName;
            this.txtAllScore.Text  = model.AllScore.ToString();
            this.txtCurScore.Text  = model.CurScore.ToString();
            this.txtLoginIP.Text   = model.LoginIp;

            //0 未设定 1 个人会员 2 家庭会员 3 学校会员 4 企业会员 :
            Control con = null;

            switch (model.UserType)
            {
            case MemberType.Initiation:
                txtUserType.Text = "初始注册会员";
                break;

            case MemberType.Company:
                txtUserType.Text = "企业会员";
                con = (Control)Page.LoadControl("UCCompanyMemberInfo.ascx");
                break;

            case MemberType.Famly:
                txtUserType.Text = "家庭会员";
                con = (Control)Page.LoadControl("UCFamlyMemberInfo.ascx");
                break;

            case MemberType.Personal:
                txtUserType.Text = "个人会员";
                con = (Control)Page.LoadControl("UCPersonMemberInfo.ascx");
                break;

            case MemberType.School:
                txtUserType.Text = "学校会员";
                con = (Control)Page.LoadControl("UCSchoolMemberInfo.ascx");
                break;
            }

            if (con != null && con is IShowExtentInfo)
            {
                IShowExtentInfo iext = con as IShowExtentInfo;
                iext.ShowInfo(userId);
                iext.SwitchReadOnly(true);
            }

            phExtentInfo.Controls.Clear();
            phExtentInfo.Controls.Add(con);

            switch (model.Status)
            {
            case MemberStatus.Initiation:
                txtstatus.Text = "初始注册";
                break;

            case MemberStatus.Deleted:
                txtstatus.Text = "已删除";
                break;

            case MemberStatus.Formal:
                txtstatus.Text = "正式";
                break;

            case MemberStatus.Locked:
                txtstatus.Text = "锁定";
                break;
            }

            this.txtLastLogin.Text    = model.LastLogin.ToString("yyyy-MM-dd HH:mm");
            this.txtRegisterTime.Text = model.RegisterTime.ToString("yyyy-MM-dd HH:mm");
        }