本文整理汇总了C#中Samba.Domain.Models.Tickets.Order.UpdateMenuItem方法的典型用法代码示例。如果您正苦于以下问题:C# Order.UpdateMenuItem方法的具体用法?C# Order.UpdateMenuItem怎么用?C# Order.UpdateMenuItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Samba.Domain.Models.Tickets.Order
的用法示例。
在下文中一共展示了Order.UpdateMenuItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddOrder
public Order AddOrder(AccountTransactionTemplate template, string userName, MenuItem menuItem, MenuItemPortion portion, string priceTag)
{
Locked = false;
var tif = new Order();
tif.UpdateMenuItem(userName, menuItem, portion, priceTag, 1);
tif.AccountTransactionTemplateId = template.Id;
if (AccountTransactions.AccountTransactions.SingleOrDefault(x => x.AccountTransactionTemplateId == template.Id) == null)
{
var transaction = AccountTransaction.Create(template);
transaction.UpdateAccounts(AccountTemplateId, AccountId);
AccountTransactions.AccountTransactions.Add(transaction);
}
if (tif.AccountTransactionTaxTemplateId > 0
&& AccountTransactions.AccountTransactions
.SingleOrDefault(x => x.AccountTransactionTemplateId == tif.AccountTransactionTaxTemplateId) == null)
{
var transaction = AccountTransaction.Create(menuItem.TaxTemplate.AccountTransactionTemplate);
transaction.UpdateAccounts(AccountTemplateId, AccountId);
AccountTransactions.AccountTransactions.Add(transaction);
}
Orders.Add(tif);
return tif;
}
示例2: AddOrder
public Order AddOrder(AccountTransactionType template, string userName, MenuItem menuItem, MenuItemPortion portion, string priceTag, ProductTimer timer)
{
Locked = false;
var order = new Order();
order.UpdateMenuItem(userName, menuItem, portion, priceTag, 1);
order.AccountTransactionTypeId = template.Id;
TransactionDocument.AddSingletonTransaction(template.Id, template, AccountTypeId, AccountId);
if (menuItem.TaxTemplate != null)
{
TransactionDocument.AddSingletonTransaction(order.TaxTempleteAccountTransactionTypeId,
menuItem.TaxTemplate.AccountTransactionType,
AccountTypeId, AccountId);
}
order.UpdateProductTimer(timer);
Orders.Add(order);
return order;
}
示例3: AddOrder
public Order AddOrder(AccountTransactionType template, Department department, string userName, MenuItem menuItem, IList<TaxTemplate> taxTemplates, MenuItemPortion portion, string priceTag, ProductTimer timer)
{
UnLock();
var order = new Order();
order.UpdateMenuItem(userName, menuItem, taxTemplates, portion, priceTag, 1);
order.AccountTransactionTypeId = template.Id;
order.WarehouseId = department.WarehouseId;
order.DepartmentId = department.Id;
TransactionDocument.AddSingletonTransaction(template.Id, template, GetTicketAccounts());
if (taxTemplates != null)
{
foreach (var taxTemplate in taxTemplates)
{
TransactionDocument.AddSingletonTransaction(taxTemplate.AccountTransactionType.Id,
taxTemplate.AccountTransactionType,
GetTicketAccounts());
}
}
order.UpdateProductTimer(timer);
Orders.Add(order);
return order;
}