Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 public void CreateDefectDetail(DefectDetail defectDetail)
 {
     DispositionDataContext dispositionDb = new DispositionDataContext();
     dispositionDb.DefectDetails.InsertOnSubmit(defectDetail);
     dispositionDb.SubmitChanges();
     DispositionCacheManager.RefreshDefectDetails();
 }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
 partial void DeleteDefectDetail(DefectDetail instance);
Exemplo n.º 5
0
 partial void UpdateDefectDetail(DefectDetail instance);
Exemplo n.º 6
0
 partial void InsertDefectDetail(DefectDetail instance);