Пример #1
0
        private void PageInit()
        {
            ParametersDetail detailPay             = new ParametersDetail(6);
            IEnumerable <ParametersDetail> listPay = detailPay.SelectByPid();

            detailPay.KeyName = "全部";
            detailPay.Value   = "%";
            List <ParametersDetail> list = new List <ParametersDetail>()
            {
                detailPay
            };

            list.AddRange(listPay);
            ddlPay.DataTextField  = "KeyName";
            ddlPay.DataValueField = "Value";
            ddlPay.DataSource     = list;
            ddlPay.DataBind();

            ParametersDetail detailDeliver             = new ParametersDetail(7);
            IEnumerable <ParametersDetail> listDeliver = detailDeliver.SelectByPid();

            detailDeliver.KeyName = "全部";
            detailDeliver.Value   = "%";
            List <ParametersDetail> list2 = new List <ParametersDetail>()
            {
                detailDeliver
            };

            list2.AddRange(listDeliver);
            ddlDeliver.DataTextField  = "KeyName";
            ddlDeliver.DataValueField = "Value";
            ddlDeliver.DataSource     = list2;
            ddlDeliver.DataBind();

            ParametersDetail detailStatus = new ParametersDetail();

            detailStatus.KeyName = "全部";
            detailStatus.Value   = "%";
            ParametersDetail detailStatusNEW = new ParametersDetail();

            detailStatusNEW.KeyName = "全新";
            detailStatusNEW.Value   = "全新";
            ParametersDetail detailStatusOLD = new ParametersDetail();

            detailStatusOLD.KeyName = "二手";
            detailStatusOLD.Value   = "二手";
            List <ParametersDetail> list3 = new List <ParametersDetail>()
            {
                detailStatus
            };

            list3.Add(detailStatusNEW);
            list3.Add(detailStatusOLD);
            ddlStatus.DataTextField  = "KeyName";
            ddlStatus.DataValueField = "Value";
            ddlStatus.DataSource     = list3;
            ddlStatus.DataBind();
        }
        private void PageInit()
        {
            ParametersDetail detailPay             = new ParametersDetail(6);
            IEnumerable <ParametersDetail> listPay = detailPay.SelectByPid();

            rblPay.DataTextField  = "KeyName";
            rblPay.DataValueField = "Value";
            rblPay.DataSource     = listPay;
            rblPay.DataBind();

            ParametersDetail detailDeliver             = new ParametersDetail(7);
            IEnumerable <ParametersDetail> listDeliver = detailDeliver.SelectByPid();

            rblDeliver.DataTextField  = "KeyName";
            rblDeliver.DataValueField = "Value";
            rblDeliver.DataSource     = listDeliver;
            rblDeliver.DataBind();
        }