Ejemplo n.º 1
0
 private void AddSelectedParts(Watch watch, string[] ids)
 {
     for (int i = 1; i < ids.Length; i++)
     {
         watch.AddComponent(DB.WatchParts.Where(item => item.Id == int.Parse(ids[i])).FirstOrDefault());
     }
 }
Ejemplo n.º 2
0
        private void AddParts(Watch watch)
        {
            List <WatchComponents> watchComponents = DB.RelationTableWatch.Where(item => item.WatchId == watch.Id).ToList();

            List <WatchPart> watchParts = new List <WatchPart>();

            watchComponents.ForEach(item => watchParts.Add(DB.WatchParts.Find(item.WatchPartId)));
            watchParts.ForEach(item => watch.AddComponent(item));
        }