Files
StockMan/StockManMVC/Models/SMModel.Context.cs
T
2016-09-29 23:47:10 +02:00

124 lines
5.7 KiB
C#

//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
namespace StockManMVC.Models
{
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.Core.Objects;
using System.Linq;
public partial class StockManEntities : DbContext
{
public StockManEntities()
: base("name=StockManEntities")
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
public virtual DbSet<ItemFlux> ItemFlux { get; set; }
public virtual DbSet<ItemStock> ItemStock { get; set; }
public virtual DbSet<Location> Location { get; set; }
public virtual DbSet<LocType> LocType { get; set; }
public virtual DbSet<MovType> MovType { get; set; }
public virtual DbSet<ItemFamily> ItemFamily { get; set; }
public virtual DbSet<Item> Item { get; set; }
public virtual DbSet<Operator> Operator { get; set; }
public virtual DbSet<vItemFlux2Save> vItemFlux2Save { get; set; }
public virtual DbSet<vLocationVal> vLocationVal { get; set; }
public virtual int stp_ItemConsolidate(Nullable<int> itemID)
{
var itemIDParameter = itemID.HasValue ?
new ObjectParameter("ItemID", itemID) :
new ObjectParameter("ItemID", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_ItemConsolidate", itemIDParameter);
}
public virtual ObjectResult<Item> stp_ItemDuplicate(Nullable<int> original_ID)
{
var original_IDParameter = original_ID.HasValue ?
new ObjectParameter("Original_ID", original_ID) :
new ObjectParameter("Original_ID", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Item>("stp_ItemDuplicate", original_IDParameter);
}
public virtual ObjectResult<Item> stp_ItemDuplicate(Nullable<int> original_ID, MergeOption mergeOption)
{
var original_IDParameter = original_ID.HasValue ?
new ObjectParameter("Original_ID", original_ID) :
new ObjectParameter("Original_ID", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Item>("stp_ItemDuplicate", mergeOption, original_IDParameter);
}
public virtual int stp_ItemStockMove(Nullable<int> stockID, string locationID_FROM, string locationID_TO, string operatorID)
{
var stockIDParameter = stockID.HasValue ?
new ObjectParameter("StockID", stockID) :
new ObjectParameter("StockID", typeof(int));
var locationID_FROMParameter = locationID_FROM != null ?
new ObjectParameter("LocationID_FROM", locationID_FROM) :
new ObjectParameter("LocationID_FROM", typeof(string));
var locationID_TOParameter = locationID_TO != null ?
new ObjectParameter("LocationID_TO", locationID_TO) :
new ObjectParameter("LocationID_TO", typeof(string));
var operatorIDParameter = operatorID != null ?
new ObjectParameter("OperatorID", operatorID) :
new ObjectParameter("OperatorID", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_ItemStockMove", stockIDParameter, locationID_FROMParameter, locationID_TOParameter, operatorIDParameter);
}
public virtual int stp_ItemStockMove_New(Nullable<int> stockID, string locationID_FROM, string locationID_TO, string operatorID, Nullable<int> qtyMov)
{
var stockIDParameter = stockID.HasValue ?
new ObjectParameter("StockID", stockID) :
new ObjectParameter("StockID", typeof(int));
var locationID_FROMParameter = locationID_FROM != null ?
new ObjectParameter("LocationID_FROM", locationID_FROM) :
new ObjectParameter("LocationID_FROM", typeof(string));
var locationID_TOParameter = locationID_TO != null ?
new ObjectParameter("LocationID_TO", locationID_TO) :
new ObjectParameter("LocationID_TO", typeof(string));
var operatorIDParameter = operatorID != null ?
new ObjectParameter("OperatorID", operatorID) :
new ObjectParameter("OperatorID", typeof(string));
var qtyMovParameter = qtyMov.HasValue ?
new ObjectParameter("QtyMov", qtyMov) :
new ObjectParameter("QtyMov", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_ItemStockMove_New", stockIDParameter, locationID_FROMParameter, locationID_TOParameter, operatorIDParameter, qtyMovParameter);
}
public virtual int stp_ItemShrinkHist(Nullable<int> itemID)
{
var itemIDParameter = itemID.HasValue ?
new ObjectParameter("ItemID", itemID) :
new ObjectParameter("ItemID", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_ItemShrinkHist", itemIDParameter);
}
}
}