protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            if (string.IsNullOrEmpty(Cmn.Cookies.Get("login_UserIdx")))
            {
                Response.Redirect("login.aspx?from=" + Request.Url.ToString());
            }

            int uIdx = int.Parse(Cmn.Cookies.Get("login_UserIdx"));
            ent = ent.Get(uIdx);

            if (ent.VipBool == "yes")
            {
                strVip      = "VIP 会员";
                strPosion   = "至臻坊会员专享";
                strTopClass = "subTit vipTit";
            }

            this.RealName.Value    = ent.RealName;
            this.MobilePhone.Value = ent.MobilePhone;
            this.Hidden1.Value     = ent.Province;
            this.City.Value        = ent.City;
            this.Address.Value     = ent.Address;
            this.ZipCode.Value     = ent.ZipCode;
        }
    }
Exemplo n.º 2
0
    //获取登录者的信息
    private string GetLoginerInfo()
    {
        string uIdx = Cmn.Cookies.Get("login_UserIdx");

        if (string.IsNullOrEmpty(uIdx))
        {
            Cmn.Log.Write("uIdx:" + uIdx);
            return("noLogin");
        }

        //获取课程通过了几门
        string beginDate  = Cmn.WebConfig.getApp("app_CourseMainTest_BeginDate");
        string endDate    = Cmn.WebConfig.getApp("app_CourseMainTest_EndDate");
        string UserIdx_Fx = "1";     //Cmn.Cookies.Get("uIdx");

        string strSql = "select myPassNum=COUNT(1) from Tab_CourseMain_TestLog where  CreatedDate>='{0}' and CreatedDate<='{1}' and PassBool='yes' and  UserIdx_Fx={2}";

        strSql = string.Format(strSql, beginDate, endDate, UserIdx_Fx);
        int myPassNum = Convert.ToInt32(SqlHelper.ExecuteScalar(CommandType.Text, strSql));


        DBEntity.Tab_UserCommunity ent = new DBEntity.Tab_UserCommunity();
        ent = ent.Get(uIdx);

        StringBuilder sb = new StringBuilder();

        sb.AppendLine(@"<?xml version='1.0' encoding='utf-8' ?>");
        sb.AppendLine(@"<Data>");
        sb.AppendLine("<Item>");
        sb.AppendLine(String.Format("<uIdx>{0}</uIdx>", ent.Idx));
        sb.AppendLine(String.Format("<RealName>{0}</RealName>", ent.RealName));
        sb.AppendLine(String.Format("<HeadPhoto>{0}/upload/userHearderImg/{1}</HeadPhoto>", Cmn.WebConfig.getApp("app_WebsiteDomain"), ent.HeadPhoto));
        sb.AppendLine(String.Format("<UserEmail>{0}</UserEmail>", ent.UserEmail));
        sb.AppendLine(String.Format("<VipBool>{0}</VipBool>", ent.VipBool));
        sb.AppendLine(String.Format("<myPassNum>{0}</myPassNum>", myPassNum));
        sb.AppendLine(String.Format("<orderUserList>{0}</orderUserList>", "108"));

        sb.AppendLine("</Item>");
        sb.AppendLine(@"</Data>");

        return(sb.ToString());
        //}
        //catch
        //{
        //    return "noLogin";
        //}
    }