Пример #1
0
 public void UpdateDefect(Defect defect)
 {
     DispositionDataContext dispositionDb = new DispositionDataContext();
     var updateDefect = (from s in dispositionDb.Defects
                            where s.DefectID == defect.DefectID
                            select s).Single();
     updateDefect.Code = defect.Code;
     updateDefect.Description = defect.Description;
     updateDefect.Obsolete = defect.Obsolete;
     dispositionDb.SubmitChanges();
 }
Пример #2
0
 public void CreateDefect(Defect defect)
 {
     DispositionDataContext dispositionDb = new DispositionDataContext();
     dispositionDb.Defects.InsertOnSubmit(defect);
     dispositionDb.SubmitChanges();
 }
Пример #3
0
        public Defect GetDefectById(int id)
        {
            DispositionDataContext dispositionDb = new DispositionDataContext();
            var defect = (from s in dispositionDb.Defects
                          where s.DefectID == id
                          select s).Single();

            var result = new Defect
            {
                Code = defect.Code,
                DefectID = defect.DefectID,
                Description = defect.Description,
                Obsolete = defect.Obsolete
            };

            return result;
        }
Пример #4
0
 partial void DeleteDefect(Defect instance);
Пример #5
0
 partial void UpdateDefect(Defect instance);
Пример #6
0
 partial void InsertDefect(Defect instance);