Exemple #1
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();
            }
        }
Exemple #2
0
        private void SavePage5(EReportArea area, SqlTransaction trans)
        {
            List <PhysicalPage5Row> rows = (area == EReportArea.US) ? CtrlUs.P5Rows : CtrlEu.P5Rows;

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

            foreach (PhysicalPage5Row row in rows)
            {
                P5Set.No          = row.No;
                P5Set.Line        = row.Line;
                P5Set.TestItem    = row.TestItem;
                P5Set.Result      = row.Result;
                P5Set.Requirement = row.Requirement;
                P5Set.Insert(trans);
            }
        }
Exemple #3
0
        private void InsertPage5(EReportArea area, SqlTransaction trans)
        {
            if (area == EReportArea.US)
            {
                P5Set.MainNo   = MainSet.RecNo;
                P5Set.No       = 0;
                P5Set.Line     = true;
                P5Set.TestItem =
                    "   1. Objectionable matter originating from\r\n" +
                    "      Insect, bird and rodent or other animal\r\n" +
                    "      infestation";
                P5Set.Result      = "Absent";
                P5Set.Requirement = "Absent";
                P5Set.Insert(trans);

                P5Set.No          = 1;
                P5Set.Line        = false;
                P5Set.TestItem    = "Comment";
                P5Set.Result      = "PASS";
                P5Set.Requirement = "-";
                P5Set.Insert(trans);
            }
            else
            {
                P5Set.MainNo      = MainSet.RecNo;
                P5Set.No          = 0;
                P5Set.Line        = true;
                P5Set.TestItem    = "Washing/Cleaning instruction";
                P5Set.Result      = "Present";
                P5Set.Requirement = "Affixed label and Hangtag";
                P5Set.Insert(trans);

                P5Set.No          = 1;
                P5Set.Line        = true;
                P5Set.TestItem    = "CE mark";
                P5Set.Result      = "Present";
                P5Set.Requirement = "Affixed label and Hangtag";
                P5Set.Insert(trans);

                P5Set.No          = 2;
                P5Set.Line        = true;
                P5Set.TestItem    = "Importer's Name & Address";
                P5Set.Result      = "Present";
                P5Set.Requirement = "Affixed label and Hangtag";
                P5Set.Insert(trans);

                P5Set.No          = 3;
                P5Set.Line        = true;
                P5Set.TestItem    = "Manufacturer's Name & Address";
                P5Set.Result      = "Present";
                P5Set.Requirement = "Affixed label and Hangtag";
                P5Set.Insert(trans);

                P5Set.No          = 4;
                P5Set.Line        = true;
                P5Set.TestItem    = "Product ID";
                P5Set.Result      = "Present";
                P5Set.Requirement = "Affixed label and Hangtag";
                P5Set.Insert(trans);
            }
        }