Ejemplo n.º 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();
 }
Ejemplo n.º 2
0
 public void CreateDefect(Defect defect)
 {
     DispositionDataContext dispositionDb = new DispositionDataContext();
     dispositionDb.Defects.InsertOnSubmit(defect);
     dispositionDb.SubmitChanges();
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 4
0
 partial void DeleteDefect(Defect instance);
Ejemplo n.º 5
0
 partial void UpdateDefect(Defect instance);
Ejemplo n.º 6
0
 partial void InsertDefect(Defect instance);