Exemplo n.º 1
0
        private void SavePage4(EReportArea area, SqlTransaction trans)
        {
            List <PhysicalPage3Row> p40Rows = (area == EReportArea.US) ? null : CtrlEu.P40Rows;
            List <PhysicalPage4Row> p41Rows = (area == EReportArea.US) ? CtrlUs.P4Rows : CtrlEu.P41Rows;

            if (p40Rows != null)
            {
                P40Set.MainNo = MainSet.RecNo;
                P40Set.Delete(trans);

                foreach (PhysicalPage3Row row in p40Rows)
                {
                    P40Set.No          = row.No;
                    P40Set.Line        = row.Line;
                    P40Set.Clause      = row.Clause;
                    P40Set.Description = row.Description;
                    P40Set.Result      = row.Result;
                    P40Set.Insert(trans);
                }
            }

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

            foreach (PhysicalPage4Row row in p41Rows)
            {
                P41Set.No          = row.No;
                P41Set.Line        = row.Line;
                P41Set.Sample      = row.Sample;
                P41Set.BurningRate = row.BurningRate;
                P41Set.Insert(trans);
            }
        }
Exemplo n.º 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();
            }
        }