public bool SaveBadgingResults(BadgingResults badgingResults, int userID, bool CreateBackgroundCheck) { bool result = false; try { StoredProcedure storedProcedure = new StoredProcedure() { StoredProcedureName = schema + ".[Badging.Appointment.Save]" }; string countryCode = badgingResults.BiographicModel.CountryCode; if (countryCode == null || countryCode == string.Empty) { badgingResults.BiographicModel.CountryCode = "USA"; } string countrySubdivisionCode = badgingResults.BiographicModel.CountrySubdivisionCode; if (countrySubdivisionCode == null) { badgingResults.BiographicModel.CountrySubdivisionCode = string.Empty; } string countryCode_Birth = badgingResults.BiographicModel.CountryCode_Birth; if (countryCode_Birth == null || countryCode_Birth == string.Empty) { badgingResults.BiographicModel.CountryCode_Birth = "USA"; } //JBienvenu 2013-01-09 new block string countrySubdivisionCode_Birth = badgingResults.BiographicModel.CountrySubdivisionCode_Birth; if (countrySubdivisionCode_Birth == null) { badgingResults.BiographicModel.CountrySubdivisionCode_Birth = string.Empty; } string strBadgingResults = XmlHelper.Serialize(badgingResults); storedProcedure.Parameters.Add(new StoredProcedureParameter("@BadgingResults", ParameterType.DBString, strBadgingResults)); storedProcedure.Parameters.Add(new StoredProcedureParameter("@UserID", ParameterType.DBInteger, userID)); storedProcedure.Parameters.Add(new StoredProcedureParameter("@CreateBackgroundCheck", ParameterType.DBBoolean, CreateBackgroundCheck)); storedProcedure.ExecuteDataSet(); result = true; } catch (Exception ex) { result = false; StringBuilder sb = new StringBuilder(); sb.AppendLine("SaveBadgingResults() Exception.Message: " + ex.Message); sb.AppendLine("SaveBadgingResults() Exception.InnerException: " + ex.InnerException); sb.AppendLine("SaveBadgingResults() Exception.Source: " + ex.Source); sb.AppendLine("SaveBadgingResults() Exception.StackTrace: " + ex.StackTrace); log4net.ILog log = log4net.LogManager.GetLogger("AirportIQ.Web.Verbose"); log.Debug(sb.ToString()); throw ex; } return(result); }
public bool SaveBadgingNotes(BadgingResults badgingResults, int userID) { bool result = false; try { StoredProcedure storedProcedure = new StoredProcedure() { StoredProcedureName = schema + ".[Badging.Appointment.Notes.Save]" }; string strBadgingResults = XmlHelper.Serialize(badgingResults); storedProcedure.Parameters.Add(new StoredProcedureParameter("@BadgingResults", ParameterType.DBString, strBadgingResults)); storedProcedure.Parameters.Add(new StoredProcedureParameter("@PersonID", ParameterType.DBInteger, badgingResults.BiographicModel.PersonID)); storedProcedure.Parameters.Add(new StoredProcedureParameter("@UserID", ParameterType.DBInteger, userID)); storedProcedure.ExecuteDataSet(); result = true; } catch (Exception ex) { result = false; StringBuilder sb = new StringBuilder(); sb.AppendLine("SaveBadgingNotes() Exception.Message: " + ex.Message); sb.AppendLine("SaveBadgingNotes() Exception.InnerException: " + ex.InnerException); sb.AppendLine("SaveBadgingNotes() Exception.Source: " + ex.Source); sb.AppendLine("SaveBadgingNotes() Exception.StackTrace: " + ex.StackTrace); log4net.ILog log = log4net.LogManager.GetLogger("AirportIQ.Web.Verbose"); log.Debug(sb.ToString()); throw ex; } return(result); }
public bool SaveBadgingNotes(BadgingResults badgingResults, int userID) { return(this.badgeRepository.SaveBadgingNotes(badgingResults, userID)); }
public bool SaveBadgingResults(BadgingResults badgingResults, int userID, bool CreateBackgroundCheck) { return(this.badgeRepository.SaveBadgingResults(badgingResults, userID, CreateBackgroundCheck)); }