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


C# InventoryManager.GetInventory方法代码示例

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


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

示例1: btnOK_Click

    protected void btnOK_Click(object sender, EventArgs e)
    {
        Inventory inv = new Inventory();        
        InventoryManager iManager = new InventoryManager(this);

        foreach (GridViewRow row in grdDevolution.Rows)
        {
            if (row.RowType == DataControlRowType.DataRow)
            {
                inv = iManager.GetInventory(Company.CompanyId,
                    Convert.ToInt16(grdDevolution.DataKeys[row.RowIndex]["ProductId"]),
                    Deposit.DepositId);
                inv.RealCost = Convert.ToDecimal(grdDevolution.DataKeys[row.RowIndex]["UnitCost"]);
                inv.UnitPrice = Convert.ToDecimal(grdDevolution.DataKeys[row.RowIndex]["UnitPrice"]);
                inv.Quantity = Convert.ToInt16(grdDevolution.DataKeys[row.RowIndex]["Quantity"]);

                iManager.StockDeposit(inv, null, User.Identity.UserId);

                //his.CompanyId = Company.CompanyId;
                //his.DepositId = Deposit.DepositId;
                //his.DestinationDepositId = Deposit.DepositId;
                //his.InventoryEntryTypeId = (int)EntryType.Devolution;
                //his.LogDate = DateTime.Now;
                //his.CurrencyRateId = inv.CurrencyRateId;
                //his.FiscalNumber = inv.FiscalNumber;
                //his.Localization = inv.Localization;
                //his.MinimumRequired = inv.MinimumRequired;
                //his.ProductId = inv.ProductId;
                //his.Profit = inv.Profit;
                //his.Quantity = Convert.ToInt16(grdDevolution.DataKeys[row.RowIndex]["Quantity"]);
                //his.RealCost = Convert.ToDecimal(grdDevolution.DataKeys[row.RowIndex]["UnitCost"]);
                //his.UnitPrice = Convert.ToDecimal(grdDevolution.DataKeys[row.RowIndex]["UnitPrice"]);
                //his.SupplierId = inv.SupplierId;

                //iManager.InsertHistory(his);
            }
        }

        DropPayout dp = new DropPayout();
        DropPayoutManager dManager = new DropPayoutManager(this);
        dp.Amount = Convert.ToDecimal(txtDevolutionValue.Text);
        dp.Comment = "Devolução de items da venda nº " + txtSaleNumber.Text;
        dp.CompanyId = Company.CompanyId;
        dp.DepositId = Deposit.DepositId;
        dp.ModifiedDate = DateTime.Now;
        dp.UserId = User.Identity.UserId;

        dManager.Insert(dp);

        Context.Items["OK"] = "OK";
        Server.Transfer("Exchange.aspx");
    }
开发者ID:sidneylimafilho,项目名称:InfoControl,代码行数:52,代码来源:Exchange.aspx.cs


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