//------------------------------------------------------------------------------
// <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 FAS_LIB
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;
    using System.Data.Entity.Core.Objects;
    using System.Linq;
    
    public partial class SE0085CTEntities1 : DbContext
    {
        public SE0085CTEntities1()
            : base("name=SE0085CTEntities1")
        {
        }
    
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            throw new UnintentionalCodeFirstException();
        }
    
        public virtual DbSet<AssemblyLine> AssemblyLines { get; set; }
        public virtual DbSet<AssocAssignType> AssocAssignTypes { get; set; }
        public virtual DbSet<Associate> Associates { get; set; }
        public virtual DbSet<AssocLookup> AssocLookups { get; set; }
        public virtual DbSet<OrderLine> OrderLines { get; set; }
        public virtual DbSet<OrdFASExt> OrdFASExts { get; set; }
        public virtual DbSet<OrdFASExtDtl> OrdFASExtDtls { get; set; }
        public virtual DbSet<OrdSection> OrdSections { get; set; }
        public virtual DbSet<SEOrder> SEOrders { get; set; }
        public virtual DbSet<SEPlant> SEPlants { get; set; }
        public virtual DbSet<mdsq2ccd> mdsq2ccd { get; set; }
        public virtual DbSet<FASDtlReqSect> FASDtlReqSects { get; set; }
        public virtual DbSet<FASDtlRequestInt> FASDtlRequestInts { get; set; }
        public virtual DbSet<AssyPart> AssyParts { get; set; }
        public virtual DbSet<OrdLineAssocAssigned> OrdLineAssocAssigneds { get; set; }
        public virtual DbSet<SectionsRouting> SectionsRoutings { get; set; }
        public virtual DbSet<OrderLinesExt> OrderLinesExts { get; set; }
        public virtual DbSet<RoutingSeq> RoutingSeqs { get; set; }
        public virtual DbSet<SectLaborContentVw> SectLaborContentVws { get; set; }
        public virtual DbSet<OrderLineComment> OrderLineComments { get; set; }
        public virtual DbSet<OrderFollowUpType> OrderFollowUpTypes { get; set; }
        public virtual DbSet<OrderLineStat> OrderLineStats { get; set; }
        public virtual DbSet<HolidayList> HolidayLists { get; set; }
        public virtual DbSet<GatexRef> GatexRefs { get; set; }
        public virtual DbSet<LaborVoucher> LaborVouchers { get; set; }
    
        public virtual int sp_CloseFASOrder(string pFASAsmbLn, string pFASOrdNbr, Nullable<int> pOrdSectsNum, Nullable<int> pQtyComplete)
        {
            var pFASAsmbLnParameter = pFASAsmbLn != null ?
                new ObjectParameter("pFASAsmbLn", pFASAsmbLn) :
                new ObjectParameter("pFASAsmbLn", typeof(string));
    
            var pFASOrdNbrParameter = pFASOrdNbr != null ?
                new ObjectParameter("pFASOrdNbr", pFASOrdNbr) :
                new ObjectParameter("pFASOrdNbr", typeof(string));
    
            var pOrdSectsNumParameter = pOrdSectsNum.HasValue ?
                new ObjectParameter("pOrdSectsNum", pOrdSectsNum) :
                new ObjectParameter("pOrdSectsNum", typeof(int));
    
            var pQtyCompleteParameter = pQtyComplete.HasValue ?
                new ObjectParameter("pQtyComplete", pQtyComplete) :
                new ObjectParameter("pQtyComplete", typeof(int));
    
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_CloseFASOrder", pFASAsmbLnParameter, pFASOrdNbrParameter, pOrdSectsNumParameter, pQtyCompleteParameter);
        }
    }
}
