本文整理汇总了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, "请选择要加入经营产商品!");
}
示例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, "请选择要加入经营产商品!");
}