本文整理汇总了C#中PDT_ProductBLL类的典型用法代码示例。如果您正苦于以下问题:C# PDT_ProductBLL类的具体用法?C# PDT_ProductBLL怎么用?C# PDT_ProductBLL使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PDT_ProductBLL类属于命名空间,在下文中一共展示了PDT_ProductBLL类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: bt_In_Click
protected void bt_In_Click(object sender, EventArgs e)
{
Save();
foreach (GridViewRow row in gv_NotInList.Rows)
{
CheckBox cb_check = (CheckBox)row.FindControl("cb_Check");
if (cb_check.Checked)
{
PDT_StandardPriceBLL _bll;
if ((int)ViewState["ID"] != 0)
_bll = new PDT_StandardPriceBLL((int)ViewState["ID"]);
else
return;
PDT_StandardPrice_Detail pd = new PDT_StandardPrice_Detail();
pd.Product = int.Parse(gv_NotInList.DataKeys[row.RowIndex]["ID"].ToString());
PDT_ProductBLL productbll = new PDT_ProductBLL(pd.Product);
PDT_ProductExtInfo extinfo = productbll.GetProductExtInfo((int)Session["OwnerClient"]);
if (extinfo != null)
pd.Price = extinfo.SalesPrice;
else
pd.Price = productbll.Model.StdPrice;
_bll.AddDetail(pd);
}
}
Response.Redirect("StandardPriceDetail.aspx?ID=" + ViewState["ID"].ToString());
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Request.QueryString["ID"] != null)
{
PDT_Product product = new PDT_ProductBLL(int.Parse(Request.QueryString["ID"])).Model;
if (BindProduct(product))
{
BindGrid();
select_ProductCode.Enabled = false;
if (product.Brand > 0)
{
PDT_Brand b = new PDT_BrandBLL(product.Brand).Model;
Header.Attributes["WebPageSubCode"] = "IsOpponent=" + b.IsOpponent;
}
}
}
else
{
UploadFile1.Visible = false;
}
}
}
示例3: bt_OK_Click
protected void bt_OK_Click(object sender, EventArgs e)
{
PDT_ProductBLL _Product = null;
if ((int)ViewState["ID"] == 0)
{
_Product = new PDT_ProductBLL();
}
else
{
_Product = new PDT_ProductBLL((int)ViewState["ID"]);
}
pl_detail.GetData(_Product.Model);
if ((int)ViewState["ID"] == 0)
{
if (_Product.Model.State == 0) _Product.Model.State = 1;
if (_Product.Model.ApproveFlag == 0) _Product.Model.ApproveFlag = 1;
_Product.Model.OwnerType = (int)Session["OwnerType"];
_Product.Model.OwnerClient = (int)Session["OwnerClient"];
_Product.Model.InsertStaff = (int)Session["UserID"];
ViewState["ID"] = _Product.Add();
}
else
{
_Product.Model.UpdateStaff = (int)Session["UserID"];
_Product.Update();
}
Response.Redirect("ProductList.aspx?Brand=" + _Product.Model.Brand.ToString());
}
示例4: bt_AddProduct_Click
protected void bt_AddProduct_Click(object sender, EventArgs e)
{
SVM_InventoryDifferencesBLL bll = new SVM_InventoryDifferencesBLL((int)ViewState["InventoryID"]);
int product = 0;
if (int.TryParse(select_Product.SelectValue, out product) && product > 0)
{
PDT_Product pdt = new PDT_ProductBLL(product).Model;
if (pdt == null) return;
int quantity = int.Parse(tbx_Q1.Text) * pdt.ConvertFactor + int.Parse(tbx_Q2.Text);
if (quantity == 0) return;
SVM_InventoryDifferences_Detail _detail = bll.Items.FirstOrDefault(m => m.Product == product);
if (_detail == null)
{
_detail = new SVM_InventoryDifferences_Detail();
decimal factoryprice = 0, price = 0;
PDT_ProductPriceBLL.GetPriceByClientAndType((int)ViewState["ClientID"], product, 2, out factoryprice, out price);
_detail.FactoryPrice = factoryprice;
_detail.Product = pdt.ID;
_detail.Quantity = quantity;
_detail.InventoryID = (int)ViewState["InventoryID"];
bll.AddDetail(_detail);
}
else
{
_detail.Quantity = quantity;
bll.UpdateDetail(_detail);
}
BindGrid();
}
}
示例5: select_ProductCode_TextChange
protected void select_ProductCode_TextChange(object sender, MCSControls.MCSWebControls.TextChangeEventArgs e)
{
select_ProductCode.SelectValue = e.Code;
PDT_Product _product = new PDT_ProductBLL(e.Code).Model;
BindProduct(_product);
}
示例6: GetReplyQuantity
protected int GetReplyQuantity(int appProduct, int appQuantity, int adjQuantity)
{
PDT_Product p = new PDT_ProductBLL(appProduct).Model;
int quantity = appQuantity + adjQuantity;
return quantity / p.ConvertFactor;
}
示例7: 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, "请选择要加入经营产商品!");
}
示例8: bt_Save_Click
protected void bt_Save_Click(object sender, EventArgs e)
{
ORD_OrderApplyDetail m = new ORD_OrderApplyBLL().GetDetailModel((int)ViewState["ID"]);
PDT_Product product = new PDT_ProductBLL(m.Product).Model;
if (int.Parse(tbx_ApproveQuantity_T.Text) * product.ConvertFactor > m.BookQuantity)
{
MessageBox.Show(this, "批复请购数量不能超过申请请购数量!");
return;
}
if (int.Parse(tbx_ApproveQuantity_T.Text) * product.ConvertFactor == m.BookQuantity + m.AdjustQuantity)
{
MessageBox.Show(this, "批复请购数量与前一次调整值相同,没有发生变化,不需要调整!");
return;
}
decimal OldAdjustQuantity = m.AdjustQuantity;
m.AdjustQuantity = int.Parse(tbx_ApproveQuantity_T.Text) * product.ConvertFactor - m.BookQuantity;
m.AdjustReason += "批复人:【" + Session["UserRealName"].ToString() + "】 批复数量:" + tbx_ApproveQuantity_T.Text + " 调整原因:" + tbx_AdjustReason.Text + "<br/>";
ORD_OrderApplyBLL bll = new ORD_OrderApplyBLL(m.ApplyID);
bll.UpdateDetail(m);
Session["SuccessFlag"] = true;
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "message", "<script language='javascript'>window.close();</script>", false);
}
示例9: bt_OK_Click
protected void bt_OK_Click(object sender, EventArgs e)
{
PDT_ProductBLL _Product = null;
if (bt_OK.Text == "添加")
{
_Product = new PDT_ProductBLL();
}
else
{
_Product = new PDT_ProductBLL((int)ViewState["ID"]);
}
pl_detail.GetData(_Product.Model);
if (bt_OK.Text == "添加")
{
ViewState["ID"] = _Product.Add();
}
else
{
_Product.Model.UpdateStaff = (int)Session["UserID"];
_Product.Update();
}
Response.Redirect("ProductDetail.aspx?ID=" + ViewState["ID"].ToString() + "&IsOpponent=" + ViewState["IsOpponent"].ToString());
}
示例10: GetPackagingQuantity
protected int GetPackagingQuantity(int product, int quantity)
{
if (quantity == 0) return 0;
PDT_Product p = new PDT_ProductBLL(product).Model;
return quantity % p.ConvertFactor;
}
示例11: GetTrafficeQuantity
protected int GetTrafficeQuantity(int product, int quantity)
{
if (quantity == 0) return 0;
PDT_Product p = new PDT_ProductBLL(product).Model;
return quantity / p.ConvertFactor;
}
示例12: dl_product_SelectedIndexChanged
protected void dl_product_SelectedIndexChanged(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(dl_product.SelectedValue))
{
PDT_ProductBLL _p = new PDT_ProductBLL(Int32.Parse(dl_product.SelectedValue));
tbx_SelectedProductName.Text = _p.Model.FullName;
tbx_SelectedProductID.Text = dl_product.SelectedValue;
}
}
示例13: GetPDTClassifyName
protected string GetPDTClassifyName(int product)
{
PDT_Product p = new PDT_ProductBLL(product, true).Model;
PDT_Classify c = new PDT_ClassifyBLL(p.Classify).Model;
if (c != null)
return c.Name;
else
return "";
}
示例14: GetPDTBrandName
protected string GetPDTBrandName(int product)
{
PDT_Product p = new PDT_ProductBLL(product, true).Model;
PDT_Brand b = new PDT_BrandBLL(p.Brand).Model;
if (b != null)
return b.Name;
else
return "";
}
示例15: select_ProductCode_SelectChange
protected void select_ProductCode_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e)
{
int id = 0;
int.TryParse(e.SelectValue, out id);
if (id > 0)
{
PDT_Product _product = new PDT_ProductBLL(id).Model;
if (BindProduct(_product)) BindGrid();
}
}