本文整理汇总了C#中BLL.ReceiveDoc.ChangeQuantity方法的典型用法代码示例。如果您正苦于以下问题:C# ReceiveDoc.ChangeQuantity方法的具体用法?C# ReceiveDoc.ChangeQuantity怎么用?C# ReceiveDoc.ChangeQuantity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.ReceiveDoc
的用法示例。
在下文中一共展示了ReceiveDoc.ChangeQuantity方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Commit
//.........这里部分代码省略.........
{
//Review: New Code
PickListDetail pickListDetail = PickListDetail.GeneratePickListDetail(receivePallet,
InventoryCommitMemberInstance
.PickList.ID,
Convert.ToDecimal(
receivePallet.Balance));
//TODO: Create the issueDoc, pass the picklistdetail, orderid and picklist above
IssueService issueService = new IssueService();
IssueDoc issueDoc = issueService.CreateIssueFromPicklist(pickListDetail,
InventoryCommitMemberInstance.Order,
ethiopianDate,
InventoryCommitMemberInstance.Issue,
InventoryCommitMemberInstance.User);
//Link IssueDoc to InventoryTable
// Could have put it on the issueService method but it would have decrease the useablity
IssueDocInventory issueDocInventory = new IssueDocInventory();
issueDocInventory.AddNew();
issueDocInventory.InventoryID = ID;
issueDocInventory.IssueDocID = issueDoc.ID;
issueDocInventory.Save();
receivePallet.MoveNext();
count++;
if (backgroundWorker != null)
{
backgroundWorker.ReportProgress(
Convert.ToInt32((Convert.ToDecimal(count) / Convert.ToDecimal(receivePallet.RowCount)) * 100),
"Detail");
}
}
}
//TODO: Create the receive (use the inventory object itself)
ReceiveService receiveService = new ReceiveService();
if (!IsColumnNull("InventorySoundQuantity") && InventorySoundQuantity > 0)
{
ReceiveDoc receiveDoc = receiveService.CreateInventoryReceive(this,
InventoryCommitMemberInstance.Receipt.
ID, QuantityType.Sound,
ethiopianDate,
InventoryCommitMemberInstance.User);
ReceiveDocID = receiveDoc.ID;
}
if (!IsColumnNull("InventoryExpiredQuantity") && InventoryExpiredQuantity > 0)
{
ReceiveDoc receiveDoc = receiveService.CreateInventoryReceive(this,
InventoryCommitMemberInstance.Receipt.
ID, QuantityType.Expired,
ethiopianDate,
InventoryCommitMemberInstance.User);
ReceiveDocID = receiveDoc.ID;
}
if (!IsColumnNull("InventoryDamagedQuantity") && InventoryDamagedQuantity > 0)
{
ReceiveDoc receiveDoc = receiveService.CreateInventoryReceive(this,
InventoryCommitMemberInstance.Receipt.
ID, QuantityType.Damaged,
ethiopianDate,
InventoryCommitMemberInstance.User);
DamagedReceiveDocID = receiveDoc.ID;
}
if (backgroundWorker != null)
{
backgroundWorker.ReportProgress(100, "Detail");
}
}
else
{
if (!IsColumnNull("ReceiveDocID"))
{
ReceiveDoc receiveDoc = new ReceiveDoc();
receiveDoc.LoadByPrimaryKey(ReceiveDocID);
receiveDoc.ChangeQuantity(!IsColumnNull("InventorySoundQuantity") ? InventorySoundQuantity
: !IsColumnNull("InventoryExpiredQuantity") ? InventoryExpiredQuantity
: 0);
}
if (!IsColumnNull("DamagedReceiveDocID"))
{
ReceiveDoc receiveDoc = new ReceiveDoc();
receiveDoc.LoadByPrimaryKey(DamagedReceiveDocID);
receiveDoc.ChangeQuantity(InventoryDamagedQuantity);
}
}
IsDraft = false;
Save();
InventoryCommitMemberInstance.Transaction.CommitTransaction();
}