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 CreateStationeryBatch public void CreateStationeryBatch(short stationeryBatchTypeID, string fromNumber, string toNumber, int intFromNumber, int intToNumber, string prefix, long userID) { Context.Pr_StationeryBatchCreate(stationeryBatchTypeID, fromNumber, toNumber, intFromNumber, intToNumber, prefix, userID); } #endregion #region AssignPrecheckStationery public List AssignPrecheckStationery(string fromNumber, long numberOfPagesIssued, long userID) { return Context.Pr_StationeryAssignPrecheck(fromNumber, numberOfPagesIssued, userID).ToList(); } #endregion #region GetFirstAvailableStationeryNumber public Neo.LegitimateLicences.Data.Models.Stationery GetFirstAvailableStationeryNumber(long userID) { return Context.Pr_FirstStationeryNumberGet(userID).FirstOrDefault(); } #endregion #region IssueStationery public void IssueStationery(long issueToID, string fromNumber, long numberOfPagesIssued, long userID) { Context.Pr_StationeryAssign(issueToID, fromNumber, numberOfPagesIssued, userID); } #endregion #region IssueStationery public void TransferStationery(string fromNumber, long numberOfPagesIssued, short stationeryBatchTypeID, short? officeLocationID, string externalPartyDescription, string externalPartyContactName, string externalPartyContactEmail, string stationeryIDs, long userID) { Context.Pr_StationeryTransfer(fromNumber, numberOfPagesIssued, stationeryBatchTypeID, officeLocationID, externalPartyDescription, externalPartyContactName, externalPartyContactEmail, stationeryIDs, userID); } #endregion #region IssueStationery public void MarkStationeryBatchReceived(long stationeryBatchID, long userID) { Context.Pr_StationeryBatchReceived(stationeryBatchID, userID); } #endregion #region ReturnStationery public void ReturnStationery(long issueToUserID, long stationeryID, short stationeryStatusID, long? stationeryScanDocID, string comments, long userID) { Context.Pr_ReturnedIssuedStationery(issueToUserID, stationeryID, stationeryStatusID, stationeryScanDocID, comments, userID); } #endregion #region GetStationeryBatches public List GetStationeryBatches(string searchType, long userID) { return Context.Pr_StationeryBatchesGet(searchType, userID).ToList(); } #endregion #region GetStationeryBatches public List GetIssuedStationery(long userID) { return Context.Pr_IssuedStationeryGet(userID).ToList(); } #endregion #region GetIssuedToStationery public List GetIssuedToStationery(long issuedToID, string stationeryStatusIDs, long userID) { return Context.Pr_IssuedToStationeryGet(issuedToID, stationeryStatusIDs, userID).ToList(); } #endregion #region GetIssuedToStationery public Stationery GetIssuedToStationery(long userID) { return Context.Pr_StationeryNumberGetNext(userID).FirstOrDefault(); } #endregion #region UpdateStationeryStatus public void UpdateStationeryStatus(long stationeryID, short stationeryStatusID, string comments, long userID) { Context.Pr_StationeryStatusHistoryUpdate(stationeryID, stationeryStatusID, comments, userID); } #endregion } }