本文整理汇总了C#中Cart.GetByPayment方法的典型用法代码示例。如果您正苦于以下问题:C# Cart.GetByPayment方法的具体用法?C# Cart.GetByPayment怎么用?C# Cart.GetByPayment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cart
的用法示例。
在下文中一共展示了Cart.GetByPayment方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChangeStatus
public string ChangeStatus(int id = 0, int statusID = 0) {
Profile p = ViewBag.profile;
Cart order = new Cart();
order = order.GetByPayment(id);
order.SetStatus(statusID, p.first + " " + p.last);
return "success";
}
示例2: Items
public ActionResult Items(int id = 0) {
try {
Cart order = new Cart();
order = order.GetByPayment(id);
Customer customer = new Customer{ ID = order.cust_id };
customer.Get();
ViewBag.customer = customer;
ViewBag.order = order;
ViewBag.statuses = new OrderStatus().GetAll();
} catch (Exception) {
return RedirectToAction("Index");
}
return View();
}
示例3: GetHistory
public string GetHistory(int id = 0) {
Profile profile = ViewBag.profile ?? new Profile();
TimeZoneInfo tz = TimeZoneInfo.FindSystemTimeZoneById(profile.timezone ?? "UTC");
Cart order = new Cart();
order = order.GetByPayment(id);
List<OrderHistoryJSON> histories = new List<OrderHistoryJSON>();
foreach (OrderHistory history in order.OrderHistories) {
OrderHistoryJSON jhist = new OrderHistoryJSON {
ID = history.ID,
statusID = history.statusID,
orderID = history.orderID,
dateAdded = history.dateAdded,
added = String.Format("{0:M/d/yyyy} {0:h:mm tt}", TimeZoneInfo.ConvertTimeFromUtc(history.dateAdded, tz)),
changedBy = history.changedBy,
OrderStatus = history.OrderStatus
};
histories.Add(jhist);
}
return JsonConvert.SerializeObject(histories);
}
示例4: Void
public ActionResult Void(int id = 0)
{
Cart order = new Cart();
order = order.GetByPayment(id);
order.Void();
return RedirectToAction("Items", new { id = id });
}
示例5: AddShipment
public string AddShipment(int id, string trackingnum) {
Cart order = new Cart();
order = order.GetByPayment(id);
Shipment shipment = order.AddShipment(trackingnum);
string trackingcodes = order.Shipments.Select(x => x.tracking_number).Aggregate((i, j) => i + "," + j);
return trackingcodes;
}
示例6: SendShippingNotification
public string SendShippingNotification(int id = 0) {
Cart order = new Cart();
order = order.GetByPayment(id);
order.SendShippingNotification();
return "";
}
示例7: Void
public ActionResult Void(int id = 0) {
Profile p = ViewBag.profile;
Cart order = new Cart();
order = order.GetByPayment(id);
order.Void(p.first + " " + p.last);
return RedirectToAction("Items", new { id = id });
}
示例8: RegeneratePO
public ActionResult RegeneratePO(int id = 0) {
Settings settings = new Settings();
if (settings.Get("EDIOrderProcessing") == "true") {
EDI edi = new EDI();
Cart order = new Cart();
order = order.GetByPayment(id);
edi.CreatePurchaseOrder(order.ID);
}
return RedirectToAction("Items", new { id = id });
}
示例9: ClearShipments
public string ClearShipments(int id) {
Cart order = new Cart();
order = order.GetByPayment(id);
bool success = order.ClearShipments();
return JsonConvert.SerializeObject(success);
}