예제 #1
0
    private void LoadUserInfo()
    {
        int uid = CurrentUserId;
        XiHuan_UserInfoEntity userinfo = new XiHuan_UserInfoEntity();

        userinfo.ID = uid;
        userinfo.Retrieve();
        if (userinfo.IsPersistent)
        {
            headPic.ImageUrl     = CommonMethod.FinalString(userinfo.HeadImage).Length > 0 ? userinfo.HeadImage : "images/nophoto.gif";
            lblUserName.Text     = userinfo.UserName;
            txtEmail.Text        = userinfo.Email;
            rbtSex.SelectedValue = userinfo.Gender.ToString();
            CommonMethod.SelectFlg(ddlProvince, userinfo.ProvinceId.ToString());
            CommonMethod.BindDrop(ddlCity, ProvinceCityFacade.GetInstance().GetCityInfo(ddlProvince.SelectedValue), "city", "cityId");
            CommonMethod.SelectFlg(ddlCity, userinfo.CityId.ToString());
            CommonMethod.BindDrop(ddlArea, ProvinceCityFacade.GetInstance().GetAreaInfo(ddlCity.SelectedValue), "area", "areaId");
            CommonMethod.SelectFlg(ddlArea, userinfo.AreaId.ToString());
            CommonMethod.BindDrop(ddlSchool, ProvinceCityFacade.GetInstance().GetSchoolInfo(ddlProvince.SelectedValue, ddlCity.SelectedValue), "SchoolName", "Id");
            ddlSchool.Items.Insert(0, new ListItem("选择学校", ""));
            CommonMethod.SelectFlg(ddlSchool, userinfo.SchoolId.ToString());
            txtQuestion.Text  = userinfo.Question;
            txtAnswer.Text    = userinfo.Answer;
            txtTel.Value      = userinfo.TelePhone;
            txtWangWang.Value = userinfo.WangWang;
            txt_msn.Value     = userinfo.Msn;
            txt_qq.Value      = userinfo.QQ;
            txtOtherLink.Text = userinfo.OtherLink;
            txtSingnNote.Text = userinfo.SignNote;
        }
    }
예제 #2
0
        public static bool IsCertNoChecked(int id)
        {
            byte rs = 0;
            XiHuan_UserInfoEntity user = new XiHuan_UserInfoEntity();

            user.ID = id;
            user.Retrieve();
            if (user.IsPersistent)
            {
                rs = user.IsCertNoChecked;
            }
            return(rs == 1);
        }
예제 #3
0
        public static bool IsStartUser(int id)
        {
            byte rs = 0;
            XiHuan_UserInfoEntity user = new XiHuan_UserInfoEntity();

            user.ID = id;
            user.Retrieve();
            if (user.IsPersistent)
            {
                rs = user.IsStarUser;
            }
            return(rs == 1);
        }
예제 #4
0
    protected void lnkUnLockUser_Click(object sender, EventArgs e)
    {
        int id = CommonMethod.ConvertToInt(hidId.Value, 0);

        if (id > 0)
        {
            XiHuan_UserInfoEntity user = new XiHuan_UserInfoEntity();
            user.ID = id;
            user.Retrieve();
            if (user.IsPersistent)
            {
                user.IsLocked = 0;
                user.Save();
                Alert("已解除锁定此账号!");
                GetDetail();
            }
        }
    }