Exemplo n.º 1
0
        /// <summary>
        /// Inserts the badge missing report.
        /// </summary>
        /// <param name="details">The details.</param>
        /// <param name="staffID">The staff ID.</param>
        public void InsertBadgeMissingReport(LostBadgeDetails details, int staffID)
        {
            var storedProcedure = new StoredProcedure()
            {
                StoredProcedureName = schema + ".[Badging.InsertBadgeMissingReport]"
            };

            storedProcedure.Parameters.Add(new StoredProcedureParameter("@BadgeID", ParameterType.DBInteger, details.BadgeID));
            storedProcedure.Parameters.Add(new StoredProcedureParameter("@WhenReported", ParameterType.DBDateTime, details.ReportedDate));
            storedProcedure.Parameters.Add(new StoredProcedureParameter("@DateOfOccurrence", ParameterType.DBDateTime, details.DateOfOccurance));
            storedProcedure.Parameters.Add(new StoredProcedureParameter("@BadgeStatusCode", ParameterType.DBString, details.Type));
            storedProcedure.Parameters.Add(new StoredProcedureParameter("@CustomSeal", ParameterType.DBString, details.Type));
            storedProcedure.Parameters.Add(new StoredProcedureParameter("@ReportedByName", ParameterType.DBString, details.ReportedBy));
            storedProcedure.Parameters.Add(new StoredProcedureParameter("@ReportedByTitle", ParameterType.DBString, details.Title));
            storedProcedure.Parameters.Add(new StoredProcedureParameter("@ReportedByPhoneNumber", ParameterType.DBString, details.Phone));
            storedProcedure.Parameters.Add(new StoredProcedureParameter("@BadgeMissingReportMethodID", ParameterType.DBInteger, details.HowReported));
            storedProcedure.Parameters.Add(new StoredProcedureParameter("@Notes", ParameterType.DBString, details.Details));
            storedProcedure.Parameters.Add(new StoredProcedureParameter("@StaffID", ParameterType.DBInteger, staffID));

            storedProcedure.ExecuteNonQuery();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Inserts the badge missing report.
 /// </summary>
 /// <param name="details">The details.</param>
 /// <param name="staffID">The staff ID.</param>
 public void InsertBadgeMissingReport(LostBadgeDetails details, int staffID)
 {
     this.badgeRepository.InsertBadgeMissingReport(details, staffID);
 }