本文整理汇总了C#中OrderDetail.SetColumnNull方法的典型用法代码示例。如果您正苦于以下问题:C# OrderDetail.SetColumnNull方法的具体用法?C# OrderDetail.SetColumnNull怎么用?C# OrderDetail.SetColumnNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrderDetail
的用法示例。
在下文中一共展示了OrderDetail.SetColumnNull方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ComputeStockCalculationsForAnOrderDetail
//.........这里部分代码省略.........
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");
}
Item itm = new Item();
string warning = (itm.GetItemAllowStatus(orderDetail.ItemID, this.RequestedBy) == 0) ? "Warning" : "";
orderDetail.SetColumn("Warning", warning);
//if (!orderDetail.IsColumnNull("StoreID"))
//{
// var balance = new Balance();
//balance.LoadQuantityNotReceive(orderDetail.ItemID, orderDetail.UnitID, parentOrder.FromStore);
//var totalrequested =balance.GetTotalApprovedQuantityByItem(parentOrder.ID, orderDetail.ItemID, orderDetail.UnitID,parentOrder.FromStore);
orderDetail.SetColumn("GIT", 0);
orderDetail.SetColumn("CRequested",0);
orderDetail.SetColumn("CApproved",0);
//orderDetail.SetColumn("DOS", balance.DOS);
//orderDetail.SetColumn("TotalIssued", balance.TotalIssued);
//orderDetail.SetColumn("FiscalYearDays", balance.FiscalYearDays);
//decimal amc = 0;
//decimal mos = 0;
//var totalissued = balance.TotalIssued;
//var totaldatediff = balance.FiscalYearDays - balance.DOS;
//if (totalissued != 0)
//{
// amc = Convert.ToDecimal(totalissued / totaldatediff) * 30;
//}
//else if (amc == 0)
//{
// mos = Convert.ToDecimal(balance.FiscalYearDays / 30.0);
//}
//else if (amc != 0 && availableQuantity != 0)
//{
// mos = Convert.ToDecimal(availableQuantity / amc);
//}
//else if (availableQuantity == 0 && amc != 0)
//{
// mos = 0;
//}
//else
//{
// amc = 0;
// mos = 0;
//}
orderDetail.SetColumn("TotalRequested", 0);
orderDetail.SetColumn("AMC", 0);
orderDetail.SetColumn("MOS", 0);
//}
return orderDetail.DefaultView.ToTable().Rows[0];
}