//------------------------------------------------------------------------------
//
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
//------------------------------------------------------------------------------
namespace Common
{
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.Core.Objects;
using System.Linq;
public partial class DataModel : DbContext
{
public DataModel()
: base("name=DataModel")
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
public virtual DbSet DriverActions { get; set; }
public virtual DbSet DriverLogs { get; set; }
public virtual DbSet Settings { get; set; }
public virtual DbSet Dispatches { get; set; }
public virtual DbSet Invoices { get; set; }
public virtual DbSet InvoiceStatus { get; set; }
public virtual DbSet Locations { get; set; }
public virtual DbSet OperatorLogins { get; set; }
public virtual DbSet OperatorRoles { get; set; }
public virtual DbSet Packages { get; set; }
public virtual DbSet Actions { get; set; }
public virtual DbSet BagReferences { get; set; }
public virtual DbSet BillingProfiles { get; set; }
public virtual DbSet CustomerInventories { get; set; }
public virtual DbSet CustomerInventoryAudits { get; set; }
public virtual DbSet CustomerLoginLogs { get; set; }
public virtual DbSet CustomerLogins { get; set; }
public virtual DbSet Customers { get; set; }
public virtual DbSet CustomerWorkloadBags { get; set; }
public virtual DbSet DispatchPackages { get; set; }
public virtual DbSet DispatchStatus { get; set; }
public virtual DbSet InventoryItems { get; set; }
public virtual DbSet InventoryItemTypeCategories { get; set; }
public virtual DbSet InventoryItemTypes { get; set; }
public virtual DbSet InventoryItemTypeSizes { get; set; }
public virtual DbSet InvoiceBags { get; set; }
public virtual DbSet InvoiceItems { get; set; }
public virtual DbSet WorkloadItems { get; set; }
public virtual DbSet WorkloadItemsAudits { get; set; }
public virtual DbSet Workloads { get; set; }
public virtual DbSet WorkloadsAudits { get; set; }
public virtual DbSet WorkloadStatuses { get; set; }
public virtual DbSet WorkloadTypes { get; set; }
public virtual DbSet vwClosedCustomerWorkloads { get; set; }
public virtual DbSet vwCustomerBagsWaitingCountings { get; set; }
public virtual DbSet vwCustomerInventories { get; set; }
public virtual DbSet vwCustomerInventoryForWorkloads { get; set; }
public virtual DbSet vwCustomerInventoryWorkloads { get; set; }
public virtual DbSet vwDeliveryNoteCategoriesByBagSeals { get; set; }
public virtual DbSet vwDispatchBagPackageContents { get; set; }
public virtual DbSet vwExcelDataDumps { get; set; }
public virtual DbSet vwInventoryItems { get; set; }
public virtual DbSet vwInventoryItemTypes { get; set; }
public virtual DbSet vwInvoiceBagSealCategories { get; set; }
public virtual DbSet vwInvoiceCountsRecons { get; set; }
public virtual DbSet vwOpenCustomerWorkloads { get; set; }
public virtual DbSet vwPackageContents { get; set; }
public virtual DbSet vwPackagesReadyForDispatches { get; set; }
public virtual DbSet vwWorkloadCategoryTypeCounts { get; set; }
public virtual DbSet vwWorkloadStatusReports { get; set; }
public virtual DbSet vwWorkloadStatusReportWithCounts { get; set; }
public virtual DbSet vwInvoicesReadyToPrints { get; set; }
public virtual DbSet vwInvoiceItemCounts { get; set; }
public virtual DbSet sysdiagrams { get; set; }
public virtual DbSet vwDispatchesOutForDeliveries { get; set; }
public virtual DbSet vwCustomerBagsReadyToDispatches { get; set; }
public virtual DbSet vwInvoiceCountsCondemneds { get; set; }
public virtual DbSet vwInvoicesReadyToPrint2 { get; set; }
public virtual DbSet vwDeliveryNoteCategoriesByBagSeal2 { get; set; }
public virtual DbSet vwDispatchesReadyToPrints { get; set; }
public virtual DbSet DispatchOperators { get; set; }
public virtual DbSet VATs { get; set; }
public virtual ObjectResult AcceptCustomerBag(Nullable customerId, string uniqueReference, Nullable operatorLoginId)
{
var customerIdParameter = customerId.HasValue ?
new ObjectParameter("CustomerId", customerId) :
new ObjectParameter("CustomerId", typeof(int));
var uniqueReferenceParameter = uniqueReference != null ?
new ObjectParameter("UniqueReference", uniqueReference) :
new ObjectParameter("UniqueReference", typeof(string));
var operatorLoginIdParameter = operatorLoginId.HasValue ?
new ObjectParameter("OperatorLoginId", operatorLoginId) :
new ObjectParameter("OperatorLoginId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("AcceptCustomerBag", customerIdParameter, uniqueReferenceParameter, operatorLoginIdParameter);
}
public virtual ObjectResult CreateDispatch(string packages, string bagSeal, Nullable operatorLoginId)
{
var packagesParameter = packages != null ?
new ObjectParameter("Packages", packages) :
new ObjectParameter("Packages", typeof(string));
var bagSealParameter = bagSeal != null ?
new ObjectParameter("BagSeal", bagSeal) :
new ObjectParameter("BagSeal", typeof(string));
var operatorLoginIdParameter = operatorLoginId.HasValue ?
new ObjectParameter("OperatorLoginId", operatorLoginId) :
new ObjectParameter("OperatorLoginId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("CreateDispatch", packagesParameter, bagSealParameter, operatorLoginIdParameter);
}
public virtual ObjectResult CreatePackage(Nullable invoiceItemId, Nullable itemCount, Nullable itemCountStain, Nullable operatorLoginId)
{
var invoiceItemIdParameter = invoiceItemId.HasValue ?
new ObjectParameter("InvoiceItemId", invoiceItemId) :
new ObjectParameter("InvoiceItemId", typeof(int));
var itemCountParameter = itemCount.HasValue ?
new ObjectParameter("ItemCount", itemCount) :
new ObjectParameter("ItemCount", typeof(int));
var itemCountStainParameter = itemCountStain.HasValue ?
new ObjectParameter("ItemCountStain", itemCountStain) :
new ObjectParameter("ItemCountStain", typeof(int));
var operatorLoginIdParameter = operatorLoginId.HasValue ?
new ObjectParameter("OperatorLoginId", operatorLoginId) :
new ObjectParameter("OperatorLoginId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("CreatePackage", invoiceItemIdParameter, itemCountParameter, itemCountStainParameter, operatorLoginIdParameter);
}
public virtual ObjectResult CreateWorkload(Nullable customerLoginId, Nullable workloadTypeId, string workloadItems, string reference, Nullable totalBags)
{
var customerLoginIdParameter = customerLoginId.HasValue ?
new ObjectParameter("CustomerLoginId", customerLoginId) :
new ObjectParameter("CustomerLoginId", typeof(int));
var workloadTypeIdParameter = workloadTypeId.HasValue ?
new ObjectParameter("WorkloadTypeId", workloadTypeId) :
new ObjectParameter("WorkloadTypeId", typeof(int));
var workloadItemsParameter = workloadItems != null ?
new ObjectParameter("WorkloadItems", workloadItems) :
new ObjectParameter("WorkloadItems", typeof(string));
var referenceParameter = reference != null ?
new ObjectParameter("Reference", reference) :
new ObjectParameter("Reference", typeof(string));
var totalBagsParameter = totalBags.HasValue ?
new ObjectParameter("TotalBags", totalBags) :
new ObjectParameter("TotalBags", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("CreateWorkload", customerLoginIdParameter, workloadTypeIdParameter, workloadItemsParameter, referenceParameter, totalBagsParameter);
}
public virtual ObjectResult FinishCounting(Nullable workloadId, Nullable operatorLoginId)
{
var workloadIdParameter = workloadId.HasValue ?
new ObjectParameter("WorkloadId", workloadId) :
new ObjectParameter("WorkloadId", typeof(int));
var operatorLoginIdParameter = operatorLoginId.HasValue ?
new ObjectParameter("OperatorLoginId", operatorLoginId) :
new ObjectParameter("OperatorLoginId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("FinishCounting", workloadIdParameter, operatorLoginIdParameter);
}
public virtual ObjectResult GenerateInvoiceFromWorkloadCounts(Nullable workloadId, Nullable operatorLoginId)
{
var workloadIdParameter = workloadId.HasValue ?
new ObjectParameter("WorkloadId", workloadId) :
new ObjectParameter("WorkloadId", typeof(int));
var operatorLoginIdParameter = operatorLoginId.HasValue ?
new ObjectParameter("OperatorLoginId", operatorLoginId) :
new ObjectParameter("OperatorLoginId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GenerateInvoiceFromWorkloadCounts", workloadIdParameter, operatorLoginIdParameter);
}
public virtual ObjectResult GetCustomerInventory(Nullable customerId)
{
var customerIdParameter = customerId.HasValue ?
new ObjectParameter("CustomerId", customerId) :
new ObjectParameter("CustomerId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCustomerInventory", customerIdParameter);
}
public virtual ObjectResult GetCustomerInventoryByCustomerIdWorkloadId(Nullable customerId, Nullable workloadId)
{
var customerIdParameter = customerId.HasValue ?
new ObjectParameter("CustomerId", customerId) :
new ObjectParameter("CustomerId", typeof(int));
var workloadIdParameter = workloadId.HasValue ?
new ObjectParameter("WorkloadId", workloadId) :
new ObjectParameter("WorkloadId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCustomerInventoryByCustomerIdWorkloadId", customerIdParameter, workloadIdParameter);
}
public virtual ObjectResult GetCustomerInventoryForWorkload(Nullable customerId)
{
var customerIdParameter = customerId.HasValue ?
new ObjectParameter("CustomerId", customerId) :
new ObjectParameter("CustomerId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCustomerInventoryForWorkload", customerIdParameter);
}
public virtual ObjectResult GetCustomerLoginFromGuid(string guid)
{
var guidParameter = guid != null ?
new ObjectParameter("Guid", guid) :
new ObjectParameter("Guid", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCustomerLoginFromGuid", guidParameter);
}
public virtual ObjectResult GetInvoiceForPrinter(Nullable invoiceId)
{
var invoiceIdParameter = invoiceId.HasValue ?
new ObjectParameter("InvoiceId", invoiceId) :
new ObjectParameter("InvoiceId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetInvoiceForPrinter", invoiceIdParameter);
}
public virtual ObjectResult GetWorkloadInventory(Nullable workloadId)
{
var workloadIdParameter = workloadId.HasValue ?
new ObjectParameter("WorkloadId", workloadId) :
new ObjectParameter("WorkloadId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetWorkloadInventory", workloadIdParameter);
}
public virtual ObjectResult GetWorkloadInventoryForInvoice(Nullable invoiceId)
{
var invoiceIdParameter = invoiceId.HasValue ?
new ObjectParameter("InvoiceId", invoiceId) :
new ObjectParameter("InvoiceId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetWorkloadInventoryForInvoice", invoiceIdParameter);
}
public virtual ObjectResult LoginCustomer(string emailAddress, string password, string iPAddress)
{
var emailAddressParameter = emailAddress != null ?
new ObjectParameter("EmailAddress", emailAddress) :
new ObjectParameter("EmailAddress", typeof(string));
var passwordParameter = password != null ?
new ObjectParameter("Password", password) :
new ObjectParameter("Password", typeof(string));
var iPAddressParameter = iPAddress != null ?
new ObjectParameter("IPAddress", iPAddress) :
new ObjectParameter("IPAddress", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("LoginCustomer", emailAddressParameter, passwordParameter, iPAddressParameter);
}
public virtual ObjectResult LoginOperator(string username, string password)
{
var usernameParameter = username != null ?
new ObjectParameter("Username", username) :
new ObjectParameter("Username", typeof(string));
var passwordParameter = password != null ?
new ObjectParameter("Password", password) :
new ObjectParameter("Password", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("LoginOperator", usernameParameter, passwordParameter);
}
public virtual int PLSendMail(string server, string from, string recipients, string subject, string body)
{
var serverParameter = server != null ?
new ObjectParameter("server", server) :
new ObjectParameter("server", typeof(string));
var fromParameter = from != null ?
new ObjectParameter("from", from) :
new ObjectParameter("from", typeof(string));
var recipientsParameter = recipients != null ?
new ObjectParameter("recipients", recipients) :
new ObjectParameter("recipients", typeof(string));
var subjectParameter = subject != null ?
new ObjectParameter("subject", subject) :
new ObjectParameter("subject", typeof(string));
var bodyParameter = body != null ?
new ObjectParameter("body", body) :
new ObjectParameter("body", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("PLSendMail", serverParameter, fromParameter, recipientsParameter, subjectParameter, bodyParameter);
}
public virtual ObjectResult SaveFingerprint(Nullable operatorLoginId, byte[] fingerprint)
{
var operatorLoginIdParameter = operatorLoginId.HasValue ?
new ObjectParameter("OperatorLoginId", operatorLoginId) :
new ObjectParameter("OperatorLoginId", typeof(int));
var fingerprintParameter = fingerprint != null ?
new ObjectParameter("Fingerprint", fingerprint) :
new ObjectParameter("Fingerprint", typeof(byte[]));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("SaveFingerprint", operatorLoginIdParameter, fingerprintParameter);
}
[DbFunction("DataModel", "Split")]
public virtual IQueryable Split(string s, string delimiter)
{
var sParameter = s != null ?
new ObjectParameter("S", s) :
new ObjectParameter("S", typeof(string));
var delimiterParameter = delimiter != null ?
new ObjectParameter("Delimiter", delimiter) :
new ObjectParameter("Delimiter", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.CreateQuery("[DataModel].[Split](@S, @Delimiter)", sParameter, delimiterParameter);
}
public virtual ObjectResult UpdateCustomerInventory(Nullable customerId, Nullable inventoryItemTypeId, Nullable costGeneralWash, Nullable costRepeatWash, Nullable costStainWash, Nullable costRewashWash, Nullable operatorLoginId)
{
var customerIdParameter = customerId.HasValue ?
new ObjectParameter("CustomerId", customerId) :
new ObjectParameter("CustomerId", typeof(int));
var inventoryItemTypeIdParameter = inventoryItemTypeId.HasValue ?
new ObjectParameter("InventoryItemTypeId", inventoryItemTypeId) :
new ObjectParameter("InventoryItemTypeId", typeof(int));
var costGeneralWashParameter = costGeneralWash.HasValue ?
new ObjectParameter("CostGeneralWash", costGeneralWash) :
new ObjectParameter("CostGeneralWash", typeof(int));
var costRepeatWashParameter = costRepeatWash.HasValue ?
new ObjectParameter("CostRepeatWash", costRepeatWash) :
new ObjectParameter("CostRepeatWash", typeof(int));
var costStainWashParameter = costStainWash.HasValue ?
new ObjectParameter("CostStainWash", costStainWash) :
new ObjectParameter("CostStainWash", typeof(int));
var costRewashWashParameter = costRewashWash.HasValue ?
new ObjectParameter("CostRewashWash", costRewashWash) :
new ObjectParameter("CostRewashWash", typeof(int));
var operatorLoginIdParameter = operatorLoginId.HasValue ?
new ObjectParameter("OperatorLoginId", operatorLoginId) :
new ObjectParameter("OperatorLoginId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateCustomerInventory", customerIdParameter, inventoryItemTypeIdParameter, costGeneralWashParameter, costRepeatWashParameter, costStainWashParameter, costRewashWashParameter, operatorLoginIdParameter);
}
public virtual ObjectResult UpdateCustomerLogin(Nullable customerId, string emailAddress, string password, Nullable isActive, Nullable isLockedOut)
{
var customerIdParameter = customerId.HasValue ?
new ObjectParameter("CustomerId", customerId) :
new ObjectParameter("CustomerId", typeof(int));
var emailAddressParameter = emailAddress != null ?
new ObjectParameter("EmailAddress", emailAddress) :
new ObjectParameter("EmailAddress", typeof(string));
var passwordParameter = password != null ?
new ObjectParameter("Password", password) :
new ObjectParameter("Password", typeof(string));
var isActiveParameter = isActive.HasValue ?
new ObjectParameter("IsActive", isActive) :
new ObjectParameter("IsActive", typeof(bool));
var isLockedOutParameter = isLockedOut.HasValue ?
new ObjectParameter("IsLockedOut", isLockedOut) :
new ObjectParameter("IsLockedOut", typeof(bool));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateCustomerLogin", customerIdParameter, emailAddressParameter, passwordParameter, isActiveParameter, isLockedOutParameter);
}
public virtual ObjectResult UpdateCustomerWorkloadBag(Nullable customerLoginId, Nullable workloadId, string uniqueReference)
{
var customerLoginIdParameter = customerLoginId.HasValue ?
new ObjectParameter("CustomerLoginId", customerLoginId) :
new ObjectParameter("CustomerLoginId", typeof(int));
var workloadIdParameter = workloadId.HasValue ?
new ObjectParameter("WorkloadId", workloadId) :
new ObjectParameter("WorkloadId", typeof(int));
var uniqueReferenceParameter = uniqueReference != null ?
new ObjectParameter("UniqueReference", uniqueReference) :
new ObjectParameter("UniqueReference", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateCustomerWorkloadBag", customerLoginIdParameter, workloadIdParameter, uniqueReferenceParameter);
}
public virtual int UpdateInventoryItemType(string category, string itemType, string size, Nullable inventoryItemTypeId)
{
var categoryParameter = category != null ?
new ObjectParameter("Category", category) :
new ObjectParameter("Category", typeof(string));
var itemTypeParameter = itemType != null ?
new ObjectParameter("ItemType", itemType) :
new ObjectParameter("ItemType", typeof(string));
var sizeParameter = size != null ?
new ObjectParameter("Size", size) :
new ObjectParameter("Size", typeof(string));
var inventoryItemTypeIdParameter = inventoryItemTypeId.HasValue ?
new ObjectParameter("InventoryItemTypeId", inventoryItemTypeId) :
new ObjectParameter("InventoryItemTypeId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateInventoryItemType", categoryParameter, itemTypeParameter, sizeParameter, inventoryItemTypeIdParameter);
}
public virtual ObjectResult UpdateInvoiceItemCount(Nullable invoiceId, Nullable inventoryItemTypeId, Nullable count, Nullable operatorLoginId)
{
var invoiceIdParameter = invoiceId.HasValue ?
new ObjectParameter("InvoiceId", invoiceId) :
new ObjectParameter("InvoiceId", typeof(int));
var inventoryItemTypeIdParameter = inventoryItemTypeId.HasValue ?
new ObjectParameter("InventoryItemTypeId", inventoryItemTypeId) :
new ObjectParameter("InventoryItemTypeId", typeof(int));
var countParameter = count.HasValue ?
new ObjectParameter("Count", count) :
new ObjectParameter("Count", typeof(int));
var operatorLoginIdParameter = operatorLoginId.HasValue ?
new ObjectParameter("OperatorLoginId", operatorLoginId) :
new ObjectParameter("OperatorLoginId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateInvoiceItemCount", invoiceIdParameter, inventoryItemTypeIdParameter, countParameter, operatorLoginIdParameter);
}
public virtual ObjectResult UpdateOperatorLogin(string username, string password, Nullable operatorRoleId, string operatorShift)
{
var usernameParameter = username != null ?
new ObjectParameter("Username", username) :
new ObjectParameter("Username", typeof(string));
var passwordParameter = password != null ?
new ObjectParameter("Password", password) :
new ObjectParameter("Password", typeof(string));
var operatorRoleIdParameter = operatorRoleId.HasValue ?
new ObjectParameter("OperatorRoleId", operatorRoleId) :
new ObjectParameter("OperatorRoleId", typeof(int));
var operatorShiftParameter = operatorShift != null ?
new ObjectParameter("OperatorShift", operatorShift) :
new ObjectParameter("OperatorShift", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateOperatorLogin", usernameParameter, passwordParameter, operatorRoleIdParameter, operatorShiftParameter);
}
public virtual ObjectResult UpdateWorkloadItem(Nullable workloadId, Nullable customerInventoryId, Nullable itemCount, Nullable customerLoginId, Nullable operatorLoginId)
{
var workloadIdParameter = workloadId.HasValue ?
new ObjectParameter("WorkloadId", workloadId) :
new ObjectParameter("WorkloadId", typeof(int));
var customerInventoryIdParameter = customerInventoryId.HasValue ?
new ObjectParameter("CustomerInventoryId", customerInventoryId) :
new ObjectParameter("CustomerInventoryId", typeof(int));
var itemCountParameter = itemCount.HasValue ?
new ObjectParameter("ItemCount", itemCount) :
new ObjectParameter("ItemCount", typeof(int));
var customerLoginIdParameter = customerLoginId.HasValue ?
new ObjectParameter("CustomerLoginId", customerLoginId) :
new ObjectParameter("CustomerLoginId", typeof(int));
var operatorLoginIdParameter = operatorLoginId.HasValue ?
new ObjectParameter("OperatorLoginId", operatorLoginId) :
new ObjectParameter("OperatorLoginId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateWorkloadItem", workloadIdParameter, customerInventoryIdParameter, itemCountParameter, customerLoginIdParameter, operatorLoginIdParameter);
}
public virtual ObjectResult GetWorkloadInventoryForDispatch(Nullable dispatchId)
{
var dispatchIdParameter = dispatchId.HasValue ?
new ObjectParameter("DispatchId", dispatchId) :
new ObjectParameter("DispatchId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetWorkloadInventoryForDispatch", dispatchIdParameter);
}
public virtual ObjectResult GetCustomerInvoiceById(Nullable customerId)
{
var customerIdParameter = customerId.HasValue ?
new ObjectParameter("CustomerId", customerId) :
new ObjectParameter("CustomerId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCustomerInvoiceById", customerIdParameter);
}
public virtual ObjectResult UpdateInvoiceItemBadCount(Nullable invoiceId, Nullable inventoryItemTypeId, Nullable count, Nullable operatorLoginId)
{
var invoiceIdParameter = invoiceId.HasValue ?
new ObjectParameter("InvoiceId", invoiceId) :
new ObjectParameter("InvoiceId", typeof(int));
var inventoryItemTypeIdParameter = inventoryItemTypeId.HasValue ?
new ObjectParameter("InventoryItemTypeId", inventoryItemTypeId) :
new ObjectParameter("InventoryItemTypeId", typeof(int));
var countParameter = count.HasValue ?
new ObjectParameter("Count", count) :
new ObjectParameter("Count", typeof(int));
var operatorLoginIdParameter = operatorLoginId.HasValue ?
new ObjectParameter("OperatorLoginId", operatorLoginId) :
new ObjectParameter("OperatorLoginId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateInvoiceItemBadCount", invoiceIdParameter, inventoryItemTypeIdParameter, countParameter, operatorLoginIdParameter);
}
public virtual ObjectResult GetWorkloadInventoryForInvoice_backup_20140820(Nullable invoiceId)
{
var invoiceIdParameter = invoiceId.HasValue ?
new ObjectParameter("InvoiceId", invoiceId) :
new ObjectParameter("InvoiceId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetWorkloadInventoryForInvoice_backup_20140820", invoiceIdParameter);
}
public virtual int sp_alterdiagram(string diagramname, Nullable owner_id, Nullable version, byte[] definition)
{
var diagramnameParameter = diagramname != null ?
new ObjectParameter("diagramname", diagramname) :
new ObjectParameter("diagramname", typeof(string));
var owner_idParameter = owner_id.HasValue ?
new ObjectParameter("owner_id", owner_id) :
new ObjectParameter("owner_id", typeof(int));
var versionParameter = version.HasValue ?
new ObjectParameter("version", version) :
new ObjectParameter("version", typeof(int));
var definitionParameter = definition != null ?
new ObjectParameter("definition", definition) :
new ObjectParameter("definition", typeof(byte[]));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_alterdiagram", diagramnameParameter, owner_idParameter, versionParameter, definitionParameter);
}
public virtual int sp_creatediagram(string diagramname, Nullable owner_id, Nullable version, byte[] definition)
{
var diagramnameParameter = diagramname != null ?
new ObjectParameter("diagramname", diagramname) :
new ObjectParameter("diagramname", typeof(string));
var owner_idParameter = owner_id.HasValue ?
new ObjectParameter("owner_id", owner_id) :
new ObjectParameter("owner_id", typeof(int));
var versionParameter = version.HasValue ?
new ObjectParameter("version", version) :
new ObjectParameter("version", typeof(int));
var definitionParameter = definition != null ?
new ObjectParameter("definition", definition) :
new ObjectParameter("definition", typeof(byte[]));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_creatediagram", diagramnameParameter, owner_idParameter, versionParameter, definitionParameter);
}
public virtual int sp_dropdiagram(string diagramname, Nullable owner_id)
{
var diagramnameParameter = diagramname != null ?
new ObjectParameter("diagramname", diagramname) :
new ObjectParameter("diagramname", typeof(string));
var owner_idParameter = owner_id.HasValue ?
new ObjectParameter("owner_id", owner_id) :
new ObjectParameter("owner_id", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_dropdiagram", diagramnameParameter, owner_idParameter);
}
public virtual int sp_helpdiagramdefinition(string diagramname, Nullable owner_id)
{
var diagramnameParameter = diagramname != null ?
new ObjectParameter("diagramname", diagramname) :
new ObjectParameter("diagramname", typeof(string));
var owner_idParameter = owner_id.HasValue ?
new ObjectParameter("owner_id", owner_id) :
new ObjectParameter("owner_id", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_helpdiagramdefinition", diagramnameParameter, owner_idParameter);
}
public virtual int sp_helpdiagrams(string diagramname, Nullable owner_id)
{
var diagramnameParameter = diagramname != null ?
new ObjectParameter("diagramname", diagramname) :
new ObjectParameter("diagramname", typeof(string));
var owner_idParameter = owner_id.HasValue ?
new ObjectParameter("owner_id", owner_id) :
new ObjectParameter("owner_id", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_helpdiagrams", diagramnameParameter, owner_idParameter);
}
public virtual int sp_renamediagram(string diagramname, Nullable owner_id, string new_diagramname)
{
var diagramnameParameter = diagramname != null ?
new ObjectParameter("diagramname", diagramname) :
new ObjectParameter("diagramname", typeof(string));
var owner_idParameter = owner_id.HasValue ?
new ObjectParameter("owner_id", owner_id) :
new ObjectParameter("owner_id", typeof(int));
var new_diagramnameParameter = new_diagramname != null ?
new ObjectParameter("new_diagramname", new_diagramname) :
new ObjectParameter("new_diagramname", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_renamediagram", diagramnameParameter, owner_idParameter, new_diagramnameParameter);
}
public virtual int sp_upgraddiagrams()
{
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_upgraddiagrams");
}
public virtual int SendMail(string p_strSubject, string p_strRecipients, string p_from_address, string p_strBody, string p_cc)
{
var p_strSubjectParameter = p_strSubject != null ?
new ObjectParameter("p_strSubject", p_strSubject) :
new ObjectParameter("p_strSubject", typeof(string));
var p_strRecipientsParameter = p_strRecipients != null ?
new ObjectParameter("p_strRecipients", p_strRecipients) :
new ObjectParameter("p_strRecipients", typeof(string));
var p_from_addressParameter = p_from_address != null ?
new ObjectParameter("p_from_address", p_from_address) :
new ObjectParameter("p_from_address", typeof(string));
var p_strBodyParameter = p_strBody != null ?
new ObjectParameter("p_strBody", p_strBody) :
new ObjectParameter("p_strBody", typeof(string));
var p_ccParameter = p_cc != null ?
new ObjectParameter("p_cc", p_cc) :
new ObjectParameter("p_cc", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("SendMail", p_strSubjectParameter, p_strRecipientsParameter, p_from_addressParameter, p_strBodyParameter, p_ccParameter);
}
public virtual ObjectResult GetCustomerPricingPercentages()
{
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCustomerPricingPercentages");
}
public virtual int UpdateCustomerInventoryByPercentages(Nullable operatorLoginId)
{
var operatorLoginIdParameter = operatorLoginId.HasValue ?
new ObjectParameter("OperatorLoginId", operatorLoginId) :
new ObjectParameter("OperatorLoginId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateCustomerInventoryByPercentages", operatorLoginIdParameter);
}
public virtual ObjectResult GetWorkloadInventoryForDispatches(Nullable deliveryId)
{
var deliveryIdParameter = deliveryId.HasValue ?
new ObjectParameter("DeliveryId", deliveryId) :
new ObjectParameter("DeliveryId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetWorkloadInventoryForDispatches", deliveryIdParameter);
}
public virtual int UpdateDispatchDeliveryId(string dispatchIds)
{
var dispatchIdsParameter = dispatchIds != null ?
new ObjectParameter("DispatchIds", dispatchIds) :
new ObjectParameter("DispatchIds", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateDispatchDeliveryId", dispatchIdsParameter);
}
public virtual ObjectResult UpdateDeliveryId(string dispatchIds)
{
var dispatchIdsParameter = dispatchIds != null ?
new ObjectParameter("DispatchIds", dispatchIds) :
new ObjectParameter("DispatchIds", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateDeliveryId", dispatchIdsParameter);
}
public virtual ObjectResult UpdateDispatchDelivery(string dispatchIds)
{
var dispatchIdsParameter = dispatchIds != null ?
new ObjectParameter("DispatchIds", dispatchIds) :
new ObjectParameter("DispatchIds", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateDispatchDelivery", dispatchIdsParameter);
}
public virtual ObjectResult UpdateDispatchDelivery1(string dispatchIds)
{
var dispatchIdsParameter = dispatchIds != null ?
new ObjectParameter("DispatchIds", dispatchIds) :
new ObjectParameter("DispatchIds", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateDispatchDelivery1", dispatchIdsParameter);
}
public virtual ObjectResult UpdateDispatchDelivery2(string dispatchIds)
{
var dispatchIdsParameter = dispatchIds != null ?
new ObjectParameter("DispatchIds", dispatchIds) :
new ObjectParameter("DispatchIds", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateDispatchDelivery2", dispatchIdsParameter);
}
public virtual ObjectResult GetWorkloadInventoryForDispatches2016(string dispatchId)
{
var dispatchIdParameter = dispatchId != null ?
new ObjectParameter("DispatchId", dispatchId) :
new ObjectParameter("DispatchId", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetWorkloadInventoryForDispatches2016", dispatchIdParameter);
}
public virtual int UpdateCondemnedPrintedForDispatches(string dispatchId)
{
var dispatchIdParameter = dispatchId != null ?
new ObjectParameter("DispatchId", dispatchId) :
new ObjectParameter("DispatchId", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateCondemnedPrintedForDispatches", dispatchIdParameter);
}
public virtual ObjectResult GetDeliveryNoteCategoriesByBagSeal(string bagIds)
{
var bagIdsParameter = bagIds != null ?
new ObjectParameter("BagIds", bagIds) :
new ObjectParameter("BagIds", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetDeliveryNoteCategoriesByBagSeal", bagIdsParameter);
}
public virtual ObjectResult GetWorkloadInventoryForDelivery(Nullable deliveryId)
{
var deliveryIdParameter = deliveryId.HasValue ?
new ObjectParameter("DeliveryId", deliveryId) :
new ObjectParameter("DeliveryId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetWorkloadInventoryForDelivery", deliveryIdParameter);
}
public virtual ObjectResult GetDispatchesReadyToPrint(Nullable customerid)
{
var customeridParameter = customerid.HasValue ?
new ObjectParameter("Customerid", customerid) :
new ObjectParameter("Customerid", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetDispatchesReadyToPrint", customeridParameter);
}
public virtual ObjectResult GetDispatchesReadyToExport(string startDate, string endDate)
{
var startDateParameter = startDate != null ?
new ObjectParameter("startDate", startDate) :
new ObjectParameter("startDate", typeof(string));
var endDateParameter = endDate != null ?
new ObjectParameter("endDate", endDate) :
new ObjectParameter("endDate", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetDispatchesReadyToExport", startDateParameter, endDateParameter);
}
public virtual ObjectResult GetCustomerEmail(Nullable workloadId)
{
var workloadIdParameter = workloadId.HasValue ?
new ObjectParameter("workloadId", workloadId) :
new ObjectParameter("workloadId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCustomerEmail", workloadIdParameter);
}
public virtual ObjectResult> CheckCustomerInventoryCost(string itemType, Nullable workloadid)
{
var itemTypeParameter = itemType != null ?
new ObjectParameter("itemType", itemType) :
new ObjectParameter("itemType", typeof(string));
var workloadidParameter = workloadid.HasValue ?
new ObjectParameter("workloadid", workloadid) :
new ObjectParameter("workloadid", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("CheckCustomerInventoryCost", itemTypeParameter, workloadidParameter);
}
public virtual ObjectResult> CheckCustomerInventoryItemCost(string itemType, string itemTypeCategory, Nullable workloadid)
{
var itemTypeParameter = itemType != null ?
new ObjectParameter("itemType", itemType) :
new ObjectParameter("itemType", typeof(string));
var itemTypeCategoryParameter = itemTypeCategory != null ?
new ObjectParameter("itemTypeCategory", itemTypeCategory) :
new ObjectParameter("itemTypeCategory", typeof(string));
var workloadidParameter = workloadid.HasValue ?
new ObjectParameter("workloadid", workloadid) :
new ObjectParameter("workloadid", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("CheckCustomerInventoryItemCost", itemTypeParameter, itemTypeCategoryParameter, workloadidParameter);
}
public virtual ObjectResult> CheckCustomerInventoryItemSizeCost(Nullable itemTypeId, Nullable workloadid)
{
var itemTypeIdParameter = itemTypeId.HasValue ?
new ObjectParameter("itemTypeId", itemTypeId) :
new ObjectParameter("itemTypeId", typeof(int));
var workloadidParameter = workloadid.HasValue ?
new ObjectParameter("workloadid", workloadid) :
new ObjectParameter("workloadid", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("CheckCustomerInventoryItemSizeCost", itemTypeIdParameter, workloadidParameter);
}
public virtual ObjectResult GetCustomerCCEmail(Nullable workloadId)
{
var workloadIdParameter = workloadId.HasValue ?
new ObjectParameter("workloadId", workloadId) :
new ObjectParameter("workloadId", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCustomerCCEmail", workloadIdParameter);
}
public virtual int UpdateCondemnedPrintedForDelivery(Nullable deliveryId, string dispatchId)
{
var deliveryIdParameter = deliveryId.HasValue ?
new ObjectParameter("DeliveryId", deliveryId) :
new ObjectParameter("DeliveryId", typeof(int));
var dispatchIdParameter = dispatchId != null ?
new ObjectParameter("DispatchId", dispatchId) :
new ObjectParameter("DispatchId", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("UpdateCondemnedPrintedForDelivery", deliveryIdParameter, dispatchIdParameter);
}
public virtual ObjectResult GetDuplicatePrelists(string startDate, string endDate)
{
var startDateParameter = startDate != null ?
new ObjectParameter("startDate", startDate) :
new ObjectParameter("startDate", typeof(string));
var endDateParameter = endDate != null ?
new ObjectParameter("endDate", endDate) :
new ObjectParameter("endDate", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetDuplicatePrelists", startDateParameter, endDateParameter);
}
public virtual int CreateDeliveryOperator(Nullable deliveryId, Nullable operatorLoginId, string deviceName, string posPrinter)
{
var deliveryIdParameter = deliveryId.HasValue ?
new ObjectParameter("DeliveryId", deliveryId) :
new ObjectParameter("DeliveryId", typeof(int));
var operatorLoginIdParameter = operatorLoginId.HasValue ?
new ObjectParameter("OperatorLoginId", operatorLoginId) :
new ObjectParameter("OperatorLoginId", typeof(int));
var deviceNameParameter = deviceName != null ?
new ObjectParameter("DeviceName", deviceName) :
new ObjectParameter("DeviceName", typeof(string));
var posPrinterParameter = posPrinter != null ?
new ObjectParameter("PosPrinter", posPrinter) :
new ObjectParameter("PosPrinter", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("CreateDeliveryOperator", deliveryIdParameter, operatorLoginIdParameter, deviceNameParameter, posPrinterParameter);
}
public virtual ObjectResult rptOutstandingOrders(Nullable p_CustomerID)
{
var p_CustomerIDParameter = p_CustomerID.HasValue ?
new ObjectParameter("p_CustomerID", p_CustomerID) :
new ObjectParameter("p_CustomerID", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("rptOutstandingOrders", p_CustomerIDParameter);
}
public virtual ObjectResult rptOutstandingOrders_Items(Nullable p_CustomerID, string p_StartDate, string p_EndDate)
{
var p_CustomerIDParameter = p_CustomerID.HasValue ?
new ObjectParameter("p_CustomerID", p_CustomerID) :
new ObjectParameter("p_CustomerID", typeof(int));
var p_StartDateParameter = p_StartDate != null ?
new ObjectParameter("p_StartDate", p_StartDate) :
new ObjectParameter("p_StartDate", typeof(string));
var p_EndDateParameter = p_EndDate != null ?
new ObjectParameter("p_EndDate", p_EndDate) :
new ObjectParameter("p_EndDate", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("rptOutstandingOrders_Items", p_CustomerIDParameter, p_StartDateParameter, p_EndDateParameter);
}
public virtual ObjectResult rptBagReconDeliveries(Nullable p_CustomerID, string p_StartDate, string p_EndDate)
{
var p_CustomerIDParameter = p_CustomerID.HasValue ?
new ObjectParameter("p_CustomerID", p_CustomerID) :
new ObjectParameter("p_CustomerID", typeof(int));
var p_StartDateParameter = p_StartDate != null ?
new ObjectParameter("p_StartDate", p_StartDate) :
new ObjectParameter("p_StartDate", typeof(string));
var p_EndDateParameter = p_EndDate != null ?
new ObjectParameter("p_EndDate", p_EndDate) :
new ObjectParameter("p_EndDate", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("rptBagReconDeliveries", p_CustomerIDParameter, p_StartDateParameter, p_EndDateParameter);
}
public virtual ObjectResult rptBagReconPickups(Nullable p_CustomerID, string p_StartDate, string p_EndDate)
{
var p_CustomerIDParameter = p_CustomerID.HasValue ?
new ObjectParameter("p_CustomerID", p_CustomerID) :
new ObjectParameter("p_CustomerID", typeof(int));
var p_StartDateParameter = p_StartDate != null ?
new ObjectParameter("p_StartDate", p_StartDate) :
new ObjectParameter("p_StartDate", typeof(string));
var p_EndDateParameter = p_EndDate != null ?
new ObjectParameter("p_EndDate", p_EndDate) :
new ObjectParameter("p_EndDate", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("rptBagReconPickups", p_CustomerIDParameter, p_StartDateParameter, p_EndDateParameter);
}
}
}