本文整理汇总了C#中Order.LoadFromRawSql方法的典型用法代码示例。如果您正苦于以下问题:C# Order.LoadFromRawSql方法的具体用法?C# Order.LoadFromRawSql怎么用?C# Order.LoadFromRawSql使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Order
的用法示例。
在下文中一共展示了Order.LoadFromRawSql方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NeedsBackorder
public static bool NeedsBackorder(int orderID)
{
var query = HCMIS.Repository.Queries.Order.SelectNeedsBackorder(orderID);
var order = new Order();
order.LoadFromRawSql(query);
return order.RowCount > 0;
}
示例2: ComputeStockCalculationsForAnOrderDetail
//.........这里部分代码省略.........
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;
}
orderDetail.StockedOut = availableQuantity <= 0;
orderDetail.Save();
int qinBu = 1;
if (unitid.HasValue)
{
ItemUnit itemUnit = new ItemUnit();
itemUnit.LoadByPrimaryKey(unitid.Value);
qinBu = itemUnit.QtyPerUnit;
//Checking if the columns from the vwGetAllItems have been filled in.
var fullItemName = orderDetail.GetColumn("FullItemName").ToString();
if (string.IsNullOrEmpty(fullItemName))
{
BLL.Order temp = new Order();
temp.LoadFromRawSql(HCMIS.Repository.Queries.Order.SelectItemDetail(orderDetail.ItemID));
orderDetail.SetColumn("Unit", itemUnit.Text);
orderDetail.SetColumn("FullItemName", temp.GetColumn("FullItemName"));
orderDetail.SetColumn("StockCode", temp.GetColumn("StockCode"));
orderDetail.SetColumn("CategoryType", temp.GetColumn("CategoryType"));
}
}
orderDetail.SetColumn("AvailableQuantity", availableQuantity);
orderDetail.SetColumn("PricedQuantity", usableStock);
if (orderDetail.IsColumnNull("ApprovedQuantity"))
{
if ((orderDetail.Quantity / ((long)qinBu)) < availableQuantity)
{
orderDetail.ApprovedQuantity = orderDetail.Quantity;
}
else
{
orderDetail.ApprovedQuantity = availableQuantity * qinBu;
}
}
if (BLL.Settings.AllowPreferredManufacturers)
{
Manufacturer manuf = new Manufacturer();
manuf.LoadForItem(orderDetail.ItemID, orderDetail.StoreID, orderDetail.UnitID, true);
manuf.AddNew();
manuf.ID = -1;
manuf.Name = "Remove Preference";
orderDetail.SetColumn("AvailableManufacturer", manuf.DefaultView);
orderDetail.SetColumn("HasManufacturers", (manuf.RowCount > 2) ? "*" : "");
示例3: GetWeeklyWishListSummary
/// <summary>
/// Gets the weekly wish list summary.
/// </summary>
/// <returns></returns>
public static object GetWeeklyWishListSummary()
{
var query = HCMIS.Repository.Queries.Order.SelectGetWeeklyWishListSummary();
Order ord = new Order();
ord.LoadFromRawSql(query);
return ord.DefaultView;
}
示例4: GetWishListSummary
/// <summary>
/// Returns a table with Date and Wishlist amount entered on that date.
/// </summary>
/// <param name="days">For the past how many days (Enter -1 for all)</param>
/// <returns></returns>
public static object GetWishListSummary(int days)
{
string query;
if (days == -1)
query = HCMIS.Repository.Queries.Order.SelectGetWishListSummary();
else
query = HCMIS.Repository.Queries.Order.SelectGetWishListSummary(days);
Order ord = new Order();
ord.LoadFromRawSql(query);
return ord.DefaultView;
}
示例5: 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;
}
示例6: 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;
}
示例7: GetRequisitionDetails
/// <summary>
/// Gets the requisition details.
/// </summary>
/// <param name="orderID">The order ID.</param>
/// <returns></returns>
public static DataTable GetRequisitionDetails(int orderID)
{
var query = HCMIS.Repository.Queries.Order.SelectGetRequisitionDetailsQuery(orderID);
Order ord = new Order();
ord.LoadFromRawSql(query);
return ord.DataTable;
}
示例8: GetOrderStatusList
/// <summary>
/// Gets the order status list.
/// </summary>
/// <returns></returns>
public static DataTable GetOrderStatusList(int modeID)
{
var query = HCMIS.Repository.Queries.Order.SelectGetOrderStatusList(modeID);
Order order = new Order();
order.LoadFromRawSql(query);
return order.DataTable;
}
示例9: GetOrdersForReport
/// <summary>
/// Returns the Date, Order for a specific order status ID
/// </summary>
/// <param name="orderStatusID">The order status ID.</param>
/// <param name="days">For the past how many days (Enter -1 for all)</param>
/// <returns></returns>
public static object GetOrdersForReport(int orderStatusID, int days)
{
string query;
if (days == -1)
query = HCMIS.Repository.Queries.Order.SelectGetOrdersForReport(orderStatusID);
else
query = HCMIS.Repository.Queries.Order.SelectGetOrdersForReport(orderStatusID, days);
Order ord = new Order();
ord.LoadFromRawSql(query);
return ord.DefaultView;
}
示例10: GetNextOrderReference
/// <summary>
/// Gets Next order reference number,
/// this is used instead of implementation on the database because the reference number logic was changed
/// after the inital design which allowed users to type in the reference number.
/// </summary>
/// <returns></returns>
public static string GetNextOrderReference()
{
Order order = new Order();
var query = HCMIS.Repository.Queries.Order.SelectGetNextOrderReference(FiscalYear.Current.ID);
order.LoadFromRawSql(query);
if (order.RowCount == 0 || order.RefNo == "")
{
return "1";
}
int last = Convert.ToInt32(order.RefNo);
return (last + 1).ToString();
;
}
示例11: GetMissingSTVs
public static DataTable GetMissingSTVs(int userID)
{
var query = HCMIS.Repository.Queries.Order.SelectGetMissingSTVs();
Order order = new Order();
order.LoadFromRawSql(query);
return order.DataTable;
}