• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# PDT_ProductBLL类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



PDT_ProductBLL类属于命名空间,在下文中一共展示了PDT_ProductBLL类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: bt_OK_Click

    protected void bt_OK_Click(object sender, EventArgs e)
    {
        PDT_ProductBLL _Product = null;
        PDT_ProductExtInfo extinfo = null;

        if ((int)ViewState["ID"] == 0)
        {
            _Product = new PDT_ProductBLL();
        }
        else
        {
            _Product = new PDT_ProductBLL((int)ViewState["ID"]);
            extinfo = _Product.GetProductExtInfo((int)Session["OwnerClient"]);
        }

        if (extinfo == null)
        {
            extinfo = new PDT_ProductExtInfo();
            extinfo.Supplier = (int)Session["OwnerClient"];
        }

        pl_detail.GetData(_Product.Model);
        pl_detail.GetData(extinfo);

        if ((int)ViewState["ID"] == 0)
        {
            _Product.Model.Category = extinfo.Category;
            _Product.Model.State = 1;
            _Product.Model.ApproveFlag = 1;
            _Product.Model.InsertStaff = (int)Session["UserID"];
            _Product.Model.OwnerType = 3;
            _Product.Model.OwnerClient = (int)Session["OwnerClient"];
            extinfo.InsertStaff = (int)Session["UserID"];

            ViewState["ID"] = _Product.Add();
        }
        else
        {
            if ((int)Session["OwnerClient"] == _Product.Model.OwnerClient)
            {
                _Product.Model.UpdateStaff = (int)Session["UserID"];
                _Product.Update();
            }
        }
        #region 将价格折算为最小单位
        extinfo.BuyPrice = extinfo.BuyPrice / _Product.Model.ConvertFactor;
        extinfo.SalesPrice = extinfo.SalesPrice / _Product.Model.ConvertFactor;
        extinfo.MaxSalesPrice = extinfo.MaxSalesPrice / _Product.Model.ConvertFactor;
        extinfo.MinSalesPrice = extinfo.MinSalesPrice / _Product.Model.ConvertFactor;
        #endregion

        _Product.SetProductExtInfo(extinfo);

        Response.Redirect("ProductList.aspx?Category=" + extinfo.Category.ToString());
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:55,代码来源:ProductDetail.aspx.cs


示例17: gv_List_RowDataBound

    protected void gv_List_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (ViewState["Details"] == null) return;
        ListTable<PBM_DeliveryDetail> Details = (ListTable<PBM_DeliveryDetail>)ViewState["Details"];
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            int id = (int)((GridView)sender).DataKeys[e.Row.RowIndex]["ID"];
            PBM_DeliveryDetail d = Details[id.ToString()];
            if (d == null) return;

            PDT_Product product = new PDT_ProductBLL(d.Product, true).Model;
            if (product == null) return;
            Dictionary<string, Dictionary_Data> dic = DictionaryBLL.GetDicCollections("PDT_Packaging");
            string _T = dic[product.TrafficPackaging.ToString()].Name;
            string _P = dic[product.Packaging.ToString()].Name;

            Label lbProduct = (Label)e.Row.FindControl("lbProduct");
            if (lbProduct != null) lbProduct.Text = product.FullName;

            #region 显示产品价格包装信息
            Label lb_Price = (Label)e.Row.FindControl("lb_Price");
            if (lb_Price != null)
            {
                lb_Price.Text = (d.Price * product.ConvertFactor).ToString("0.##") + "元/" + _T;// +"(" + product.ConvertFactor.ToString() + _P + ")";
            }
            #endregion

            #region 显示产品数量信息
            Label lb_Quantity = (Label)e.Row.FindControl("lb_Quantity");
            if (lb_Quantity != null)
            {
                if (d.SignInQuantity / product.ConvertFactor > 0)
                    lb_Quantity.Text = (d.SignInQuantity / product.ConvertFactor).ToString() + _T;

                if (d.SignInQuantity % product.ConvertFactor > 0)
                    lb_Quantity.Text += "" + (d.SignInQuantity % product.ConvertFactor).ToString() + _P;
            }
            #endregion

            #region 追加订货模式
            if (d.SalesMode > 1)
            {
                Dictionary_Data dic_data = DictionaryBLL.GetDicCollections("PBM_SalseMode")[d.SalesMode.ToString()];
                if (dic_data != null) lbProduct.Text += "(" + dic_data.Name + ")";
            }
            #endregion

            Label lb_Fee = (Label)e.Row.FindControl("lb_Fee");
            if (lb_Fee != null) lb_Fee.Text = (Math.Round(d.Price * d.ConvertFactor, 2) * d.SignInQuantity / d.ConvertFactor).ToString("0.##");

            Label lbDiscountRate = (Label)e.Row.FindControl("lbDiscountRate");
            if (lbDiscountRate != null) lbDiscountRate.Text = d.DiscountRate.ToString("0.##%");
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:54,代码来源:SaleOutDetail_Print.aspx.cs


示例18: GetQuantityString

    protected string GetQuantityString(int product, int quantity)
    {
        if (quantity == 0) return "0";

        PDT_Product p = new PDT_ProductBLL(product).Model;

        string packing1 = DictionaryBLL.GetDicCollections("PDT_Packaging")[p.TrafficPackaging.ToString()].ToString();
        string packing2 = DictionaryBLL.GetDicCollections("PDT_Packaging")[p.Packaging.ToString()].ToString();

        string ret = "";
        if (quantity / p.ConvertFactor != 0) ret += (quantity / p.ConvertFactor).ToString() + packing1 + " ";
        if (quantity % p.ConvertFactor != 0) ret += (quantity % p.ConvertFactor).ToString() + packing2 + " ";
        return ret;
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:14,代码来源:OrderProductApplyDetail_Print.aspx.cs


示例19: bt_Add_Click

    protected void bt_Add_Click(object sender, ImageClickEventArgs e)
    {
        ORD_OrderCartBLL cart = (ORD_OrderCartBLL)Session["LogisticsOrderApplyDetail"];
        ImageButton b = (ImageButton)sender;
        TextBox tbx_BookQuantity_T = (TextBox)b.Parent.FindControl("tbx_BookQuantity_T");
        GridViewRow row = (GridViewRow)tbx_BookQuantity_T.Parent.Parent;

        int quantity = int.Parse(tbx_BookQuantity_T.Text);
        int product = (int)gv_List.DataKeys[row.RowIndex]["Product"];
        int factor = new PDT_ProductBLL(product, true).Model.ConvertFactor;

        cart.ModifyQuantity(product, quantity * factor + factor);
        BindGrid();
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:14,代码来源:OrderApplyDetail2.aspx.cs


示例20: bt_AddProduct_Click

    protected void bt_AddProduct_Click(object sender, EventArgs e)
    {
        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);

            DataTable dt = (DataTable)ViewState["DTDetail"];
            DataRow[] drs = dt.Select("ID=" + product.ToString());
            if (drs.Length > 0)
            {
                drs[0]["Quantity"] = quantity;
            }
            else
            {
                DataRow dr = dt.NewRow();

                decimal factoryprice = 0, price = 0;
                PDT_ProductPriceBLL.GetPriceByClientAndType((int)ViewState["ClientID"], product, (int)ViewState["Type"], out factoryprice, out price);

                dr["ID"] = product;
                dr["Code"] = pdt.Code;
                dr["FullName"] = pdt.FullName;
                dr["ShortName"] = pdt.ShortName;
                dr["Brand"] = pdt.Brand;
                dr["Spec"] = pdt["Spec"];
                dr["Classify"] = pdt.Classify;
                dr["ConvertFactor"] = pdt.ConvertFactor;
                dr["FactoryPrice"] = factoryprice;
                dr["Price"] = price;
                dr["Quantity"] = quantity;

                try
                {
                    dr["BrandName"] = new PDT_BrandBLL(pdt.Brand).Model.Name;
                    dr["ClassifyName"] = new PDT_ClassifyBLL(pdt.Classify).Model.Name;
                    dr["TrafficPackaging"] = DictionaryBLL.GetDicCollections("PDT_Packaging")[pdt.TrafficPackaging.ToString()].Name;
                    dr["Packaging"] = DictionaryBLL.GetDicCollections("PDT_Packaging")[pdt.Packaging.ToString()].Name;
                }
                catch { }

                dt.Rows.Add(dr);
            }
            BindGrid();
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:49,代码来源:SalesVolumeBatchInput.aspx.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# PEAPI类代码示例发布时间:2022-05-24
下一篇:
C# PCache类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap