/// <summary> /// Ariel Sigo /// Created 2016/11/22 /// </summary> /// <param name="oldTrainer"></param> /// <param name="newTrainer"></param> /// <returns>true if update succeeded for trainer</returns> public bool UpdateTrainer(Trainer oldTrainer, Trainer newTrainer) { var result = false; if (result = (1 == TrainerAccessor.UpdateTrainer(oldTrainer.TrainerID, newTrainer.TrainerID, oldTrainer.TrainerFirstName, newTrainer.TrainerFirstName, oldTrainer.TrainerLastName, newTrainer.TrainerLastName, oldTrainer.TrainerPhoneNumber, newTrainer.TrainerPhoneNumber, oldTrainer.TrainerStatus, newTrainer.TrainerStatus, oldTrainer.TrainerPoleLevel, newTrainer.TrainerPoleLevel, oldTrainer.TrainerAcroLevel, newTrainer.TrainerAcroLevel, oldTrainer.TrainerSilksLevel, newTrainer.TrainerSilksLevel, oldTrainer.TrainerLyraLevel, newTrainer.TrainerLyraLevel))) { return(result); } else { result = false; return(result); } }
/// <summary> /// Ariel Sigo /// Created 2016/11/19 /// </summary> /// <param name="oldTrainerID"></param> /// <param name="newTrainerID"></param> /// <param name="oldTrainerFirstName"></param> /// <param name="newTrainerFirstName"></param> /// <param name="oldTrainerLastName"></param> /// <param name="newTrainerLastName"></param> /// <param name="oldTrainerPhoneNumber"></param> /// <param name="newTrainerPhoneNumber"></param> /// <param name="oldTrainerStatus"></param> /// <param name="newTrainerStatus"></param> /// <param name="oldTrainerPoleLevel"></param> /// <param name="newTrainerPoleLevel"></param> /// <param name="oldTrainerAcroLevel"></param> /// <param name="newTrainerAcroLevel"></param> /// <param name="oldTrainerSilksLevel"></param> /// <param name="newTrainerSilksLevel"></param> /// <param name="oldTrainerLyraLevel"></param> /// <param name="newTrainerLyraLevel"></param> /// <returns>True if update on trainer was successsful </returns> public bool UpdateTrainer(string oldTrainerID, string newTrainerID, string oldTrainerFirstName, string newTrainerFirstName, string oldTrainerLastName, string newTrainerLastName, string oldTrainerPhoneNumber, string newTrainerPhoneNumber, bool oldTrainerStatus, bool newTrainerStatus, string oldTrainerPoleLevel, string newTrainerPoleLevel, string oldTrainerAcroLevel, string newTrainerAcroLevel, string oldTrainerSilksLevel, string newTrainerSilksLevel, string oldTrainerLyraLevel, string newTrainerLyraLevel) { var result = false; try { result = (1 == TrainerAccessor.UpdateTrainer(oldTrainerID, newTrainerID, oldTrainerFirstName, newTrainerFirstName, oldTrainerLastName, newTrainerLastName, oldTrainerPhoneNumber, newTrainerPhoneNumber, oldTrainerStatus, newTrainerStatus, oldTrainerPoleLevel, newTrainerPoleLevel, oldTrainerAcroLevel, newTrainerAcroLevel, oldTrainerSilksLevel, newTrainerSilksLevel, oldTrainerLyraLevel, newTrainerLyraLevel)); refreshActiveTrainerList(); } catch (Exception) { throw; } return(result); }