本文整理汇总了C#中Customers.Delete方法的典型用法代码示例。如果您正苦于以下问题:C# Customers.Delete方法的具体用法?C# Customers.Delete怎么用?C# Customers.Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customers
的用法示例。
在下文中一共展示了Customers.Delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadOrders
public static void LoadOrders() {
var _orders = new Orders();
var _items = new OrderItems();
var _customers = new Customers();
var _productions = new Productions();
dynamic _channels = new Channels();
var orderID = 1001;
var rand = new Random(100);
Console.WriteLine("Blowing away dev data");
_items.Delete();
_orders.Delete();
_customers.Delete();
for (int i = 0; i < 1000; i++) {
var month = rand.Next(1, 12);
var day = rand.Next(1, 28);
var orderDate = new DateTime(2011, month, day);
Console.WriteLine("Adding " + i + " of 1000");
var productID = 1;
var price = 12.00;
if (i > 250 && i < 500) {
productID = 2;
price = 15.00;
} else if (i >= 500 && i < 750) {
productID = 3;
price = 18.00;
} else if (i >= 750) {
productID = 4;
price = 10.00;
}
var p = _productions.Single(productID);
var c = _channels.Single(p.ChannelID);
var name = p.Title;
var sku = p.Slug;
var vendor = p.Author;
var orderType = "single";
//do a monthly every 5th one
if (i % 5 == 0) {
name = "Monthly Subscription";
sku = "monthly";
vendor = "Tekpub";
price = 30.00;
orderType = "subscription";
}
//do an annual every 12th
if (i % 12 == 0) {
name = "Annual Subscription";
sku = "yearly";
vendor = "Tekpub";
price = 279.00;
orderType = "subscription";
}
var tax = price * 0.0825;
var newOrder = new {
OrderNumber = Guid.NewGuid().ToString(),
ShopifyID = orderID,
ShopifyName = "#" + orderID,
CreatedAt = orderDate,
Subtotal = price,
Token = Guid.NewGuid().ToString(),
Total = price + tax,
TaxIncluded = true,
LandingPage = "http://localhost",
ShopifyNumber = orderID,
Gateway = "bogus",
FulfillmentStatus = "fulfilled",
Currency = "USD",
ClosedAt = orderDate,
AcceptsMarketing = false,
Tax = tax,
IP = "127.0.0.1",
Weight = 1,
Email = i + "@example.com",
};
dynamic savedOrder = _orders.Insert(newOrder);
//line items...
for (int x = 1; x < 3; x++) {
var newItem = new {
OrderID = savedOrder.ID,
Name = name,
Price = price,
Quantity = x,
RequiresShipping = false,
Title = name,
Grams = 2,
SKU = sku,
Vendor = vendor,
OrderType = orderType,
Channel = c.Name
};
_items.Insert(newItem);
//.........这里部分代码省略.........