private void OnAddPropertyExecuted(string obj)
        {
            var orderTag = MenuItem.AddDefaultMenuItemProperty(Model);

            orderTag.SortOrder = OrderTags.Any() ? OrderTags.Max(x => x.Model.SortOrder) + 1 : 0;
            OrderTags.Add(new OrderTagViewModel(orderTag, _menuService));
        }
Ejemplo n.º 2
0
        public IEnumerable <MenuItemProperty> BatchCreateMenuProperties(string[] values, MenuItemPropertyGroup item)
        {
            IList <MenuItemProperty> result = new List <MenuItemProperty>();
            var ds = CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator;

            if (values.Length > 0)
            {
                foreach (var propertyLine in values)
                {
                    var tokens = propertyLine.Split('|');
                    var price  = ConvertToDecimal("0.00", ds);
                    var name   = tokens[0];
                    if (tokens.Count() > 1)
                    {
                        price = ConvertToDecimal(tokens[1], ds);
                    }
                    result.Add(MenuItem.AddDefaultMenuItemProperty(item, name, price));
                }
            }
            return(result);
        }
Ejemplo n.º 3
0
 private void OnAddPropertyExecuted(string obj)
 {
     OrderTags.Add(new OrderTagViewModel(MenuItem.AddDefaultMenuItemProperty(Model), _menuService));
 }
Ejemplo n.º 4
0
 private void OnAddPropertyExecuted(string obj)
 {
     Properties.Add(new MenuItemPropertyViewModel(MenuItem.AddDefaultMenuItemProperty(Model)));
 }