Exemple #1
0
 public bool compatibilityMotherBordToRAM(MotherBord m, RAM r) //сравнение памяти и матери
 {
     if (m.MemoryGeneration == r.MemoryGeneration)
     {
         return(true);
     }
     return(false);
 }
Exemple #2
0
 public bool compatibilityMotherBordToProcessor(MotherBord m, Processor p)//сравнения матери и проца
 {
     if (m.SoketId == p.SoketId)
     {
         return(true);
     }
     return(false);
 }
Exemple #3
0
        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();
            }
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        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);
        }