当前位置: 首页>>代码示例>>C#>>正文


C# Tickets.Order类代码示例

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


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

示例1: GroupedOrderTagViewModel

 public GroupedOrderTagViewModel(Order selectedItem, IGrouping<string, OrderTagGroup> orderTagGroups)
 {
     Name = orderTagGroups.Key;
     OrderTags = orderTagGroups.Select(x => new GroupedOrderTagButtonViewModel(selectedItem, x)).ToList();
     ColumnCount = orderTagGroups.First().ColumnCount;
     ButtonHeight = orderTagGroups.First().ButtonHeight;
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:7,代码来源:GroupedOrderTagViewModel.cs

示例2: OrderViewModel

 public OrderViewModel(Order model)
 {
     _model = model;
     ResetSelectedQuantity();
     ItemSelectedCommand = new DelegateCommand<OrderViewModel>(OnItemSelected);
     UpdateItemColor();
 }
开发者ID:hperassi,项目名称:SambaPOS-3,代码行数:7,代码来源:OrderViewModel.cs

示例3: OrderViewModel

 public OrderViewModel(Order model, IAutomationService automationService)
 {
     _model = model;
     _automationService = automationService;
     ResetSelectedQuantity();
     ItemSelectedCommand = new DelegateCommand<OrderViewModel>(OnItemSelected);
     UpdateItemColor();
 }
开发者ID:yemreguney,项目名称:SambaPOS-3,代码行数:8,代码来源:OrderViewModel.cs

示例4: OrderStatesEqual

 private static bool OrderStatesEqual(Order order1, Order order2)
 {
     var order1OrderStateValues = order1.GetOrderStateValues().ToList();
     var order2OrderStateValues = order2.GetOrderStateValues().ToList();
     if (!order1OrderStateValues.Any() && !order2OrderStateValues.Any()) return true;
     if (order1OrderStateValues.Count() != order2OrderStateValues.Count()) return false;
     return order1OrderStateValues.All(ps => order2OrderStateValues.Any(cs => cs.Equals(ps)));
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:8,代码来源:OrderMerger.cs

示例5: OrderViewModel

 public OrderViewModel(Order model, TicketTemplate ticketTemplate, IAutomationService ruleService)
 {
     _model = model;
     _ticketTemplate = ticketTemplate;
     _automationService = ruleService;
     ResetSelectedQuantity();
     ItemSelectedCommand = new DelegateCommand<OrderViewModel>(OnItemSelected);
     UpdateItemColor();
 }
开发者ID:betology,项目名称:SambaPOS-3,代码行数:9,代码来源:OrderViewModel.cs

示例6: GetPrice

 private static decimal GetPrice(Order order, decimal serviceAmount, decimal sum, decimal exchangeRate, bool taxIncluded)
 {
     var result = order.GetPrice();
     var tax = taxIncluded ? 0 : order.GetTaxAmount(false, sum, serviceAmount);
     if (serviceAmount != 0 && sum != 0) result += (result * serviceAmount) / sum;
     result += tax;
     result = result / exchangeRate;
     return result;
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:9,代码来源:OrderSelector.cs

示例7: OrderViewModel

 public OrderViewModel(Order model, ICacheService cacheService, IApplicationState applicationState)
 {
     _model = model;
     _cacheService = cacheService;
     _applicationState = applicationState;
     ResetSelectedQuantity();
     ItemSelectedCommand = new DelegateCommand<OrderViewModel>(OnItemSelected);
     UpdateItemColor();
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:9,代码来源:OrderViewModel.cs

示例8: Update

 public void Update(Order order)
 {
     StopTimer = false;
     SelectedOrder = order;
     RaisePropertyChanged(() => Start);
     RaisePropertyChanged(() => End);
     RaisePropertyChanged(() => Duration);
     RaisePropertyChanged(() => Price);
     RaisePropertyChanged(() => Value);
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:10,代码来源:ProductTimerEditorViewModel.cs

示例9: UpdateSelector

 private void UpdateSelector(Order order, decimal serviceAmount, decimal sum, bool taxIncluded)
 {
     var selector = Selectors.FirstOrDefault(x => x.Key == GetKey(order));
     if (selector == null)
     {
         selector = new Selector { Key = GetKey(order), Description = order.MenuItemName + order.GetPortionDesc() };
         Selectors.Add(selector);
     }
     selector.Quantity += order.Quantity;
     selector.Price = GetPrice(order, serviceAmount, sum, ExchangeRate, taxIncluded);
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:11,代码来源:OrderSelector.cs

示例10: CanMergeOrders

 public static bool CanMergeOrders(Order order1, Order order2)
 {
     if (order1.Quantity != order2.Quantity) return false;
     if (order1.Price != order2.Price) return false;
     if (order1.MenuItemId != order2.MenuItemId) return false;
     if (order1.PortionName != order2.PortionName) return false;
     if (order1.CalculatePrice != order2.CalculatePrice) return false;
     if (order1.IncreaseInventory != order2.IncreaseInventory) return false;
     if (order1.DecreaseInventory != order2.DecreaseInventory) return false;
     if (order1.OrderTagValues.Count > 0 || order2.OrderTagValues.Count > 0) return false;
     if (!OrderStatesEqual(order1, order2)) return false;
     return true;
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:13,代码来源:OrderMerger.cs

示例11: CalculateOrderTotal

 public static decimal CalculateOrderTotal(Ticket ticket, Order order)
 {
     var discount = ticket.GetPreTaxServicesTotal();
     if (discount != 0)
     {
         var tsum = ticket.GetPlainSum();
         var rate = tsum > 0 ? (discount * 100) / tsum : 100;
         var tiTotal = order.GetTotal();
         var itemDiscount = (tiTotal * rate) / 100;
         return tiTotal + itemDiscount;
     }
     return order.GetTotal();
 }
开发者ID:betology,项目名称:SambaPOS-3,代码行数:13,代码来源:MenuGroupBuilder.cs

示例12: ExecuteAutomationCommand

        private void ExecuteAutomationCommand(Ticket selectedTicket, Order order, string automationCommand, string automationCommandValue)
        {
            if (string.IsNullOrEmpty(automationCommand)) return;

            if (string.IsNullOrEmpty(automationCommandValue))
            {
                var ac = _cacheService.GetAutomationCommandByName(automationCommand);
                if (ac != null)
                {
                    if (!string.IsNullOrEmpty(ac.Values))
                    {
                        ac.PublishEvent(EventTopicNames.SelectAutomationCommandValue);
                        return;
                    }
                }
            }

            _applicationState.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new
            {
                Ticket = selectedTicket,
                Order = order,
                AutomationCommandName = automationCommand,
                Value = automationCommandValue ?? ""
            });
        }
开发者ID:khriza,项目名称:SambaPOS-3,代码行数:25,代码来源:TicketOrdersViewModel.cs

示例13: Add

 private OrderViewModel Add(Order ti)
 {
     var result = new OrderViewModel(ti);
     Orders.Add(result);
     return result;
 }
开发者ID:khriza,项目名称:SambaPOS-3,代码行数:6,代码来源:TicketOrdersViewModel.cs

示例14: RemoveOrder

 public void RemoveOrder(Order order)
 {
     var transactionId = order.AccountTransactionTypeId;
     Orders.Remove(order);
     if (Orders.All(x => x.AccountTransactionTypeId != transactionId))
     {
         TransactionDocument.AccountTransactions.Where(x => x.AccountTransactionTypeId == transactionId)
                .ToList().ForEach(x => TransactionDocument.AccountTransactions.Remove(x));
     }
 }
开发者ID:Spanky81,项目名称:SambaPOS-3,代码行数:10,代码来源:Ticket.cs

示例15: CloneOrder

 public Order CloneOrder(Order item)
 {
     Debug.Assert(_orders.Contains(item));
     var result = ObjectCloner.Clone(item);
     result.CreatedDateTime = DateTime.Now;
     result.Quantity = 0;
     _orders.Add(result);
     return result;
 }
开发者ID:Spanky81,项目名称:SambaPOS-3,代码行数:9,代码来源:Ticket.cs


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