public bool compatibilityMotherBordToRAM(MotherBord m, RAM r) //сравнение памяти и матери { if (m.MemoryGeneration == r.MemoryGeneration) { return(true); } return(false); }
public bool compatibilityMotherBordToProcessor(MotherBord m, Processor p)//сравнения матери и проца { if (m.SoketId == p.SoketId) { return(true); } return(false); }
public void EditMotherBoard(int?MotherBoardID) // редактирование { MotherBord motherBoard = DataBase.MotherBord.Where(c => c.Id == c.Id).FirstOrDefault(); //узнать что это за строка if (motherBoard != null) { DataBase.Entry <MotherBord>(motherBoard).State = System.Data.Entity.EntityState.Modified; DataBase.SaveChanges(); } }
public ObservableCollection <RAM> SortRAMCollection(ObservableCollection <RAM> instantCollection, MotherBord selectedMotherBord) { ObservableCollection <RAM> r = new ObservableCollection <RAM>(); foreach (var item in instantCollection) { if (compatibilityMotherBordToRAM(selectedMotherBord, item)) { r.Add(item); } } return(r); }
public ObservableCollection <Processor> SortProcessorCollection(ObservableCollection <Processor> instantCollection, MotherBord selectedMotherBord) { ObservableCollection <Processor> r = new ObservableCollection <Processor>(); foreach (var item in instantCollection) { if (compatibilityMotherBordToProcessor(selectedMotherBord, item)) { r.Add(item); } } return(r); }