本文整理汇总了C#中BLL.ReceiveDoc.LoadExpiryDatesForItem方法的典型用法代码示例。如果您正苦于以下问题:C# ReceiveDoc.LoadExpiryDatesForItem方法的具体用法?C# ReceiveDoc.LoadExpiryDatesForItem怎么用?C# ReceiveDoc.LoadExpiryDatesForItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.ReceiveDoc
的用法示例。
在下文中一共展示了ReceiveDoc.LoadExpiryDatesForItem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ComputeStockCalculationsForAnOrderDetail
//.........这里部分代码省略.........
manuf.AddNew();
manuf.ID = -1;
manuf.Name = "Remove Preference";
orderDetail.SetColumn("AvailableManufacturer", manuf.DefaultView);
orderDetail.SetColumn("HasManufacturers", (manuf.RowCount > 2) ? "*" : "");
if (manuf.RowCount == 2)
{
manuf.Rewind();
orderDetail.PreferredManufacturerID = manuf.ID;
}
}
if (BLL.Settings.AllowPreferredPhysicalStore)
{
PhysicalStore phyStore = new PhysicalStore();
phyStore.LoadForItem(userID, orderDetail.ItemID, orderDetail.StoreID, orderDetail.UnitID);
phyStore.AddNew();
phyStore.Name = "Remove Preference";
phyStore.ID = -1;
orderDetail.SetColumn("AvailablePhysicalStore", phyStore.DefaultView);
orderDetail.SetColumn("HasPhysicalStoreChoice", (phyStore.RowCount > 2) ? "*" : "");
if (phyStore.RowCount == 2)
{
phyStore.Rewind();
orderDetail.PreferredPhysicalStoreID = phyStore.ID;
}
}
if (BLL.Settings.AllowPreferredExpiry)
{
ReceiveDoc rd = new ReceiveDoc();
rd.LoadExpiryDatesForItem(orderDetail.ItemID, orderDetail.StoreID, orderDetail.UnitID, true, preferredManufacturer, preferredPhysicalStoreID);
rd.AddNew();
rd.SetColumn("ExpiryDateString", "Remove Preference");
orderDetail.SetColumn("AvailableExpiry", rd.DefaultView);
orderDetail.SetColumn("HasExpiryChoice", (rd.RowCount > 2) ? "*" : "");
if (!orderDetail.IsColumnNull("PreferredExpiryDate"))
{
DateTime expDate = orderDetail.PreferredExpiryDate;
string expDateStr = string.Format("{0}-{1:00}-{2:00}", expDate.Year, expDate.Month, expDate.Day, "");
orderDetail.SetColumn("ExpiryDateString", expDateStr);
}
}
// do some reseting if the approved quanitty is greater than
if (orderDetail.ApprovedQuantity / qinBu > availableQuantity)
{
orderDetail.ApprovedQuantity = availableQuantity * qinBu;
}
orderDetail.SetColumn("UsableStock", usableStock);
orderDetail.SetColumn("PApprovedStock", approved);
orderDetail.SetColumn("SKUBU", qinBu);
orderDetail.SetColumn("AvailableSKU", availableQuantity);
string TextID = ((orderDetail.IsColumnNull("DeliveryNote") || !orderDetail.DeliveryNote)
? "N"
: "D") + orderDetail.StoreID.ToString();
orderDetail.SetColumn("TextID", TextID);
orderDetail.SetColumn("ApprovedSKU", orderDetail.ApprovedQuantity / Convert.ToDecimal(qinBu));
orderDetail.SetColumn("RequestedSKU", orderDetail.Quantity / Convert.ToDecimal(qinBu));
if (availableQuantity == 0)
{
orderDetail.SetColumnNull("TextID");
orderDetail.SetColumnNull("StoreID");
}