public void Delete(SqlTransaction trans = null)
        {
            if (local == true)
            {
                throw new Exception("Can't call ChemicalQuery.Delete() method in Local transaction mode!");
            }

            string mainNo = MainSet.RecNo;

            trans = AppRes.DB.BeginTrans();

            try
            {
                ImageSet.RecNo = mainNo;
                ImageSet.Delete(trans);
                JoinSet.RecNo = mainNo;
                JoinSet.Delete(trans);
                P2Set.MainNo = mainNo;
                P2Set.Delete(trans);
                P2ExtendSet.RecNo = mainNo;
                P2ExtendSet.Delete(trans);
                MainSet.Delete(trans);
                ResetReportValidation(trans);

                AppRes.DB.CommitTrans();
            }
            catch
            {
                AppRes.DB.RollbackTrans();
            }
        }
Beispiel #2
0
        public void Delete()
        {
            if (local == true)
            {
                throw new Exception("Can't call PhysicalQuery.Delete() method in Local transaction mode!");
            }

            string         mainNo = MainSet.RecNo;
            SqlTransaction trans  = AppRes.DB.BeginTrans();

            try
            {
                P2Set.MainNo = mainNo;
                P2Set.Delete(trans);
                P3Set.MainNo = mainNo;
                P3Set.Delete(trans);
                P40Set.MainNo = mainNo;
                P40Set.Delete(trans);
                P41Set.MainNo = mainNo;
                P41Set.Delete(trans);
                P5Set.MainNo = mainNo;
                P5Set.Delete(trans);
                ImageSet.RecNo = mainNo;
                ImageSet.Delete(trans);
                MainSet.Delete(trans);
                productSet.JobNo = mainNo;
                productSet.UpdateJobNoReset(trans);

                AppRes.DB.CommitTrans();
            }
            catch
            {
                AppRes.DB.RollbackTrans();
            }
        }
Beispiel #3
0
        private void SavePage2(EReportArea area, SqlTransaction trans)
        {
            List <PhysicalPage2Row> rows = (area == EReportArea.US) ? CtrlUs.P2Rows : CtrlEu.P2Rows;

            P2Set.MainNo = MainSet.RecNo;
            P2Set.Delete(trans);

            foreach (PhysicalPage2Row row in rows)
            {
                P2Set.No         = row.No;
                P2Set.Line       = row.Line;
                P2Set.Requested  = row.Requested;
                P2Set.Conclusion = row.Conclusion;
                P2Set.Insert(trans);
            }
        }