• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# OrderStatus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中OrderStatus的典型用法代码示例。如果您正苦于以下问题:C# OrderStatus类的具体用法?C# OrderStatus怎么用?C# OrderStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OrderStatus类属于命名空间,在下文中一共展示了OrderStatus类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Confirm

        public void Confirm()
        {
            if (Status != OrderStatus.Draft)
                throw new InvalidOperationException("Only draft orders can be confirmed.");

            Status = OrderStatus.Confirmed;
        }
开发者ID:trgutteridge,项目名称:TDDIntro,代码行数:7,代码来源:Order.cs


示例2: FlagAsShipped

        internal void FlagAsShipped()
        {
            if (Status != OrderStatus.ReadyToShip)
                throw new InvalidOperationException("Only confirmed orders can be shipped.");

            Status = OrderStatus.ReadyToShip;
        }
开发者ID:christensena,项目名称:TDDIntro,代码行数:7,代码来源:Order.cs


示例3: Shipped

        public void Shipped()
        {
            if (Status != OrderStatus.Confirmed)
                throw new InvalidOperationException("Order not confirmed!");

            Status = OrderStatus.Confirmed;
        }
开发者ID:trgutteridge,项目名称:TDDIntro,代码行数:7,代码来源:Order.cs


示例4: AddOrderHistory

 public void AddOrderHistory(int id, string ticker, decimal price, decimal volume, OrderType type, int period, int tick, OrderStatus status)
 {
     this.EnqueueCallback(delegate
     {
         StateManager.AddArchiveOrder(id, ticker, price, volume, type, period, tick, status);
     });
 }
开发者ID:jinpan,项目名称:Traders_IAP,代码行数:7,代码来源:ClientCallbackService.cs


示例5: ChangeOrderStatus

 public void ChangeOrderStatus(int orderId, OrderStatus newStatus)
 {
     OrderDB orderDB = new OrderDB();
     Order order = orderDB.GetById(orderId);
     order.StatusID = newStatus;
     order.Update();
 }
开发者ID:commentatorboy,项目名称:PizzaWaiter,代码行数:7,代码来源:PizzaWaiterTestService.cs


示例6: CompleteOrder

 public void CompleteOrder(Guid id)
 {
     if (OrderStatus.SameValueAs(OrderStatus.InProgress) || OrderStatus.SameValueAs(OrderStatus.Completed))
         OrderStatus = OrderStatus.Completed;
     else
         throw new InvalidOperationException("This order has been canceled and can not be completed.");
 }
开发者ID:jstuparitz,项目名称:CoffeeShop,代码行数:7,代码来源:Order.cs


示例7: Record

 private void Record(string notificationType, string code, OrderStatus status)
 {
     using (var writer = new StreamWriter(new FileStream(Configuration.OrderLog, FileMode.Append)))
     {
         writer.WriteLine("{0}: {1} {2}", notificationType, code, status);
     }
 }
开发者ID:matthewcanty,项目名称:worldpay-lib-dotnet,代码行数:7,代码来源:Webhook.aspx.cs


示例8: Order

 public Order(int id, string customerid, int employeeid, DateTime orderdate, DateTime requireddate, 
     DateTime shippeddate, int shipvia, double freight, string shipname, string shipaddress, string shipcity, 
     string shiparegion, string shippostalcode, string shipcountry, List<OrderDetails> details)
 {
     ID = id;
     CustomerID = customerid;
     EmployeeID = employeeid;
     OrderDate = orderdate;
     RequiredDate = requireddate;
     ShippedDate = shippeddate;
     ShipVia = shipvia;
     Freight = freight;
     ShipName = shipname;
     ShipAddress = shipaddress;
     ShipCity = shipcity;
     ShipRegion = shiparegion;
     ShipPostalCode = shippostalcode;
     ShipCountry = shipcountry;
     Details = details;
     if (orderdate.Equals(DateTime.MinValue))
         Status = OrderStatus.NEW;
     else if (ShippedDate.Equals(DateTime.MinValue))
         Status = OrderStatus.NOTSHIPPED;
     else
         Status = OrderStatus.SHIPPED;
 }
开发者ID:PozdeyevArtyom,项目名称:megarepository,代码行数:26,代码来源:Order.cs


示例9: EmitCancelReject

 protected void EmitCancelReject(
     Order order,
     OrderStatus status,
     string message
     )
 {
 }
开发者ID:wukan1986,项目名称:StingrayOQ,代码行数:7,代码来源:Mock.UserProvider.cs


示例10: OrderDetailsReceivedImpl

		public OrderDetailsReceivedImpl(string customerId, string orderId, DateTime created, OrderStatus status)
		{
			CustomerId = customerId;
			OrderId = orderId;
			Created = created;
			Status = status;
		}
开发者ID:KevM,项目名称:MassTransit,代码行数:7,代码来源:Bootstrapper.cs


示例11: GetOrderStatusStr

 public string GetOrderStatusStr(OrderStatus orderStatus)
 {
     switch (orderStatus)
     {
         case OrderStatus.ChuShou:
             {
                 return "出售中";
             }
         case OrderStatus.ShenHe:
             {
                 return "审核中";
             }
         case OrderStatus.GongShi:
             {
                 return "公示";
             }
         case OrderStatus.NotComplete:
             {
                 return "订单未完成";
             }
         case OrderStatus.ShenHeFail:
         {
             return "审核失败";
         }
         default:
             {
                 return "未知状态";
             }
     }
 }
开发者ID:Zeiy,项目名称:LocalWorkSpace,代码行数:30,代码来源:OrderDetail.aspx.cs


示例12: Order

 public Order(Guid userId, ICollection<OrderItem> items, NpDepartment npDepartment, OrderStatus status)
 {
     UserId = userId;
     OrderItems = items;
     NpDepartment = npDepartment;
     Status = status;
 }
开发者ID:gloomycellar,项目名称:OriginalShirts,代码行数:7,代码来源:Order.cs


示例13: FlagAsReadyToShip

        internal void FlagAsReadyToShip()
        {
            if (Status != OrderStatus.Draft)
                throw new InvalidOperationException("Only draft orders can be confirmed.");

            Status = OrderStatus.ReadyToShip;
        }
开发者ID:christensena,项目名称:TDDIntro,代码行数:7,代码来源:Order.cs


示例14: OrderStatusFilter

        public OrderStatusFilter(OrderStatus orderStatus)
        {
            switch (orderStatus)
            {
                case OrderStatus.Pending:
                    this.value = "pending";
                    break;

                case OrderStatus.Processing:
                    this.value = "processing";
                    break;

                case OrderStatus.OnHold:
                    this.value = "on-hold";
                    break;

                case OrderStatus.Completed:
                    this.value = "completed";
                    break;

                case OrderStatus.Cancelled:
                    this.value = "cancelled";
                    break;

                case OrderStatus.Refunded:
                    this.value = "refunded";
                    break;

                case OrderStatus.Failed:
                    this.value = "failed";
                    break;
            }
        }
开发者ID:iroken22,项目名称:WoocommerceSharp,代码行数:33,代码来源:OrderStatusFilter.cs


示例15: GetBestCustomersReport

        /// <summary>
        /// Get best customers
        /// </summary>
        /// <param name="createdFromUtc">Order created date from (UTC); null to load all records</param>
        /// <param name="createdToUtc">Order created date to (UTC); null to load all records</param>
        /// <param name="os">Order status; null to load all records</param>
        /// <param name="ps">Order payment status; null to load all records</param>
        /// <param name="ss">Order shipment status; null to load all records</param>
        /// <param name="orderBy">1 - order by order total, 2 - order by number of orders</param>
        /// <param name="pageIndex">Page index</param>
        /// <param name="pageSize">Page size</param>
        /// <returns>Report</returns>
        public virtual IPagedList<BestCustomerReportLine> GetBestCustomersReport(DateTime? createdFromUtc,
            DateTime? createdToUtc, OrderStatus? os, PaymentStatus? ps, ShippingStatus? ss, int orderBy,
            int pageIndex = 0, int pageSize = 214748364)
        {
            int? orderStatusId = null;
            if (os.HasValue)
                orderStatusId = (int)os.Value;

            int? paymentStatusId = null;
            if (ps.HasValue)
                paymentStatusId = (int)ps.Value;

            int? shippingStatusId = null;
            if (ss.HasValue)
                shippingStatusId = (int)ss.Value;
            var query1 = from c in _customerRepository.Table
                         join o in _orderRepository.Table on c.Id equals o.CustomerId
                         where (!createdFromUtc.HasValue || createdFromUtc.Value <= o.CreatedOnUtc) &&
                         (!createdToUtc.HasValue || createdToUtc.Value >= o.CreatedOnUtc) &&
                         (!orderStatusId.HasValue || orderStatusId == o.OrderStatusId) &&
                         (!paymentStatusId.HasValue || paymentStatusId == o.PaymentStatusId) &&
                         (!shippingStatusId.HasValue || shippingStatusId == o.ShippingStatusId) &&
                         (!o.Deleted) &&
                         (!c.Deleted)
                         select new { c, o };

            var query2 = from co in query1
                         group co by co.c.Id into g
                         select new
                         {
                             CustomerId = g.Key,
                             OrderTotal = g.Sum(x => x.o.OrderTotal),
                             OrderCount = g.Count()
                         };
            switch (orderBy)
            {
                case 1:
                    {
                        query2 = query2.OrderByDescending(x => x.OrderTotal);
                    }
                    break;
                case 2:
                    {
                        query2 = query2.OrderByDescending(x => x.OrderCount);
                    }
                    break;
                default:
                    throw new ArgumentException("Wrong orderBy parameter", "orderBy");
            }

            var tmp = new PagedList<dynamic>(query2, pageIndex, pageSize);
            return new PagedList<BestCustomerReportLine>(tmp.Select(x => new BestCustomerReportLine
                {
                    CustomerId = x.CustomerId,
                    OrderTotal = x.OrderTotal,
                    OrderCount = x.OrderCount
                }),
                tmp.PageIndex, tmp.PageSize, tmp.TotalCount);
        }
开发者ID:nvolpe,项目名称:raver,代码行数:71,代码来源:CustomerReportService.cs


示例16: SetStatus

        public void SetStatus(int id, OrderStatus status)
        {
            var order = Find(id);
            order.Status = status;
            db.SaveChanges();

            // TODO: Send emails
        }
开发者ID:alin-rautoiu,项目名称:Cart42,代码行数:8,代码来源:OrderService.cs


示例17: BtnCreate_Click

 protected void BtnCreate_Click( object sender, EventArgs e )
 {
     if ( Page.IsValid ) {
     OrderStatus orderStatus = new OrderStatus( StoreId, TxtName.Text );
     orderStatus.Save();
     base.Redirect( WebUtils.GetPageUrl( Constants.Pages.EditOrderStatus ) + "?id=" + orderStatus.Id + "&storeId=" + orderStatus.StoreId );
       }
 }
开发者ID:uniquelau,项目名称:Tea-Commerce-for-Umbraco,代码行数:8,代码来源:CreateOrderStatus.ascx.cs


示例18: MTDohOrcView

 public MTDohOrcView(string externalOrderId, YellowstonePathology.Business.Domain.Physician orderingPhysician, string reportNo, OrderStatus orderStatus, string systemInitiatingOrder)
 {
     this.m_ExternalOrderId = externalOrderId;
     this.m_OrderingPhysician = orderingPhysician;
     this.m_ReportNo = reportNo;
     this.m_OrderStatus = orderStatus;
     this.m_SystemInitiatingOrder = systemInitiatingOrder;
 }
开发者ID:WilliamCopland,项目名称:YPILIS,代码行数:8,代码来源:MTDohOrcView.cs


示例19: AddFireTrigger

 /// <summary>
 /// Voegt meegegeven orderstatus toe aan triggerlijst.
 /// </summary>
 /// <param name="os">Orderstatus</param>
 public void AddFireTrigger(OrderStatus os)
 {
     if (this._fireTriggers == null)
     {
         this._fireTriggers = new List<OrderStatus>();
     }
     this._fireTriggers.Add(os);
 }
开发者ID:kajnelissen,项目名称:Sedat,代码行数:12,代码来源:IPipe.cs


示例20: WithStatus

 public OrderListSearchCriteria WithStatus(OrderStatus status)
 {
     OrderListSearchCriteria another = this.Clone<OrderListSearchCriteria>();
     another.Status = status;
     // need to reset page index
     another.PageIndex = 1;
     return another;
 }
开发者ID:kilonet,项目名称:elfam,代码行数:8,代码来源:OrderListSearchCriteria.cs



注:本文中的OrderStatus类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# OrderType类代码示例发布时间:2022-05-24
下一篇:
C# OrderSide类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap