Exemplo n.º 1
0
        private void bindList()
        {
            SearchProductDetail con = new SearchProductDetail();

            if (ddlCpInforTypeName.SelectedValue != "")
            {
                con.ProTypeID = Convert.ToInt32(ddlCpInforTypeName.SelectedValue);
            }
            if (ddlCpInforSecondTypeName.SelectedValue != "")
            {
                con.ProSecondTypeID = Convert.ToInt32(ddlCpInforSecondTypeName.SelectedValue);
            }
            if (rbtnIsChinese.Checked == true)
            {
                con.IsEnglish = 1;
            }
            else if (rbtnIsEnglish.Checked == true)
            {
                con.IsEnglish = 2;
            }
            Pagination pagina = new Pagination(pager.PageIndex, pager.PageSize, 0);

            using (BLLProductDetail bll = new BLLProductDetail())
            {
                List <ProductDetail> lists = bll.GetPageList(con, pagina, ProductDetail.ID_FieldName, ScriptQuery.SortEnum.DESC);

                pager.RecordCount = pagina.RecordCount;
                pager.PageCount   = pagina.PageCount;

                grid_friendlink.DataSource = lists;
                grid_friendlink.DataBind();
            }
        }
Exemplo n.º 2
0
        private void Bind()
        {
            SearchProductDetail snt = new SearchProductDetail();

            snt.IsEnglish = 1;
            if (type == 0)
            {
            }
            else
            {
                snt.ProTypeID = type;
            }
            Pagination pagination = new DevNet.Common.Pagination(pager.PageIndex, pager.PageSize, 0);

            using (BLLProductDetail bll = new BLLProductDetail())
            {
                List <ProductDetail> lists = bll.GetPageList(snt, pagination);
                rptProduct.DataSource = lists;
                rptProduct.DataBind();
                pager.RecordCount = pagination.RecordCount;
            }
            using (BLLCompanyInformationType bll = new BLLCompanyInformationType())
            {
                string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" };
                object[] values = new object[] { type, 1 };
                CompanyInformationType contype = bll.GetSingle(type);
                if (contype != null)
                {
                    Title = contype.CompanyInformationName;
                }
            }
        }
Exemplo n.º 3
0
        private void ProBind()
        {
            SearchProductDetail snt = new SearchProductDetail();

            snt.IsEnglish = 1;
            Pagination pagination = new DevNet.Common.Pagination(0, 9, 0);

            using (BLLProductDetail bll = new BLLProductDetail())
            {
                List <ProductDetail> lists = bll.GetPageList(snt, pagination);
                rptProduct.DataSource = lists;
                rptProduct.DataBind();
            }
        }
        private void ProBind()
        {
            SearchProductDetail snt = new SearchProductDetail();

            snt.IsEnglish = 1;
            if (type == 0)
            {
            }
            else
            {
                snt.ProTypeID = type;
            }
            Pagination pagination = new DevNet.Common.Pagination(pager.PageIndex, pager.PageSize, 0);

            using (BLLProductDetail bll = new BLLProductDetail())
            {
                List <ProductDetail> lists = bll.GetPageList(snt, pagination);
                rptProduct.DataSource = lists;
                rptProduct.DataBind();
                pager.RecordCount = pagination.RecordCount;
                pager.PageCount   = pagination.PageCount;
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 加载产品
        /// </summary>
        private void bindInfo()
        {
            SearchProductDetail spt = new SearchProductDetail();

            using (BLLProductDetail bll = new BLLProductDetail())
            {
                Pagination           pagination = new DevNet.Common.Pagination(0, 20, 0);
                List <ProductDetail> lists      = bll.GetPageList(spt, pagination);

                //if (lists != null)
                //{
                //    int x = 0;

                //    for (int i = 0; i < (lists.Count) / 2; i++)
                //    {
                //        prlsdaafgad.InnerHtml += "<li>";
                //        if (lists[x] != null)
                //        {
                //            prlsdaafgad.InnerHtml += "<a href=\"productDetail.aspx?id=" + lists[x].ID + "\" target=\"_self\"><img src=\"" + phoneImgUrl(lists[x].ProductPic) + "\" alt=\"\" /><span>" + lists[x].ProductName + "</span></a>";
                //        }
                //        x++;
                //        if (lists[x] != null)
                //        {
                //            prlsdaafgad.InnerHtml += "<a href=\"productDetail.aspx?id=" + lists[x].ID + "\" target=\"_self\"><img src=\"" + phoneImgUrl(lists[x].ProductPic) + "\" alt=\"\" /><span>" + lists[x].ProductName + "</span></a>";
                //        }
                //        x++;
                //        prlsdaafgad.InnerHtml += "</li>";
                //    }

                //}
                //else
                //{
                //    prlsdaafgad.InnerHtml += "暂无数据";
                //}
            }
        }