示例#1
0
        private void DataBinds()
        {
            BitAuto.YanFa.Crm2009.Entities.QueryCarBrand QueryBrandInfo = new BitAuto.YanFa.Crm2009.Entities.QueryCarBrand();
            if (!string.IsNullOrEmpty(Requestname))
            {
                QueryBrandInfo.BrandName = Requestname.Trim();
            }
            int       totalCount;
            DataTable dt = BitAuto.YanFa.Crm2009.BLL.CarBrand.Instance.GetBrandInfo(QueryBrandInfo, " Spell asc", PageCommon.Instance.PageIndex, PageSize, out totalCount);

            //设置数据源
            if (dt != null && dt.Rows.Count > 0)
            {
                repterFriendCustMappingList.DataSource = dt;
            }
            //绑定列表数据
            repterFriendCustMappingList.DataBind();

            litPagerDown1.Text = PageCommon.Instance.LinkStringByPost(BLL.Util.GetUrl(), GroupLength, totalCount, PageSize, PageCommon.Instance.PageIndex, 3);


            //if(!string.IsNullOrEmpty(RequestCustID))
            //{
            //    QueryBrandInfo.CustID = RequestCustID;
            //    //加载要修改的品牌内容
            //    DataTable dttemp = BLL.CarBrand.Instance.GetCustBrandInfo(QueryBrandInfo, "", 1, 10000, out totalCount);
            //    if(dttemp!=null && dttemp.Rows.Count>0)
            //    {
            //        for (int i = 0; i < dttemp.Rows.Count; i++)
            //        {
            //            literalEditCont.Text += "<tr><td><a href=\"javascript:DelSelectCustBrand('" + dttemp.Rows[i]["brandid"] + "');\"  name='" + dttemp.Rows[i]["name"] + "' id='" + dttemp.Rows[i]["brandid"] + "'  ><img src=\"../Images/close.gif\" title=\"删除\"/></a></td>";
            //            literalEditCont.Text += "<td class=\"l\">"+dttemp.Rows[i]["brandid"]+"</td>";
            //            literalEditCont.Text += "<td class=\"l\">" + dttemp.Rows[i]["name"] + "</td>";
            //        }
            //    }
            //}

            if (!string.IsNullOrEmpty(RequestBrandIDs))
            {
                BitAuto.YanFa.Crm2009.Entities.QueryCarBrand query = new BitAuto.YanFa.Crm2009.Entities.QueryCarBrand();
                query.BrandIDs = RequestBrandIDs;

                //加载要修改的品牌内容
                DataTable dttemp = BitAuto.YanFa.Crm2009.BLL.CarBrand.Instance.GetBrandInfo(query, "", 1, 10000, out totalCount);
                if (dttemp != null && dttemp.Rows.Count > 0)
                {
                    for (int i = 0; i < dttemp.Rows.Count; i++)
                    {
                        literalEditCont.Text += "<tr><td><a href=\"javascript:DelSelectCustBrand('" + dttemp.Rows[i]["brandid"] + "');\"  name='" + dttemp.Rows[i]["name"] + "' id='" + dttemp.Rows[i]["brandid"] + "'  ><img src=\"/Images/close.png\" title=\"删除\"/></a></td>";
                        literalEditCont.Text += "<td class=\"l\">" + dttemp.Rows[i]["brandid"] + "</td>";
                        literalEditCont.Text += "<td class=\"l\">" + dttemp.Rows[i]["name"] + "</td>";
                    }
                }
            }
        }
示例#2
0
        private void BindBll()
        {
            BitAuto.YanFa.Crm2009.Entities.QueryCarBrand QueryBrandInfo = new BitAuto.YanFa.Crm2009.Entities.QueryCarBrand();
            int       totalCount;
            DataTable dttemp = BitAuto.YanFa.Crm2009.BLL.CarBrand.Instance.GetBrandInfo(QueryBrandInfo, "Spell asc", 1, 10000, out totalCount);

            if (dttemp != null && dttemp.Rows.Count > 0)
            {
                ddlBrandList.DataValueField = "BrandID";
                ddlBrandList.DataTextField  = "name";
                ddlBrandList.DataSource     = dttemp;
                ddlBrandList.DataBind();
            }
            ddlBrandList.Items.Insert(0, new ListItem("请选择", "-2"));
        }
示例#3
0
        private void DataBinds()
        {
            BitAuto.YanFa.Crm2009.Entities.QueryCarBrand QueryBrandInfo = new BitAuto.YanFa.Crm2009.Entities.QueryCarBrand();
            if (!string.IsNullOrEmpty(Requestname))
            {
                QueryBrandInfo.BrandName = Requestname.Trim();
            }
            if (!string.IsNullOrEmpty(RequestMainBrandID) && RequestMainBrandID != "-2")
            {
                QueryBrandInfo.BrandID = RequestMainBrandID.Trim();
            }
            int       totalCount;
            DataTable dt = BitAuto.YanFa.Crm2009.BLL.CarBrand.Instance.GetCarSerial(QueryBrandInfo, "b.Spell, a.Spell", PageCommon.Instance.PageIndex, PageSize, out totalCount);

            //设置数据源
            if (dt != null && dt.Rows.Count > 0)
            {
                repterSerialMappingList.DataSource = dt;
            }
            //绑定列表数据
            repterSerialMappingList.DataBind();

            litPagerDown.Text = PageCommon.Instance.LinkStringByPost(GetWhere(), GroupLength, totalCount, PageSize, PageCommon.Instance.PageIndex, 1);


            if (!string.IsNullOrEmpty(RequestSerialIds))
            {
                BitAuto.YanFa.Crm2009.Entities.QueryCarBrand queryBrandInfo = new BitAuto.YanFa.Crm2009.Entities.QueryCarBrand();
                queryBrandInfo.SerialIds = RequestSerialIds;

                //加载要修改的品牌内容
                DataTable dttemp = BitAuto.YanFa.Crm2009.BLL.CarBrand.Instance.GetCarSerial(queryBrandInfo, "b.Spell, a.Spell", 1, 10000, out totalCount);
                if (dttemp != null && dttemp.Rows.Count > 0)
                {
                    for (int i = 0; i < dttemp.Rows.Count; i++)
                    {
                        literalEditCont.Text += "<tr><td><a href=\"javascript:DelSelectSerialBrand('" + dttemp.Rows[i]["SerialID"] + "');\"  name='" + dttemp.Rows[i]["name"] + "' id='" + dttemp.Rows[i]["SerialID"] + "'  ><img src=\"/Images/close.png\" title=\"删除\"/></a></td>";
                        literalEditCont.Text += "<td class=\"l\">" + dttemp.Rows[i]["BrandName"] + "</td>";
                        literalEditCont.Text += "<td class=\"l\">" + dttemp.Rows[i]["SerialID"] + "</td>";
                        literalEditCont.Text += "<td class=\"l\">" + dttemp.Rows[i]["name"] + "</td>";
                    }
                }
            }
        }