public static bool Reject(string[] args, List <TrainingSchedule> dt) { if (Globals.ExecuteScalar(DataAccess.EnrolRejectById, args, ref errorNumber, ref errorMessage, MethodBase.GetCurrentMethod) > 0) { Trainee trainee = Trainee.ByEnrolId(args[0]); string[] emailArgs = { trainee.Name, trainee.Surname, args[2] }; Communication.GenericCommunication.SMS(trainee.CellPhoneNumber, Message.smsTrainingRejected()); Communication.GenericCommunication.SendEmail(trainee.EmailAddress, "Training Rejected", Message.TrainingRejected(emailArgs, dt)); return(true); } return(false); }
public static bool TrainingEnrollCancelByIdNumberAndScheduleId(string[] args, List <TrainingSchedule> dt) { if (Globals.ExecuteScalar(DataAccess.CancelTrainingEnrollByIdNumberAndScheduleId, args, ref errorNumber, ref errorMessage, MethodBase.GetCurrentMethod) > 0) { Trainee trainee = Trainee.ByEnrolId(args[0]); string[] emailArgs = { trainee.Name, trainee.Surname }; Communication.GenericCommunication.SMS(trainee.CellPhoneNumber, Message.smsCancelTrainingConfirmation()); Communication.GenericCommunication.SendEmail(trainee.EmailAddress, "Training Cancellation", Message.CancelTrainingConfirmation(emailArgs, dt)); return(true); } return(false); }