Exemple #1
0
        public ModifierGroupDto Clone(ProductDto productVm)
        {
            var res = new ModifierGroupDto();

            res.ID = ID;
            res.IncludeQuantity  = IncludeQuantity;
            res.IsAutoSel        = IsAutoSel;
            res.IsForceSel       = IsForceSel;
            res.IsPromptSel      = IsPromptSel;
            res.IsSeen           = IsSeen;
            res.IsSingleSel      = IsSingleSel;
            res.MaximumSelection = MaximumSelection;
            res.MinimumSelection = MinimumSelection;
            res.ModifiersList    = ModifiersList.Select(s => s.Clone(res)).ToList();
            res.Name             = Name;
            res.ParentModifier   = ParentModifier;
            res.Product          = productVm;
            res.Selected         = Selected;
            res.SelectionCount   = SelectionCount;
            return(res);
        }
Exemple #2
0
 public ModifierDto Clone(ModifierGroupDto modifierGroupVm)
 {
     return(new ModifierDto
     {
         Code = Code,
         DisplayName = DisplayName,
         DisplayOrder = DisplayOrder,
         ID = ID,
         LinkedProductID = LinkedProductID,
         MaxQty = MaxQty,
         MinQty = MinQty,
         ModifierGroup = modifierGroupVm,
         ModifierGroupId = int.Parse(modifierGroupVm.ID),
         Name = Name,
         OldState = OldState,
         PhotoUrl = PhotoUrl,
         Price = Price,
         SubModifiers = SubModifiers.Select(s => s.Clone(s.Product)).ToList(),
         Status = Status,
         TaxRate = TaxRate
     });
 }