本文整理汇总了C#中OrderInfo类的典型用法代码示例。如果您正苦于以下问题:C# OrderInfo类的具体用法?C# OrderInfo怎么用?C# OrderInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OrderInfo类属于命名空间,在下文中一共展示了OrderInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: BasketValidationResults
public BasketValidationResults(OrderInfo order, IOrderService orderService)
{
_order = order;
_orderService = orderService;
}
开发者ID:Chuhukon,项目名称:uWebshop-Releases,代码行数:7,代码来源:BasketValidationResults.cs
示例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};
}
开发者ID:Chuhukon,项目名称:uWebshop-Releases,代码行数:26,代码来源:OrderLine.cs
示例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;
}
开发者ID:uWebshop,项目名称:-INACTIVE-PaymentProviders,代码行数:35,代码来源:IngAdvancedPaymentResponseHandler.cs
示例4: OrdersInformationUpdateResponseMessage
/// <summary>
///
/// </summary>
public OrdersInformationUpdateResponseMessage(AccountInfo accountInfo,
OrderInfo[] orderInformations, ActiveOrder.UpdateTypeEnum[] ordersUpdates, bool operationResult)
: base(accountInfo, operationResult)
{
_ordersUpdates = ordersUpdates;
_orderInformations = orderInformations;
}
开发者ID:redrhino,项目名称:DotNetConnectTerminal,代码行数:10,代码来源:OrdersInformationUpdateResponseMessage.cs
示例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;
}
}
开发者ID:uWebshop,项目名称:-INACTIVE-ShippingProviders,代码行数:26,代码来源:ShippingExample.cs
示例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);
}
}
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:35,代码来源:Order_Edit_Invoice.aspx.cs
示例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);
}
开发者ID:altras,项目名称:fmi_projects,代码行数:31,代码来源:AdminOrderDetails.aspx.cs
示例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;
}
开发者ID:ZhangVic,项目名称:asp1110git,代码行数:29,代码来源:OrderHelper.cs
示例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);
}
开发者ID:Chuhukon,项目名称:uWebshop-Releases,代码行数:25,代码来源:OrderNumberService.cs
示例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);
}
}
}
}
开发者ID:ZhangVic,项目名称:asp1110git,代码行数:28,代码来源:EditOrder.cs
示例11: GenerateAndPersistOrderNumber
public void GenerateAndPersistOrderNumber(OrderInfo order)
{
using (var t = GetTransaction(order))
{
t.Generate();
t.Persist();
}
}
开发者ID:Chuhukon,项目名称:uWebshop-Releases,代码行数:8,代码来源:OrderNumberService.cs
示例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);
}
开发者ID:Chuhukon,项目名称:uWebshop-Releases,代码行数:8,代码来源:RangedPriceInCentsTests.cs
示例13: Setup
public void Setup()
{
IOC.IntegrationTest();
_orderInfo = DefaultFactoriesAndSharedFunctionality.CreateIncompleteOrderInfo(DefaultFactoriesAndSharedFunctionality.CreateProductInfo(1000, 1));
_orderDiscount = DefaultFactoriesAndSharedFunctionality.CreateDefaultOrderDiscountWithAmount(195, DiscountOrderCondition.None, 0);
}
开发者ID:Chuhukon,项目名称:uWebshop-Releases,代码行数:8,代码来源:CombinationsOfConditionsAndEffectsTest.cs
示例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;
}
开发者ID:ZhangVic,项目名称:asp1110git,代码行数:9,代码来源:ShippAddress.cs
示例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;
}
开发者ID:Chuhukon,项目名称:uWebshop-Releases,代码行数:9,代码来源:VatNumberCorrectionLogicTests.cs
示例16: HandlePaymentResponse
public OrderInfo HandlePaymentResponse(PaymentProvider paymentProvider, OrderInfo orderInfo)
{
var orderId = HttpContext.Current.Request.QueryString["orderid"] ?? "";
if (paymentProvider == null || string.IsNullOrEmpty(orderId))
{
return null;
}
orderInfo = OrderHelper.GetOrder(orderId);
if (orderInfo != null)
{
var localizedPaymentProvider = PaymentProvider.GetPaymentProvider(orderInfo.PaymentInfo.Id, orderInfo.StoreInfo.Alias);
var secret = paymentProvider.GetSetting("secret");
var amount = HttpContext.Current.Request.QueryString["amount"] ?? "0";
var validated = true;
if (secret != string.Empty)
{
var sb = new StringBuilder();
foreach (var key in HttpContext.Current.Request.QueryString.AllKeys)
{
if (key != "hash")
{
sb.Append(HttpContext.Current.Request.QueryString[key]);
}
}
var calculated = ePayPaymentBase.MD5(sb.ToString() + secret).ToUpperInvariant();
var incoming = (HttpContext.Current.Request.QueryString["hash"] ?? "").ToUpperInvariant();
validated = calculated == incoming;
if (!validated)
{
//checksum error
Log.Instance.LogError("Payment provider (ePay) error : Orderid " + orderId + " - incoming hash " + incoming + " - calculated hash " + calculated);
}
}
if (validated && (amount == orderInfo.ChargedAmountInCents.ToString()))
{
orderInfo.Paid = true;
orderInfo.Status = OrderStatus.ReadyForDispatch;
orderInfo.Save();
}
else
{
orderInfo.Paid = false;
orderInfo.Status = OrderStatus.PaymentFailed;
orderInfo.Save();
if (validated)
{
//checksum already logged, must be problem with amount
Log.Instance.LogError("Payment provider (ePay) error : Orderid " + orderId + " - incoming amount " + amount.ToString() + " - order amount " + orderInfo.ChargedAmountInCents.ToString());
}
}
}
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Write("OK");
HttpContext.Current.Response.Flush();
return orderInfo;
}
开发者ID:AstroMalte,项目名称:PaymentProviders,代码行数:56,代码来源:ePayPaymentResponseHandler.cs
示例17: Setup
public void Setup()
{
IOC.UnitTest();
_stockServiceMock = IOC.StockService.SetupNewMock();
var productInfo = DefaultFactoriesAndSharedFunctionality.CreateProductInfo(12990, 1);
productInfo.Id = TestProductService.ProductId1;
_order = DefaultFactoriesAndSharedFunctionality.CreateIncompleteOrderInfo(productInfo);
_order.StoreInfo.Alias = StoreHelper.GetCurrentStore().Alias;
}
开发者ID:Chuhukon,项目名称:uWebshop-Releases,代码行数:10,代码来源:StatusAndStock.cs
示例18: Setup
public void Setup()
{
IOC.UnitTest();
_discountCalculationService = IOC.DiscountCalculationService.Actual().Resolve();
_product = DefaultFactoriesAndSharedFunctionality.CreateProductInfo(1000, 1);
_product.Tags = new [] { "schoen" };
_order = DefaultFactoriesAndSharedFunctionality.CreateIncompleteOrderInfo(_product);
}
开发者ID:Chuhukon,项目名称:uWebshop-Releases,代码行数:10,代码来源:AffectedTagsTests.cs
示例19: SendOrderCancelled
public void SendOrderCancelled(OrderInfo order)
{
var builder = new StringBuilder();
builder.Append("Your Event #");
builder.Append(order._id);
builder.Append(" was cancelled.");
builder.Append(" The amount of $");
builder.Append(order._currentAmmount);
builder.Append(" will be refunded.");
smsAgent.sendSMS(order._customerPhoneNumber, builder.ToString());
}
开发者ID:megadude000,项目名称:ipz,代码行数:11,代码来源:SmsComposer.cs
示例20: ShipOrder
public void ShipOrder(OrderInfo orderInfo, Order order)
{
var reciever = OrderRepository.GetOrderReciever(orderInfo);
if (reciever.Id != orderInfo.Customer.Id)
{
orderInfo.Customer = reciever;
}
_shippingService.SendOrder(orderInfo.Customer, order).Wait();
}
开发者ID:OmerRaviv,项目名称:OzCodeDemo,代码行数:11,代码来源:OrderProcessing.cs
注:本文中的OrderInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论