本文整理汇总了C#中OrderInfo类的典型用法代码示例。如果您正苦于以下问题:C# OrderInfo类的具体用法?C# OrderInfo怎么用?C# OrderInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OrderInfo类属于命名空间,在下文中一共展示了OrderInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BasketValidationResults
public BasketValidationResults(OrderInfo order, IOrderService orderService)
{
_order = order;
_orderService = orderService;
}
示例2: ToOrderLine
public Domain.OrderLine ToOrderLine(OrderInfo orderInfo)
{
var productInfo = new ProductInfo();
productInfo.Id = OriginalProductId;
productInfo.ItemCount = Quantity;
productInfo.Title = Title;
productInfo.SKU = SKU;
productInfo.Tags = Tags ?? new string[0];
productInfo.Weight = Weight;
productInfo.Length = Length;
productInfo.Height = Height;
productInfo.Width = Width;
productInfo.OriginalPriceInCents = OriginalPrice;
productInfo.RangesString = RangesString;
productInfo.Vat = Vat;
productInfo.DiscountId = DiscountId;
productInfo.ProductVariants = ProductVariants ?? new List<ProductVariantInfo>();
productInfo.DiscountPercentage = DiscountPercentage;
productInfo.DiscountAmountInCents = DiscountAmount;
productInfo.DiscountExcludingVariants = ExcludingVariants;
productInfo.DocTypeAlias = DocTypeAlias;
return new Domain.OrderLine(productInfo, orderInfo) {OrderLineId = OrderLineId, _customData = _customData};
}
示例3: RequestTransactionStatus
private static Transaction.TransactionStatus RequestTransactionStatus(string transactionId, OrderInfo order)
{
try
{
var connector = new Connector();
// Override MerchantId loaded from configuration
//connector.MerchantId = "025152899";
var transaction = connector.RequestTransactionStatus(transactionId);
var acquirerId = transaction.AcquirerId;
var status = transaction.Status;
var consumerName = transaction.ConsumerName;
var fingerprint = transaction.Fingerprint;
var consumerIBAN = transaction.ConsumerIBAN;
var consumerBIC = transaction.ConsumerBIC;
var amount = transaction.Amount;
var currency = transaction.Currency;
var signatureString = ByteArrayToHexString(transaction.SignatureValue);
// Place newlines in Hex String
for (int i = 256; i > 0; i -= 32)
signatureString = signatureString.Substring(0, i) + "<br />" + signatureString.Substring(i);
var signatureValue = signatureString;
return status;
}
catch (IDealException ex)
{
Log.Instance.LogError("ING Advanced PaymentRequestHander: " + ex);
}
return Transaction.TransactionStatus.Failure;
}
示例4: OrdersInformationUpdateResponseMessage
/// <summary>
///
/// </summary>
public OrdersInformationUpdateResponseMessage(AccountInfo accountInfo,
OrderInfo[] orderInformations, ActiveOrder.UpdateTypeEnum[] ordersUpdates, bool operationResult)
: base(accountInfo, operationResult)
{
_ordersUpdates = ordersUpdates;
_orderInformations = orderInformations;
}
示例5: Update
public void Update(ShippingProviderMethod shippingProviderMethod, OrderInfo orderInfo)
{
if (orderInfo != null)
{
// your logic here, and set the price at the end like this:
Log.Instance.LogDebug("Hoeveelheid artikelen totaal: " +
orderInfo.OrderLines.Sum(x => x.ProductInfo.ItemCount));
Log.Instance.LogDebug("Hoeveel eerste artikel in mandje: " +
orderInfo.OrderLines.First().ProductInfo.ItemCount);
// CALCULATE SHIPPING PRICE
int priceInCents;
var itemCount = orderInfo.OrderLines.Sum(line => line.ProductInfo.ItemCount.GetValueOrDefault(1));
if (itemCount == 1)
priceInCents = 500;
else if (itemCount == 2)
priceInCents = 400;
else
priceInCents = 0;
shippingProviderMethod.PriceInCents = priceInCents;
shippingProviderMethod.PriceInCents = 500;
}
}
示例6: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
// Register the dialog script
ScriptHelper.RegisterClientScriptBlock(this, typeof(string), ScriptHelper.NEWWINDOW_SCRIPT_KEY, ScriptHelper.NewWindowScript);
lblInvoiceNumber.Text = GetString("order_invoice.lblInvoiceNumber");
btnGenerate.Text = GetString("order_invoice.btnGenerate");
btnPrintPreview.Text = GetString("order_invoice.btnPrintPreview");
if (QueryHelper.GetInteger("orderid", 0) != 0)
{
orderId = QueryHelper.GetInteger("orderid", 0);
}
order = OrderInfoProvider.GetOrderInfo(orderId);
if (order == null)
{
btnGenerate.Enabled = false;
btnPrintPreview.Enabled = false;
return;
}
else
{
// Check order site ID
CheckOrderSiteID(order.OrderSiteID);
}
ltlScript.Text = ScriptHelper.GetScript("function showPrintPreview() { NewWindow('Order_Edit_InvoicePrint.aspx?orderid=" + orderId + "', 'InvoicePrint', 650, 700);}");
if (!RequestHelper.IsPostBack())
{
txtInvoiceNumber.Text = order.OrderInvoiceNumber;
lblInvoice.Text = URLHelper.MakeLinksAbsolute(order.OrderInvoice);
}
}
示例7: updateButton_Click
// update order information
protected void updateButton_Click(object sender, EventArgs e)
{
// Store the new order details in an OrderInfo object
OrderInfo orderInfo = new OrderInfo();
string orderId = Request.QueryString["OrderID"];
orderInfo.OrderID = Int32.Parse(orderId);
orderInfo.DateCreated = dateCreatedTextBox.Text;
orderInfo.DateShipped = dateShippedTextBox.Text;
orderInfo.Verified = verifiedCheck.Checked;
orderInfo.Completed = completedCheck.Checked;
orderInfo.Canceled = canceledCheck.Checked;
orderInfo.Comments = commentsTextBox.Text;
orderInfo.CustomerName = customerNameTextBox.Text;
orderInfo.ShippingAddress = shippingAddressTextBox.Text;
orderInfo.CustomerEmail = customerEmailTextBox.Text;
// try to update the order
try
{
// Update the order
OrdersAccess.Update(orderInfo);
}
catch (Exception)
{
// In case of an error, we simply ignore it
}
// Exit edit mode
SetEditMode(false);
// Update the form
PopulateControls(orderId);
}
示例8: ConfirmPay
public static bool ConfirmPay(OrderInfo order)
{
ManagerHelper.CheckPrivilege(Privilege.CofimOrderPay);
bool flag = false;
if (order.CheckAction(OrderActions.SELLER_CONFIRM_PAY))
{
OrderDao dao = new OrderDao();
order.OrderStatus = OrderStatus.BuyerAlreadyPaid;
order.PayDate = new DateTime?(DateTime.Now);
flag = dao.UpdateOrder(order, null);
if (!flag)
{
return flag;
}
dao.UpdatePayOrderStock(order.OrderId);
foreach (LineItemInfo info in order.LineItems.Values)
{
ProductDao dao2 = new ProductDao();
ProductInfo productDetails = dao2.GetProductDetails(info.ProductId);
productDetails.SaleCounts += info.Quantity;
productDetails.ShowSaleCounts += info.Quantity;
dao2.UpdateProduct(productDetails, null);
}
UpdateUserAccount(order);
Messenger.OrderPayment(new MemberDao().GetMember(order.UserId), order.OrderId, order.GetTotal());
EventLogs.WriteOperationLog(Privilege.CofimOrderPay, string.Format(CultureInfo.InvariantCulture, "确认收款编号为\"{0}\"的订单", new object[] { order.OrderId }));
}
return flag;
}
示例9: GenerateOrderNumber
internal string GenerateOrderNumber(Store store, OrderInfo orderInfo, out int lastOrderReferenceNumber)
{
lastOrderReferenceNumber = 0;
var currentHighestOrderNumber = UwebshopConfiguration.Current.ShareBasketBetweenStores ? _orderRepository.GetHighestOrderNumber(ref lastOrderReferenceNumber) : _orderRepository.GetHighestOrderNumberForStore(store.Alias, ref lastOrderReferenceNumber);
Log.Instance.LogDebug("GenerateOrderNumber currentHighestOrderNumber: " + currentHighestOrderNumber + " lastOrderReferenceNumber: " + lastOrderReferenceNumber);
var orderNumberPrefix = store.OrderNumberPrefix;
if (lastOrderReferenceNumber <= 0)
{
if (!string.IsNullOrEmpty(currentHighestOrderNumber) && currentHighestOrderNumber.Length >= orderNumberPrefix.Length)
int.TryParse(currentHighestOrderNumber.Substring(orderNumberPrefix.Length, currentHighestOrderNumber.Length - orderNumberPrefix.Length), out lastOrderReferenceNumber);
else
int.TryParse(currentHighestOrderNumber, out lastOrderReferenceNumber);
}
lastOrderReferenceNumber++;
lastOrderReferenceNumber = Math.Max(lastOrderReferenceNumber, store.OrderNumberStartNumber);
orderInfo.StoreOrderReferenceId = lastOrderReferenceNumber;
Log.Instance.LogDebug("GenerateOrderNumber lastOrderReferenceNumber: " + lastOrderReferenceNumber);
return GenerateOrderNumber(store, orderInfo, lastOrderReferenceNumber, orderNumberPrefix);
}
示例10: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"]))
{
base.GotoResourceNotFound();
}
else
{
this.orderId = this.Page.Request.QueryString["OrderId"];
this.btnUpdateOrderAmount.Click += new EventHandler(this.btnUpdateOrderAmount_Click);
this.grdProducts.RowDeleting += new GridViewDeleteEventHandler(this.grdProducts_RowDeleting);
this.grdProducts.RowCommand += new GridViewCommandEventHandler(this.grdProducts_RowCommand);
this.order = OrderHelper.GetOrderInfo(this.orderId);
if (!this.Page.IsPostBack)
{
if (this.order == null)
{
base.GotoResourceNotFound();
}
else
{
this.BindProductList(this.order);
this.BindOtherAmount(this.order);
this.BindTatolAmount(this.order);
}
}
}
}
示例11: GenerateAndPersistOrderNumber
public void GenerateAndPersistOrderNumber(OrderInfo order)
{
using (var t = GetTransaction(order))
{
t.Generate();
t.Persist();
}
}
示例12: VerifyOrderTotalItemCount
public void VerifyOrderTotalItemCount()
{
var order = new OrderInfo();
order.OrderLines = new List<OrderLine> {new OrderLine(_product, order), new OrderLine(_product, order)};
_product.Order = order;
Assert.AreEqual(10, _variant.OrderTotalItemCount);
}
示例13: Setup
public void Setup()
{
IOC.IntegrationTest();
_orderInfo = DefaultFactoriesAndSharedFunctionality.CreateIncompleteOrderInfo(DefaultFactoriesAndSharedFunctionality.CreateProductInfo(1000, 1));
_orderDiscount = DefaultFactoriesAndSharedFunctionality.CreateDefaultOrderDiscountWithAmount(195, DiscountOrderCondition.None, 0);
}
示例14: BindUpdateSippingAddress
private void BindUpdateSippingAddress(OrderInfo order)
{
this.txtShipTo.Text = order.ShipTo;
this.dropRegions.SetSelectedRegionId(new int?(order.RegionId));
this.txtAddress.Text = order.Address;
this.txtZipcode.Text = order.ZipCode;
this.txtTelPhone.Text = order.TelPhone;
this.txtCellPhone.Text = order.CellPhone;
}
示例15: CreateOrder
private static OrderInfo CreateOrder(string countryCode)
{
var order = new OrderInfo();
var xElement = new XElement(CustomerDatatypes.Customer.ToString());
xElement.AddFirst(new XElement("customerCountry", new XCData("")));
order.CustomerInfo.customerInformation = new XDocument(xElement);
order.CustomerCountry = countryCode;
return order;
}