zoukankan      html  css  js  c++  java
  • 选择下拉菜单选项完成搜索

    .aspx

      <asp:DropDownList runat="server" name="pointRange" class="selectRange" title="积分范围"
                                ID="SelectPointRange" OnSelectedIndexChanged="SelectPointRange_SelectedIndexChanged"
                                OnTextChanged="SelectPointRange_TextChanged" AutoPostBack="true">
                                <asp:ListItem Value="range0">请选择积分范围</asp:ListItem>
                                <asp:ListItem Value="range1">0~300</asp:ListItem>
                                <asp:ListItem Value="range2">300~500</asp:ListItem>
                                <asp:ListItem Value="range3">500~1000</asp:ListItem>
                                <asp:ListItem Value="range4">1000~2000</asp:ListItem>
                                <asp:ListItem Value="range5">2000以上</asp:ListItem>
                            </asp:DropDownList>

     <asp:Repeater runat="server" ID="rptStoreProduct">
                                <ItemTemplate>
                                    <div class="box box-onsale">
                                        <div class="top">
                                            <p>
                                                <a href="/Store/StoreProductView.aspx?Id=<%# Eval("Id")%>" target="_blank">
                                                    <%# Eval("Name")%></a></p>
                                        </div>
                                        <div class="pdt">
                                            <div class="tupian">
                                                <span class="onsale"><a href="/Store/StoreProductView.aspx?Id=<%# Eval("Id")%>" target="_blank">
                                                    <img src="<%# _objStoreProductSerivce.GetPicturePath(Eval("MidIsMainPictureSrcFullPath").ToString()) %>" /></a></span></div>
                                            <p class="bids">
                                                商城价:<%# RM901.Web.Common.PriceFormat(Eval("SellPrice").ToString())%></p>
                                            <p class="winner">
                                                <%-- 市场价:<%# RM901.Web.Common.PriceFormat(Eval("MarketPrice").ToString())%></p>--%>
                                                所需积分:<%# RM901.Web.Common.PriceFormat(Eval("AllPoint").ToString())%></p>
                                        </div>
                                        <div class="bot">
                                            <span>
                                                <input type="submit" value="我要兑换" onclick="javascript:window.open('/Store/StoreProductView.aspx?Id=<%# Eval("Id")%>');"
                                                    class="bid bid-onsale" /></span>
                                        </div>
                                    </div>
                                </ItemTemplate>
                            </asp:Repeater>

    .aspx.cs

     private void BindStoreProductAllRegion()
            {
                int intSelectIndex = int.Parse(this.SelectPointRange.SelectedIndex.ToString());
                if (intSelectIndex == 0)
                {
                    rptStoreProduct.DataSource = _objStoreProductInfoList;
                    rptStoreProduct.DataBind();
                }
                else if (intSelectIndex == 1)
                {
                _intPointMin = 0;
                _intPointMax = 300;
                StoreWebServiceWrapper.Init();
                StoreWebServiceWrapper.SetURL(_strStoreWebServicePath);
                StoreProductInfoListStruct objStoreProductInfoListStruct = StoreWebServiceWrapper.Current.StoreProductSearchSplitPageListByPointScopeStatus(_strWebServiceSafeCode,_intPointMin,_intPointMax,StoreProductInfoStatus.Published,"",30,1);
                rptStoreProduct.DataSource = objStoreProductInfoListStruct.StoreProductInfoList;
                rptStoreProduct.DataBind();
                }
                else if (intSelectIndex == 2)
                {
                      
                        _intPointMin = 300;
                        _intPointMax = 500;
                        StoreWebServiceWrapper.Init();
                        StoreWebServiceWrapper.SetURL(_strStoreWebServicePath);
                        StoreProductInfoListStruct objStoreProductInfoListStruct = StoreWebServiceWrapper.Current.StoreProductSearchSplitPageListByPointScopeStatus(_strWebServiceSafeCode, _intPointMin, _intPointMax, StoreProductInfoStatus.Published, "", 30, 1);
                        rptStoreProduct.DataSource = objStoreProductInfoListStruct.StoreProductInfoList;
                        rptStoreProduct.DataBind();
                    }
                else if (intSelectIndex == 3)
                {
                        _intPointMin = 500;
                        _intPointMax = 1000;
                        StoreWebServiceWrapper.Init();
                        StoreWebServiceWrapper.SetURL(_strStoreWebServicePath);
                        StoreProductInfoListStruct objStoreProductInfoListStruct = StoreWebServiceWrapper.Current.StoreProductSearchSplitPageListByPointScopeStatus(_strWebServiceSafeCode, _intPointMin, _intPointMax, StoreProductInfoStatus.Published, "", 30, 1);
                        rptStoreProduct.DataSource = objStoreProductInfoListStruct.StoreProductInfoList;
                        rptStoreProduct.DataBind();
                    }
                else  if (intSelectIndex == 4)
                {
                              
                               
                        _intPointMin = 1000;
                        _intPointMax = 2000;
                        StoreWebServiceWrapper.Init();
                        StoreWebServiceWrapper.SetURL(_strStoreWebServicePath);
                        StoreProductInfoListStruct objStoreProductInfoListStruct = StoreWebServiceWrapper.Current.StoreProductSearchSplitPageListByPointScopeStatus(_strWebServiceSafeCode, _intPointMin, _intPointMax, StoreProductInfoStatus.Published, "", 30, 1);
                        rptStoreProduct.DataSource = objStoreProductInfoListStruct.StoreProductInfoList;
                        rptStoreProduct.DataBind();
                    }
                else
                {
                    _intPointMin = 2000;
                    _intPointMax = 10000000;
                    StoreWebServiceWrapper.Init();
                    StoreWebServiceWrapper.SetURL(_strStoreWebServicePath);
                    StoreProductInfoListStruct objStoreProductInfoListStruct = StoreWebServiceWrapper.Current.StoreProductSearchSplitPageListByPointScopeStatus(_strWebServiceSafeCode, _intPointMin, _intPointMax, StoreProductInfoStatus.Published, "", 30, 1);
                    rptStoreProduct.DataSource = objStoreProductInfoListStruct.StoreProductInfoList;
                    rptStoreProduct.DataBind();
     
                }
     
           }

      protected void SelectPointRange_SelectedIndexChanged(object sender, EventArgs e)
                {
                    BindStoreProductAllRegion();
                }

  • 相关阅读:
    上门量体不能停,量品打造“一人一版”的私人定制衬衫,半年覆盖30个城市
    直击中小互联网企业痛点,程序员客栈推出短期雇佣功能
    现在,培训老师也有可能是你未来的 Boss
    【蓝领日志】捷库,给B端提供蓝领员工的标准化培训工具
    【调研】华图教育:领跑公职培训市场
    社区服务中心+护理员培训+云平台,中康行健“一体两翼”构建养老生态体系
    餐厅孵化器“优粮生活”,用孵化模式打造统一独立外卖品牌
    语培市场热度不减,“手韩”背后的垂直领域空间在哪?
    母基金_百度百科
    小编亲测杭州最火的海南鸡饭,最好吃的居然是……-搜狐吃喝!!!
  • 原文地址:https://www.cnblogs.com/yuloe2012/p/2695610.html
Copyright © 2011-2022 走看看