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;
        }
    }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsUserAlreadyLogin)
        {
            MemberCenterPageRedirect("", "goodsadd.aspx");
            return;
        }

        if (!IsPostBack)
        {
            DataTable dt = XiHuan_GoodsTypeFacade.GetInstance().GetGoodsParentType();
            CommonMethod.BindDrop(ddlGoodType, dt, "TypeName", "Id");
            ddlGoodType.Items.Insert(0, new ListItem("选择换品类别", ""));
            CommonMethod.BindDrop(ddlGoodType1, dt, "TypeName", "Id");
            ddlGoodType1.Items.Insert(0, new ListItem("不限", ""));
            if (CurrentUser.IsStarUser != 1)
            {
                chkTJ.Checked = false;
                chkTJ.Enabled = false;
                chkTJ.ToolTip = "明星换客可使用此功能,将换品推荐到首页显示!";
            }
            if (IsEdit)
            {
                LoadGoodInfo();
            }
        }
    }
Exemple #3
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("请选择省份", ""));
     }
 }
Exemple #4
0
 protected void ddlGoodType_SelectedIndexChanged(object sender, EventArgs e)
 {
     ddlGoodChildType.Items.Clear();
     if (ddlGoodType.SelectedValue.Trim().Length > 0)
     {
         CommonMethod.BindDrop(ddlGoodChildType, XiHuan_GoodsTypeFacade.GetInstance().GetGoodsChildType(ddlGoodType.SelectedValue), "Name", "Id");
     }
     ddlGoodChildType.Items.Insert(0, new ListItem("选择小类", ""));
 }
Exemple #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataTable dt = XiHuan_GoodsTypeFacade.GetInstance().GetGoodsParentType();
         CommonMethod.BindDrop(ddlGoodType, dt, "TypeName", "Id");
         ddlGoodType.Items.Insert(0, new ListItem("不限", ""));
     }
 }
 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;
 }
Exemple #7
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();
        }
    }
Exemple #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsUserAlreadyLogin)
        {
            MemberCenterPageRedirect("", "goodlist.aspx");
        }

        if (!IsPostBack)
        {
            DataTable dt = XiHuan_GoodsTypeFacade.GetInstance().GetGoodsParentType();
            CommonMethod.BindDrop(ddlGoodType, dt, "TypeName", "Id");
            ddlGoodType.Items.Insert(0, new ListItem("不限", ""));
            CommonMethod.BindDrop(ddlGoodState, XiHuan_UserGoodsFacade.GetGoodsState(), "Text", "Value");
            ddlGoodState.Items.Insert(0, new ListItem("不限", ""));
            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
    }
Exemple #10
0
    private void LoadGoodInfo()
    {
        TitleName.Text = "修改换品";
        btnSubmit.Text = "保存修改";
        XiHuan_UserGoodsEntity goodinfo = XiHuan_UserGoodsEntityAction.RetrieveAXiHuan_UserGoodsEntity(CommonMethod.ConvertToInt(Request["id"], 0));

        if (goodinfo != null)
        {
            txtGoodName.Text = goodinfo.Name;
            chkTJ.Checked    = (goodinfo.IsTJ == 1);
            CommonMethod.SelectFlg(ddlGoodType, goodinfo.TypeId.ToString());
            CommonMethod.BindDrop(ddlGoodChildType, XiHuan_GoodsTypeFacade.GetInstance().GetGoodsChildType(goodinfo.TypeId.ToString()), "Name", "Id");
            CommonMethod.SelectFlg(ddlGoodChildType, goodinfo.ChildId.ToString());
            CommonMethod.SelectFlg(ddlGoodType1, goodinfo.HopeToChangeTypeId.ToString());
            CommonMethod.BindDrop(ddlGoodChildType1, XiHuan_GoodsTypeFacade.GetInstance().GetGoodsChildType(goodinfo.HopeToChangeChildTypeId.ToString()), "Name", "Id");
            CommonMethod.SelectFlg(ddlGoodChildType1, goodinfo.HopeToChangeChildTypeId.ToString());
            trimage.Visible   = uploadimage.Visible = false;
            txtGoodDesc.Value = goodinfo.Description;
            CommonMethod.SelectFlg(ddlNewOldDeep, goodinfo.NewDeep.ToString());
            chkValidCity.Checked     = (goodinfo.OnlyCityChange == 1);
            chkValidSchool.Checked   = (goodinfo.OnlySchoolChange == 1);
            txtHopeToChangeDesc.Text = goodinfo.HopeToChangeDesc;
        }
    }
Exemple #11
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"]) + " 的所有换品";
        }
    }