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;
        }
    }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CommonMethod.BindDrop(ddlProvince, ProvinceCityFacade.GetInstance().GetProvince(), "province", "provinceId");
         ddlProvince.Items.Insert(0, new ListItem("请选择省份", ""));
     }
 }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         rptProvince.DataSource = ProvinceCityFacade.GetInstance().GetProvince();
         rptProvince.DataBind();
     }
 }
Example #4
0
    protected void rptProvince_ItemDataBound1(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row       = (DataRowView)e.Item.DataItem;
        Repeater    rptSchool = (Repeater)e.Item.FindControl("rptSchool");

        rptSchool.DataSource = ProvinceCityFacade.GetInstance().GetSchoolInfo(row["provinceId"].ToString(), "");
        rptSchool.DataBind();
    }
 protected void ddlCity_SelectedIndexChanged1(object sender, EventArgs e)
 {
     ddlArea.Items.Clear();
     ddlSchool.Items.Clear();
     if (ddlCity.SelectedValue.Trim().Length > 0)
     {
         CommonMethod.BindDrop(ddlArea, ProvinceCityFacade.GetInstance().GetAreaInfo(ddlCity.SelectedValue), "area", "areaId");
         CommonMethod.BindDrop(ddlSchool, ProvinceCityFacade.GetInstance().GetSchoolInfo(ddlProvince.SelectedValue, ddlCity.SelectedValue), "SchoolName", "Id");
     }
     ddlArea.Items.Insert(0, new ListItem("不限地区", ""));
     ddlSchool.Items.Insert(0, new ListItem("不限学校", ""));
     ddlArea.SelectedIndex = ddlSchool.SelectedIndex = 0;
 }
Example #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            CommonMethod.BindDrop(ddlProvince, ProvinceCityFacade.GetInstance().GetProvince(), "province", "provinceId");
            ddlProvince.Items.Insert(0, new ListItem("不限省份", ""));
            if (CommonMethod.FinalString(Request["province"]).Length > 0)
            {
                CommonMethod.SelectFlg(ddlProvince, Request["province"]);
            }
            if (CommonMethod.FinalString(Request["type"]).Equals("star"))
            {
                lblLinkName.Text    = ">>明星换客";
                chkStarUser.Checked = true;
            }

            if (CommonMethod.FinalString(Request["keyword"]).Length > 0)
            {
                txtGoodName.Text = Microsoft.JScript.GlobalObject.unescape(Request["keyword"]);
                lblLinkName.Text = ">>" + txtGoodName.Text;
            }
            CommonMethod.SelectFlg(ddlProvince, Request["province"]);
            if (CommonMethod.FinalString(Request["city"]).Length > 0)
            {
                CommonMethod.BindDrop(ddlCity, ProvinceCityFacade.GetInstance().GetCityInfo(Request["province"]), "city", "cityID");
                ddlCity.Items.Insert(0, new ListItem("不限城市", ""));
            }
            if (CommonMethod.FinalString(Request["area"]).Length > 0)
            {
                CommonMethod.BindDrop(ddlArea, ProvinceCityFacade.GetInstance().GetAreaInfo(Request["city"]), "area", "areaId");
                ddlArea.Items.Insert(0, new ListItem("不限地区", ""));
            }
            CommonMethod.SelectFlg(ddlCity, Request["city"]);
            if (CommonMethod.FinalString(Request["school"]).Length > 0)
            {
                CommonMethod.BindDrop(ddlSchool, ProvinceCityFacade.GetInstance().GetSchoolInfo(Request["province"], Request["city"]), "SchoolName", "Id");
                ddlSchool.Items.Insert(0, new ListItem("不限学校", ""));
            }
            CommonMethod.SelectFlg(ddlArea, Request["area"]);
            CommonMethod.SelectFlg(ddlSchool, Request["school"]);
            CommonMethod.SelectFlg(ddlTime, Request["time"]);
            CommonMethod.SelectFlg(ddlOrderBy, Request["sort"]);
            CommonMethod.SelectFlg(ddlGender, Request["gender"]);
            chkHavePhoto.Checked = (CommonMethod.FinalString(Request["ph"]).Equals("true"));
            BindData();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        #region 页面呈现

        if (!IsUserAlreadyLogin)
        {
            MemberCenterPageRedirect("", "membermanageindex.aspx");
        }

        if (!IsPostBack)
        {
            CommonMethod.BindDrop(ddlProvince, ProvinceCityFacade.GetInstance().GetProvince(), "province", "provinceId");
            ddlProvince.Items.Insert(0, new ListItem("请选择省份", ""));
            LoadUserInfo();
            headImage.Attributes.Add("onchange", "Javascript:ShowImg(this.value);");
        }
        #endregion
    }
Example #8
0
    private void GetInfo(string type, string value, string id)
    {
        DataTable dt       = new DataTable();
        DataTable dtschool = new DataTable();

        if (type.Equals("getcity"))
        {
            dt       = ProvinceCityFacade.GetInstance().GetCityInfo(value);
            dtschool = ProvinceCityFacade.GetInstance().GetSchoolInfo(value, "");
        }
        if (type.Equals("getarea"))
        {
            dt       = ProvinceCityFacade.GetInstance().GetAreaInfo(value);
            dtschool = ProvinceCityFacade.GetInstance().GetSchoolInfo("", value);
        }

        StringBuilder ostr     = new StringBuilder("$('" + id + "').options.length =0;");
        string        addname  = "city";
        string        addvalue = "cityId";

        if (type.Equals("getcity"))
        {
            ostr.Append("$('" + id + "').options.add(new Option('请选择城市',''));");
        }
        if (type.Equals("getarea"))
        {
            addname  = "area";
            addvalue = "areaId";
            ostr.Append("$('" + id + "').options.add(new Option('请选择地区',''));");
        }

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            ostr.Append("$('" + id + "').options.add(new Option('" + dt.Rows[i][addname] + "','" + dt.Rows[i][addvalue] + "'));");
        }

        ostr.Append("$('ddlSchool').options.length=0;$('ddlSchool').options.add(new Option('请选择学校',''));");
        for (int j = 0; j < dtschool.Rows.Count; j++)
        {
            ostr.Append("$('ddlSchool').options.add(new Option('" + dtschool.Rows[j][XiHuan_SchoolInfoEntity.__SCHOOLNAME] + "','" + dtschool.Rows[j][XiHuan_SchoolInfoEntity.__ID] + "'));");
        }

        CommonMethod.ResponseAjaxContent(this, ostr.ToString());
    }
Example #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            CommonMethod.BindDrop(ddlProvince, ProvinceCityFacade.GetInstance().GetProvince(), "province", "provinceId");
            ddlProvince.Items.Insert(0, new ListItem("不限省份", ""));
            CommonMethod.BindDrop(ddlGoodType, XiHuan_GoodsTypeFacade.GetInstance().GetGoodsParentType(), "TypeName", "Id");
            ddlGoodType.Items.Insert(0, new ListItem("不限类别", ""));
            if (CommonMethod.FinalString(Request["typeid"]).Length > 0)
            {
                CommonMethod.SelectFlg(ddlGoodType, Request["typeid"]);
            }
            if (CommonMethod.FinalString(Request["childid"]).Length > 0)
            {
                CommonMethod.BindDrop(ddlGoodChildType, XiHuan_GoodsTypeFacade.GetInstance().GetGoodsChildType(Request["typeid"]), "Name", "Id");
                CommonMethod.SelectFlg(ddlGoodChildType, Request["childid"]);
                ddlGoodChildType.Items.Insert(0, new ListItem("不限子类别", ""));
            }

            if (CommonMethod.FinalString(Request["province"]).Length > 0)
            {
                CommonMethod.SelectFlg(ddlProvince, Request["province"]);
            }
            if (CommonMethod.FinalString(Request["city"]).Length > 0)
            {
                CommonMethod.BindDrop(ddlCity, ProvinceCityFacade.GetInstance().GetCityInfo(Request["province"]), "city", "cityID");
                CommonMethod.SelectFlg(ddlCity, Request["city"]);
                ddlCity.Items.Insert(0, new ListItem("不限城市", ""));
            }
            if (CommonMethod.FinalString(Request["area"]).Length > 0)
            {
                CommonMethod.BindDrop(ddlArea, ProvinceCityFacade.GetInstance().GetAreaInfo(Request["city"]), "area", "areaId");
                CommonMethod.SelectFlg(ddlArea, Request["area"]);
                ddlArea.Items.Insert(0, new ListItem("不限地区", ""));
            }
            if (CommonMethod.FinalString(Request["school"]).Length > 0)
            {
                CommonMethod.BindDrop(ddlSchool, ProvinceCityFacade.GetInstance().GetSchoolInfo(Request["province"], Request["city"]), "SchoolName", "Id");
                CommonMethod.SelectFlg(ddlSchool, Request["school"]);
                ddlSchool.Items.Insert(0, new ListItem("不限学校", ""));
            }

            if (CommonMethod.FinalString(Request["keyword"]).Length > 0)
            {
                txtGoodName.Text = GlobalObject.unescape(Request["keyword"]);
            }
            if (CommonMethod.FinalString(Request["ownername"]).Length > 0)
            {
                txtOwnerName.Text = GlobalObject.unescape(Request["ownername"]);
            }
            CommonMethod.SelectFlg(ddlTime, Request["time"]);
            CommonMethod.SelectFlg(ddlNewOldDeep, Request["newdeep"]);
            CommonMethod.SelectFlg(ddlOrderBy, Request["sort"]);
            chkHavePhoto.Checked = (CommonMethod.FinalString(Request["ph"]).Equals("true"));
            chkShow.Checked      = (CommonMethod.FinalString(Request["sc"]).Equals("true"));
            BindData();
        }

        lblLinkName.Text = "";
        string area = CommonMethod.FinalString(Request["changearea"]);

        if (area.Length > 0)
        {
            string type = "同城换区";
            string url  = "citychange.html";
            if (area.Equals("school"))
            {
                type = "校园换区";
                url  = "schoolchange.html";
            }
            if (area.Equals("idea"))
            {
                type = "创意换区";
                url  = "searchlist.aspx?type=idea";
            }

            lblLinkName.Text += string.Format(">><a href=\"{1}\">{0}</a>", type, url);
            title            += "-" + type;
        }

        if (ddlProvince.SelectedValue.Trim().Length > 0)
        {
            lblLinkName.Text += string.Format(">><a href=\"searchlist.aspx?province={0}\">{1}</a>", ddlProvince.SelectedValue, ddlProvince.SelectedItem.Text);
            title            += "-" + ddlProvince.SelectedItem.Text;
        }
        if (ddlCity.SelectedValue.Trim().Length > 0)
        {
            lblLinkName.Text += string.Format(">><a href=\"searchlist.aspx?city={0}\">{1}</a>", ddlCity.SelectedValue, ddlCity.SelectedItem.Text);
            title            += "  " + ddlCity.SelectedItem.Text;
        }
        if (ddlSchool.SelectedValue.Trim().Length > 0)
        {
            lblLinkName.Text += string.Format(">><a href=\"searchlist.aspx?province={2}&city={3}&school={0}\">{1}</a>", ddlSchool.SelectedValue, ddlSchool.SelectedItem.Text, ddlProvince.SelectedValue, ddlCity.SelectedValue);
            title            += "  " + ddlSchool.SelectedItem.Text;
        }
        if (ddlGoodType.SelectedValue.Trim().Length > 0)
        {
            lblLinkName.Text += string.Format(">><a href=\"searchlist.aspx?typeid={0}\">{1}</a>", ddlGoodType.SelectedValue, ddlGoodType.SelectedItem.Text);
            title            += "-" + ddlGoodType.SelectedItem.Text;
        }

        if (ddlGoodChildType.SelectedValue.Trim().Length > 0)
        {
            lblLinkName.Text += string.Format(">><a href=\"searchlist.aspx?typeid={0}&childid={1}\">{2}</a>", ddlGoodType.SelectedValue, ddlGoodChildType.SelectedValue, ddlGoodChildType.SelectedItem.Text);
            title            += "-" + ddlGoodChildType.SelectedItem.Text;
        }

        if (txtGoodName.Text.Trim().Length > 0)
        {
            lblLinkName.Text += string.Format(">><a href=\"searchlist.aspx?keyword={0}\">{1}</a>", Microsoft.JScript.GlobalObject.escape(txtGoodName.Text.Trim()), txtGoodName.Text.Trim());
            title            += "-" + txtGoodName.Text;
        }
        if (CommonMethod.FinalString(Request["ownername"]).Length > 0 && CommonMethod.FinalString(Request["ownerid"]).Length > 0)
        {
            lblLinkName.Text += string.Format(">><a href=\"xh.aspx?id={0}\">{1}</a>的所有换品</a>", Request["ownerid"], Server.UrlDecode(Request["ownername"]));
            title            += "-" + Server.UrlDecode(Request["ownername"]) + " 的所有换品";
        }
    }