Esempio n. 1
0
        public List <string> NamesOfMaterials(FrameShopModel frameShop)
        {
            var NamesOfMaterials = new List <string>();

            foreach (MaterialModel material in frameShop.Materials)
            {
                NamesOfMaterials.Add(material.Name);
            }
            return(NamesOfMaterials);
        }
Esempio n. 2
0
        public void FrameShopFill(MaterialModel material, FrameShopModel frameShop)
        {
            if (material != null)
            {
                frameShop.Materials.Add(material);
            }
            var newFrameShop = _mapper.Map <FrameShop>(frameShop);

            _unitOfWork.FrameShopRepository.Add(newFrameShop);
            _unitOfWork.Save();
        }
Esempio n. 3
0
        public void CreateFrame(FrameShopModel frameShop, MainViewModel mv, FrameModel frame)
        {
            foreach (MaterialModel material in frameShop.Materials)
            {
                foreach (MainViewModel.CheckedListItem <string> item in mv.CustomCheckBox)
                {
                    if (material.Name == item.Item & item.IsChecked == true)
                    {
                        frame.Materials.Add(material);
                        FinalAmount(material, frame, mv);
                    }
                }
            }
            var newFrame = _mapper.Map <Frame>(frame);

            _unitOfWork.FrameRepository.Add(newFrame);
            _unitOfWork.Save();
        }
Esempio n. 4
0
 public List <MaterialModel> GetMaterials(FrameShopModel frameShop)
 {
     return(frameShop.Materials);
 }