本文整理汇总了C#中BLL.ReceiveDoc.SaveNewReceiveDocEntryFromPicklistDetail方法的典型用法代码示例。如果您正苦于以下问题:C# ReceiveDoc.SaveNewReceiveDocEntryFromPicklistDetail方法的具体用法?C# ReceiveDoc.SaveNewReceiveDocEntryFromPicklistDetail怎么用?C# ReceiveDoc.SaveNewReceiveDocEntryFromPicklistDetail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.ReceiveDoc
的用法示例。
在下文中一共展示了ReceiveDoc.SaveNewReceiveDocEntryFromPicklistDetail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CommitAccountToAccountTransfer
/// <summary>
/// Commits the account to account transfer.
/// </summary>
/// <param name="orderID">The order ID.</param>
/// <param name="userID">The user ID.</param>
/// <param name="convertedEthDate">The converted eth date.</param>
public void CommitAccountToAccountTransfer(int orderID, int userID, DateTime convertedEthDate)
{
int? supplierID = null;
BLL.Transfer transfer = new Transfer();
transfer.LoadByOrderID(orderID);
if (transfer.RowCount == 0)
return;
int newStoreID, newPhysicalStoreID;
newStoreID = transfer.ToStoreID;
newPhysicalStoreID = transfer.ToPhysicalStoreID;
PhysicalStore toPhysicalStore = new PhysicalStore();
toPhysicalStore.LoadByPrimaryKey(transfer.ToPhysicalStoreID);
BLL.PickList picklist = new PickList();
picklist.LoadByOrderID(orderID);
BLL.PickListDetail pld = new PickListDetail();
pld.LoadByPickListIDWithStvlogID(picklist.ID);
BLL.ReceiveDoc rdOriginal = new ReceiveDoc();
rdOriginal.LoadByPrimaryKey(pld.ReceiveDocID);
BLL.Order order=new Order();
order.LoadByPrimaryKey(orderID);
if(order.OrderTypeID == OrderType.CONSTANTS.ACCOUNT_TO_ACCOUNT_TRANSFER)
{
var activity = new Activity();
activity.LoadByPrimaryKey(newStoreID);
supplierID = activity.SupplierID;
}
else if(order.OrderTypeID == OrderType.CONSTANTS.STORE_TO_STORE_TRANSFER)
{
var activity = new Activity();
activity.LoadByPrimaryKey(newPhysicalStoreID);
supplierID = activity.SupplierID;
}
PO po = PO.CreatePOforStandard( (int) order.GetColumn("OrderTypeID"),transfer.ToStoreID,supplierID,"Transfer",CurrentContext.LoggedInUser.ID);
int IDPrinted = Convert.ToInt32(pld.GetColumn("IDPrinted"));
int receiptTypeID = order.OrderTypeID == OrderType.CONSTANTS.ACCOUNT_TO_ACCOUNT_TRANSFER
? ReceiptType.CONSTANTS.ACCOUNT_TO_ACCOUNT_TRANSFER
:order.OrderTypeID == OrderType.CONSTANTS.STORE_TO_STORE_TRANSFER
? ReceiptType.CONSTANTS.STORE_TO_STORE_TRANSFER
: order.OrderTypeID == OrderType.CONSTANTS.ERROR_CORRECTION_TRANSFER
? ReceiptType.CONSTANTS.ERROR_CORRECTION:ReceiptType.CONSTANTS.STANDARD_RECEIPT;
Receipt receipt = ReceiptInvoice.CreateReceiptInvoiceAndReceiptForTransfer(receiptTypeID,po.ID,toPhysicalStore.PhysicalStoreTypeID,IDPrinted,userID);
var mergedPickLists = MergePickListsOfSameInfo(pld); // Picklists of the same info means: Based on all constraints we have on receiveDoc(Batch,Exp,ItemID,UnitID...): should be merged with summed quantity.
pld.Rewind();
while (!pld.EOF)
{
if(IDPrinted != Convert.ToInt32(pld.GetColumn("IDPrinted")))
{
IDPrinted = Convert.ToInt32(pld.GetColumn("IDPrinted"));
receipt = ReceiptInvoice.CreateReceiptInvoiceAndReceiptForTransfer(receiptTypeID,po.ID, toPhysicalStore.PhysicalStoreTypeID, IDPrinted, userID);
}
var rDoc = new ReceiveDoc();
if (!mergedPickLists.ContainsKey(pld.ID))
{
pld.MoveNext();
continue;
}
rDoc.SaveNewReceiveDocEntryFromPicklistDetail(pld, userID, newStoreID, newPhysicalStoreID,
convertedEthDate,receipt.ID,supplierID);
pld.MoveNext();
}
}