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


C# PDT_ProductBLL类代码示例

本文整理汇总了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());
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:29,代码来源:StandardPriceDetail.aspx.cs

示例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;
            }
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:26,代码来源:ProductPictureList.aspx.cs

示例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());
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:31,代码来源:ProductDetail.aspx.cs

示例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();
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:31,代码来源:InventoryDifferenceInput.aspx.cs

示例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);
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:7,代码来源:ProductPictureList.aspx.cs

示例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;
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:7,代码来源:OrderProductApplyDetail_Print.aspx.cs

示例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, "请选择要加入经营产商品!");
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:27,代码来源:Pop_SelectMoreProduct.aspx.cs

示例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);
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:28,代码来源:Pop_OrderApplyDetailAdjust.aspx.cs

示例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());
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:25,代码来源:ProductDetail.aspx.cs

示例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;
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:8,代码来源:OrderDeliveryDetail_SignIn.aspx.cs

示例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;
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:8,代码来源:OrderStorageList.aspx.cs

示例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;
     }
 }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:9,代码来源:Pop_Search_Product.aspx.cs

示例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 "";
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:10,代码来源:JXCSummary_Detail.aspx.cs

示例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 "";
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:10,代码来源:JXCSummary_Detail.aspx.cs

示例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();
     }
 }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:10,代码来源:ProductPictureList.aspx.cs


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