本文整理汇总了C#中Order.GetColumn方法的典型用法代码示例。如果您正苦于以下问题:C# Order.GetColumn方法的具体用法?C# Order.GetColumn怎么用?C# Order.GetColumn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Order
的用法示例。
在下文中一共展示了Order.GetColumn方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ComputeStockCalculationsForAnOrderDetail
/// <summary>
/// Computes the stock calculations for an order detail.
/// </summary>
/// <param name="currentMonth">The current month.</param>
/// <param name="currentYear">The current year.</param>
/// <param name="userID">The user ID.</param>
/// <param name="orderDetail">The order detail.</param>
/// <returns></returns>
public DataRow ComputeStockCalculationsForAnOrderDetail(int currentMonth, int currentYear, int userID, OrderDetail orderDetail)
{
if (!IsOrderDetailTableReady(orderDetail))
{
PrepareOrderDetailTable(orderDetail);
}
int? preferredManufacturer;
int? preferredPhysicalStoreID;
decimal usableStock;
decimal approved;
decimal availableQuantity;
Balance bal = new Balance();
ItemManufacturer imf = new ItemManufacturer();
int? unitid = null;
PriceSettings priceSettings = BLL.Settings.HandleDeliveryNotes ? PriceSettings.BOTH : PriceSettings.PRICED_ONLY;
BLL.Order parentOrder = new Order();
parentOrder.LoadByPrimaryKey(orderDetail.OrderID);
unitid = orderDetail.UnitID;
preferredManufacturer = orderDetail.IsColumnNull("PreferredManufacturerID") ? null : new int?(orderDetail.PreferredManufacturerID);
preferredPhysicalStoreID = orderDetail.IsColumnNull("PreferredPhysicalStoreID") ? null : new int?(orderDetail.PreferredPhysicalStoreID);
if (orderDetail.IsColumnNull("StoreID"))
{
orderDetail.StoreID = BLL.Activity.GetActivityUsingFEFO(this.FromStore, orderDetail.ItemID, orderDetail.UnitID);
orderDetail.Save();
}
Activity storeObject = new Activity();
availableQuantity = storeObject.LoadOptionsForOrderDetail(userID, orderDetail.ID, priceSettings, bal, false, out usableStock, out approved);
orderDetail.SetColumn("AvailableStores", storeObject.DefaultView);
if (storeObject.RowCount == 1)
{
orderDetail.StoreID = storeObject.ID;
// Avoid error if the column IsDeliveryNote doesn't exsit at all.
orderDetail.DeliveryNote = storeObject.DefaultView.Table.Columns.IndexOf("IsDeliveryNote") >= 0 &&
!storeObject.IsColumnNull("IsDeliveryNote") &&
Convert.ToBoolean(storeObject.GetColumn("IsDeliveryNote"));
availableQuantity = Convert.ToDecimal(storeObject.GetColumn("AvailableSKU"));
}
else if (storeObject.RowCount > 1)
{
//TOCLEAN: Lord have mercy.
//
// check if the default activity is selected
// if it has been selected, then do a good job and select it.
storeObject.Rewind();
while (
!storeObject.EOF
&&
(
(
storeObject.ID == orderDetail.StoreID
&& !orderDetail.IsColumnNull("DeliveryNote")
&& orderDetail.DeliveryNote
&& !Convert.ToBoolean(storeObject.GetColumn("IsDeliveryNote"))
)
||
storeObject.ID != orderDetail.StoreID
)
)
{
storeObject.MoveNext();
}
// the selected store is found, don't worry.
if (!storeObject.EOF)
{
availableQuantity = Convert.ToDecimal(storeObject.GetColumn("AvailableSKU"));
}
else
{
// the selected store is not found, please do select the first store.
storeObject.Rewind();
orderDetail.StoreID = storeObject.ID;
orderDetail.DeliveryNote = (storeObject.DefaultView.Table.Columns.IndexOf("IsDeliveryNote") >= 0 &&
!storeObject.IsColumnNull("IsDeliveryNote") &&
Convert.ToBoolean(storeObject.GetColumn("IsDeliveryNote")));
availableQuantity = Convert.ToDecimal(storeObject.GetColumn("AvailableSKU"));
}
}
orderDetail.SetColumn("HasStores", (storeObject.RowCount > 1) ? "*" : "");
// Precaution ... to hide -ve available quantity.
if (availableQuantity < 0)
{
availableQuantity = 0;
//.........这里部分代码省略.........
示例2: GetApprovedQuantity
/// <summary>
/// Gets the approved quantity.
/// </summary>
/// <param name="setting">The setting.</param>
/// <param name="storeId">The store id.</param>
/// <param name="itemID">The item ID.</param>
/// <param name="unitid">The unitid.</param>
/// <param name="preferedExpiry">The prefered expiry.</param>
/// <param name="preferredManufacturer">The preferred manufacturer.</param>
/// <param name="preferredPhysicalStoreID">The preferred physical store ID.</param>
/// <returns></returns>
internal static int GetApprovedQuantity(PriceSettings setting, int storeId, int itemID, int? unitid, DateTime? preferedExpiry, int? preferredManufacturer, int? preferredPhysicalStoreID)
{
var query = HCMIS.Repository.Queries.Order.SelectGetApprovedQuantity(storeId, itemID, unitid, preferedExpiry,
preferredManufacturer,
preferredPhysicalStoreID,
setting ==
PriceSettings.DELIVERY_NOTE_ONLY);
Order ord = new Order();
ord.LoadFromRawSql(query);
if (ord.RowCount > 0 && !ord.IsColumnNull("Approved"))
{
return Convert.ToInt32(ord.GetColumn("Approved"));
}
return 0;
}
示例3: GetRequisitions
/// <summary>
/// Returns the list of requisitions with the status specified.
/// </summary>
/// <param name="status">The status.</param>
/// <param name="userID">The user ID.</param>
/// <returns></returns>
public static DataTable GetRequisitions(string statuscode, int userID)
{
string orderStatuses = statuscode == "DRFT" ? "'DRFT'" : " 'DRFT','ORFI','APRD','PIKL','PLCN' ";
var query = HCMIS.Repository.Queries.Order.SelectGetRequisitions(userID, orderStatuses);
Order ord = new Order();
ord.LoadFromRawSql(query);
while (!ord.EOF)
{
EthiopianDate.EthiopianDate eth;
ord.SetColumn("DateRequested",
EthiopianDate.EthiopianDate.GregorianToEthiopian(Convert.ToDateTime(ord.GetColumn("EurDate"))));
ord.MoveNext();
}
return ord.DataTable;
}
示例4: 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();
}
}