public void UpdateDefectDetail(DefectDetail defectDetail)
        {
            DispositionDataContext dispositionDb = new DispositionDataContext();
            var updateDefectDetail = (from s in dispositionDb.DefectDetails
                                      where s.DefectDetailID == defectDetail.DefectDetailID
                                      select s).Single();

            updateDefectDetail.Code = defectDetail.Code;
            updateDefectDetail.Description = defectDetail.Description;
            updateDefectDetail.Obsolete = defectDetail.Obsolete;
            dispositionDb.SubmitChanges();
        }
 public void CreateDefectDetail(DefectDetail defectDetail)
 {
     DispositionDataContext dispositionDb = new DispositionDataContext();
     dispositionDb.DefectDetails.InsertOnSubmit(defectDetail);
     dispositionDb.SubmitChanges();
     DispositionCacheManager.RefreshDefectDetails();
 }
        public DefectDetail GetDefectDetailById(int id)
        {
            DispositionDataContext dispositionDb = new DispositionDataContext();
            var defectDetail = (from s in dispositionDb.DefectDetails
                    where s.DefectDetailID == id
                    select s).Single();

            var result = new DefectDetail
            {
                Code = defectDetail.Code,
                DefectDetailID = defectDetail.DefectDetailID,
                Description = defectDetail.Description,
                Obsolete = defectDetail.Obsolete
            };
            return result;
        }
 partial void DeleteDefectDetail(DefectDetail instance);
 partial void UpdateDefectDetail(DefectDetail instance);
 partial void InsertDefectDetail(DefectDetail instance);