コード例 #1
0
        /// <summary>
        /// Returns a new blank document should only be used for the copy document method
        /// </summary>
        /// <param name="TypeId">Document Type Id</param>
        /// <returns>The will return a new document of the type specified</returns>
        public static DB.SYS_DOC_Header New(SYS_DOC_Type type)
        {
            DB.SYS_DOC_Header document = SYS_DOC_Header.New;
            document.TypeId = (byte)type;
            //Tried to do this here but the server cant save for some reason
            //document.SYS_Tracking = SYS.SYS_Tracking.New;
            //document.ORG_TRX_Header.Add(BL.ORG.ORG_TRX_Header.New);

            return(document);
        }
コード例 #2
0
ファイル: SYS_DOC_Header.cs プロジェクト: tslekwadi/CDS
        public static DB.SYS_DOC_Header LoadByTrackId(Int64 trackId, SYS_DOC_Type type, DataContext dataContext, List <string> includes)
        {
            var query = dataContext.EntitySystemContext.SYS_DOC_Header.AsQueryable();

            if (includes != null)
            {
                foreach (string include in includes)
                {
                    query = query.Include(include);
                }
            }

            return(query.FirstOrDefault(n => n.TrackId == trackId && n.TypeId == (byte)type && n.SiteId == ApplicationDataContext.Instance.LoggedInUser.DefaultSiteId));
        }
コード例 #3
0
ファイル: SYS_DOC_Header.cs プロジェクト: tslekwadi/CDS
 public static DB.SYS_DOC_Header LoadByTrackId(Int64 Id, SYS_DOC_Type type, DataContext dataContext)
 {
     return(LoadByTrackId(Id, type, dataContext, null));
 }