Esempio n. 1
0
        public void ReplaceCounters(Detector det, CountingAnalysisParameters cap)
        {
            DB.CountingAnalysisParameters db = new DB.CountingAnalysisParameters();
            DB.Detectors dets = new DB.Detectors(db.db);
            long         l    = dets.PrimaryKey(det.Id.DetectorName);

            if (l == -1)
            {
                return;
            }

            foreach (SpecificCountingAnalyzerParams s in cap)
            {
                DB.ElementList parms = s.ToDBElementList();
                if (parms != null)
                {
                    db.Delete(l, s.GetType().Name, parms);
                }
            }
        }
Esempio n. 2
0
        public void ReplaceCounters(Detector det, CountingAnalysisParameters cap)
        {
            DB.CountingAnalysisParameters db = new DB.CountingAnalysisParameters();
            DB.Detectors dets = new DB.Detectors(db.db);
            long l = dets.PrimaryKey(det.Id.DetectorName);
            if (l == -1)
            {
                return;
            }

            foreach (SpecificCountingAnalyzerParams s in cap)
            {
                DB.ElementList parms = s.ToDBElementList();
                if (parms != null)
                {
                    db.Delete(l, s.GetType().Name, parms);
                }
            }
        }