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(); } }
private void SavePage3(EReportArea area, SqlTransaction trans) { List <PhysicalPage3Row> rows = (area == EReportArea.US) ? CtrlUs.P3Rows : CtrlEu.P3Rows; P3Set.MainNo = MainSet.RecNo; P3Set.Delete(trans); foreach (PhysicalPage3Row row in rows) { P3Set.No = row.No; P3Set.Line = row.Line; P3Set.Clause = row.Clause; P3Set.Description = row.Description; P3Set.Result = row.Result; P3Set.Insert(trans); } }