using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using Neo.LegitimateLicences.Common; using Neo.Afx.Security; using System.Data.Entity; namespace Neo.LegitimateLicences.Data.Models { public partial class LegitimateDatabase { #region SearchAccreditationIssues public List SearchAccreditationIssues(string applicationRequestTypes, bool includeWorkflowsAwaitingInfoOnly, bool includeActiveWorkflowsOnly, bool includeActiveTasksOnly,string steps, long userID) { return Context.Pr_AccreditationIssueSearch(applicationRequestTypes, includeWorkflowsAwaitingInfoOnly, includeActiveWorkflowsOnly, includeActiveTasksOnly,steps, userID).ToList(); } #endregion #region SearchVerifiedAccreditations public IEnumerable SearchVerifiedAccreditations(string accreditationNumber, long? memberIdSearch, long? accreditationStatusIdSearch, DateTime? issueDateStartDateSearch, DateTime? issueDateEndDateSearch, DateTime? expiryDateStartDateSearch, DateTime? expiryDateEndDateSearch, long userID) { return Context.Pr_AccreditationSearch(accreditationNumber, memberIdSearch, accreditationStatusIdSearch, issueDateStartDateSearch, issueDateEndDateSearch, expiryDateStartDateSearch, expiryDateEndDateSearch, userID); } #endregion #region SearchVerifiedAccreditations public Accreditation GetVerifiedAccreditation(long accreditationID) { var accreditation = Context.Accreditations.Include("AccreditationStatu").Include("Member").Where(a => a.AccreditationID == accreditationID).FirstOrDefault(); if (accreditation.AccreditationStatu != null && accreditation.AccreditationStatu.Accreditations != null) { accreditation.AccreditationStatu.Accreditations.Clear(); } if (accreditation.Member != null && accreditation.Member.Accreditations != null) { accreditation.Member.Accreditations.Clear(); } return accreditation; } #endregion } }