当前位置: 首页>>代码示例>>C#>>正文


C# PDT_ProductBLL.SetProductExtInfo方法代码示例

本文整理汇总了C#中PDT_ProductBLL.SetProductExtInfo方法的典型用法代码示例。如果您正苦于以下问题:C# PDT_ProductBLL.SetProductExtInfo方法的具体用法?C# PDT_ProductBLL.SetProductExtInfo怎么用?C# PDT_ProductBLL.SetProductExtInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PDT_ProductBLL的用法示例。


在下文中一共展示了PDT_ProductBLL.SetProductExtInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: bt_Add_Click

    protected void bt_Add_Click(object sender, EventArgs e)
    {
        int count = 0;
        foreach (GridViewRow row in gv_List.Rows)
        {
            CheckBox cbx = (CheckBox)row.FindControl("cbx");
            if (cbx != null && cbx.Checked)
            {
                int id = (int)gv_List.DataKeys[row.RowIndex]["PDT_Product_ID"];

                PDT_ProductBLL bll = new PDT_ProductBLL(id);
                PDT_ProductExtInfo extinfo = new PDT_ProductExtInfo();
                extinfo.Code = bll.Model.FactoryCode == "" ? bll.Model.Code : bll.Model.FactoryCode;
                extinfo.Supplier = (int)Session["OwnerClient"];
                bll.SetProductExtInfo(extinfo);
                count++;
            }
        }
        if (count > 0)
        {
            MessageBox.Show(this, string.Format("成功将{0}个商品加入经营范围!", count));
            cbx_CheckAll.Checked = false;
            BindGrid();
        }
        else
            MessageBox.Show(this, "请选择要加入经营产商品!");
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:27,代码来源:Pop_SelectMoreProduct.aspx.cs

示例2: bt_AddAll_Click

    protected void bt_AddAll_Click(object sender, EventArgs e)
    {
        string ConditionStr = " PDT_Product.ID NOT IN (SELECT Product FROM MCS_PUB.dbo.PDT_ProductExtInfo WHERE Supplier=" + Session["OwnerClient"].ToString() + ")";
        if (tr_List.SelectedValue != "" && tr_List.SelectedValue != "1")
        {
            string _categoryids = "";
            DataTable dt = TreeTableBLL.GetAllChildByNodes("MCS_Pub.dbo.PDT_Category", "ID", "SuperID", tr_List.SelectedValue);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                _categoryids += dt.Rows[i]["ID"].ToString() + ",";
            }
            _categoryids += tr_List.SelectedValue;

            ConditionStr += " AND PDT_Product.Category IN (" + _categoryids + ")";
        }
        int count = 0;
        IList<PDT_Product> product = PDT_ProductBLL.GetModelList(ConditionStr);
        foreach (PDT_Product p in product)
        {
            int id = p.ID;

            PDT_ProductBLL bll = new PDT_ProductBLL(id);
            PDT_ProductExtInfo extinfo = new PDT_ProductExtInfo();
            extinfo.Code = bll.Model.FactoryCode == "" ? bll.Model.Code : bll.Model.FactoryCode;
            extinfo.Supplier = (int)Session["OwnerClient"];
            bll.SetProductExtInfo(extinfo);
            count++;
        }
        if (count > 0)
        {
            MessageBox.Show(this, string.Format("成功将{0}个商品加入经营范围!", count));
            BindGrid();
        }
        else
            MessageBox.Show(this, "请选择要加入经营产商品!");
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:36,代码来源:Pop_SelectMoreProduct.aspx.cs


注:本文中的PDT_ProductBLL.SetProductExtInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。