本文整理汇总了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");
}