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();
            }
        }
Пример #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();
            }
        }
Пример #3
0
        private void InsertPage2(EReportArea area, SqlTransaction trans)
        {
            if (area == EReportArea.US)
            {
                P2Set.MainNo     = MainSet.RecNo;
                P2Set.No         = 0;
                P2Set.Line       = false;
                P2Set.Requested  = "US Public Law 110-314(Comsumer Plroduct Safety Improvement Act of 2008, CPSIA):";
                P2Set.Conclusion = "-";
                P2Set.Insert(trans);

                P2Set.No         = 1;
                P2Set.Line       = false;
                P2Set.Requested  = "- ASTM F963-17: Standard Consumer Safety Specification on Toy Safety\r\n  (Excluding clause 4.3.5 Heavy Element)";
                P2Set.Conclusion = "PASS";
                P2Set.Insert(trans);

                P2Set.No         = 2;
                P2Set.Line       = false;
                P2Set.Requested  = "Flammability of toys(16 C.F.R. 1500.44)";
                P2Set.Conclusion = "PASS";
                P2Set.Insert(trans);

                P2Set.No         = 3;
                P2Set.Line       = false;
                P2Set.Requested  = "Small part(16 C.F.R. 1501)";
                P2Set.Conclusion = "PASS";
                P2Set.Insert(trans);

                P2Set.No         = 4;
                P2Set.Line       = false;
                P2Set.Requested  = "Sharp points and edges(16 C.F.R. 1500.48 and 49)";
                P2Set.Conclusion = "PASS";
                P2Set.Insert(trans);
            }
            else
            {
                P2Set.MainNo     = MainSet.RecNo;
                P2Set.No         = 0;
                P2Set.Line       = false;
                P2Set.Requested  = "EN 71 Part 1:2014+A1:2018 - Mechanical and Physical Properties";
                P2Set.Conclusion = "PASS";
                P2Set.Insert(trans);

                P2Set.No         = 1;
                P2Set.Line       = false;
                P2Set.Requested  = "EN 71 Part 2:2011+A1:2014 - Flammability of Toys";
                P2Set.Conclusion = "PASS";
                P2Set.Insert(trans);

                P2Set.No         = 2;
                P2Set.Line       = false;
                P2Set.Requested  = "Labeling requirement (Washing/Cleaning Label, CE mark, importer / manufacturer mark (name, address), product identification) according to the Directive 2009/48/EC-Safety of toys";
                P2Set.Conclusion = "See note 1*";
                P2Set.Insert(trans);
            }
        }
Пример #4
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);
            }
        }
        private void InsertPage2(SqlTransaction trans)
        {
            ProfJobSchemeSet.JobNo = MainSet.RecNo;
            ProfJobSchemeSet.Select(trans);
            ProfJobSchemeSet.Fetch();

            P2Set.MainNo = MainSet.RecNo;

            for (int i = 0; i < ProfJobSchemeSet.RowCount; i++)
            {
                ProfJobSchemeSet.Fetch(i);

                P2Set.Name        = ProfJobSchemeSet.Name;
                P2Set.LoValue     = ProfJobSchemeSet.LoValue;
                P2Set.HiValue     = ProfJobSchemeSet.HiValue;
                P2Set.ReportValue = ProfJobSchemeSet.ReportValue;
                P2Set.FormatValue = ProfJobSchemeSet.FormatValue;
                P2Set.Insert(trans);
            }
        }
        private void SavePage2(EReportArea area, SqlTransaction trans)
        {
            if (area == EReportArea.US)
            {
                List <ChemicalPage2ExtendRow> extendRows = CtrlUs.P2ExtendRows;

                foreach (ChemicalPage2ExtendRow row in extendRows)
                {
                    P2ExtendSet.RecNo       = row.RecNo;
                    P2ExtendSet.FormatValue = row.FormatValue;
                    P2ExtendSet.Update(trans);
                }
            }

            List <ChemicalPage2Row> rows = (area == EReportArea.US) ? CtrlUs.P2Rows : CtrlEu.P2Rows;

            foreach (ChemicalPage2Row row in rows)
            {
                P2Set.RecNo       = row.RecNo;
                P2Set.FormatValue = row.FormatValue;
                P2Set.Update(trans);
            }
        }