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