/// <summary> /// Cancel business method. /// </summary> /// <param name="trainingRequest">A trainingRequest value.</param> public void Cancel(TrainingRequest trainingRequest) { // Data access component declarations. var trainingRequestDAC = new TrainingRequestDAC(); // Step 1 - Calling UpdateById on TrainingRequestDAC. trainingRequestDAC.UpdateById(trainingRequest); var auditLog = new AuditLog(); auditLog.Module = "Cancel Training"; auditLog.Action = "Cancel Training"; auditLog.Description = "Cancel Training"; auditLog.CreateBy = Environment.MachineName; var auditor = new Auditor(); // auditor.AuditModified(auditLog, trainingRequest.RequestStatus, trainingRequest.RequestStatus); auditor.AuditAdded(auditLog, trainingRequest); }