/// <summary> /// DeleteDirect /// </summary> /// <param name="workId">workId</param> /// <param name="companyId">companyId</param> public void DeleteDirect(int workId, int companyId) { WorkFullLengthLiningGateway workFullLengthLiningGateway = new WorkFullLengthLiningGateway(); workFullLengthLiningGateway.LoadByWorkId(workId, companyId); if (workFullLengthLiningGateway.Table.Rows.Count > 0) { // Delete P1 WorkFullLengthLiningP1 workFullLengthLiningP1 = new WorkFullLengthLiningP1(null); workFullLengthLiningP1.DeleteDirect(workId, companyId); // Delete M1 WorkFullLengthLiningM1 workFullLengthLiningM1 = new WorkFullLengthLiningM1(null); workFullLengthLiningM1.DeleteDirect(workId, companyId); // Delete M2 WorkFullLengthLiningM2 workFullLengthLiningM2 = new WorkFullLengthLiningM2(null); workFullLengthLiningM2.DeleteDirect(workId, companyId); // Delete WorkComments WorkComments workComments = new WorkComments(null); workComments.DeleteAllDirect(workId, companyId); // Delete Catalysts // Delete wet out data // delete inversion data // Delete WorkFullLengthLining workFullLengthLiningGateway.Delete(workId, companyId); // Delete work Work work = new Work(null); work.DeleteDirect(workId, companyId); } }