示例#1
0
        public DOCUMENT_DATA Remove(DOCUMENT_DATA remove, string user)
        {
            remove.last_modified_by   = user;
            remove.date_last_modified = DateTime.Now;
            var doc = _context.DOCUMENTS.Remove(remove);

            _context.SaveChanges();
            return(doc.Entity);
        }
示例#2
0
        public DOCUMENT_DATA Update(DOCUMENT_DATA update, string user)
        {
            update.last_modified_by   = user;
            update.date_last_modified = DateTime.Now;
            var doc = _context.DOCUMENTS.Update(update);

            _context.SaveChanges();
            return(doc.Entity);
        }
示例#3
0
        public DOCUMENT_DATA Add(DOCUMENT_DATA add, string user)
        {
            add.last_modified_by   = user;
            add.date_last_modified = DateTime.Now;
            add.date_created       = DateTime.Now;
            add.created_by         = user;
            var doc = _context.DOCUMENTS.Add(add);

            _context.SaveChanges();
            return(doc.Entity);
        }