Exemplo n.º 1
0
        public override object Save <T>(T entity)
        {
            BO.Common.UploadInfo uploadInfo = (BO.Common.UploadInfo)(object) entity;
            BO.Document          docInfo    = new BO.Document();

            switch (uploadInfo.ObjectType.ToUpper())
            {
            case EN.Constants.CaseType:
                //case EN.Constants.ConsentType:
                CaseDocumentRepository CaseDocumentRepository = new CaseDocumentRepository(_context);
                docInfo = (BO.Document)CaseDocumentRepository.SaveAsBlob(uploadInfo.ObjectId, uploadInfo.CompanyId, uploadInfo.ObjectType, uploadInfo.DocumentType, uploadInfo.BlobPath);
                break;

            case EN.Constants.VisitType:
                VisitDocumentRepository VisitDocumentRepository = new VisitDocumentRepository(_context);
                docInfo = (BO.Document)VisitDocumentRepository.SaveAsBlob(uploadInfo.ObjectId, uploadInfo.CompanyId, uploadInfo.ObjectType, uploadInfo.DocumentType, uploadInfo.BlobPath);
                break;

            case EN.Constants.PatientType:
                PatientDocumentRepository PatientDocumentRepository = new PatientDocumentRepository(_context);
                docInfo = (BO.Document)PatientDocumentRepository.SaveAsBlob(uploadInfo.ObjectId, uploadInfo.CompanyId, uploadInfo.ObjectType, uploadInfo.DocumentType, uploadInfo.BlobPath);
                break;
            }

            return(docInfo);
        }
Exemplo n.º 2
0
        public override object SaveAsBlob(int ObjectId, int CompanyId, string DocumentObject, string DocumentType, string uploadpath)
        {
            BO.Document docInfo = new BO.Document();

            switch (DocumentObject.ToUpper())
            {
            case EN.Constants.CaseType:
                CaseDocumentRepository CaseDocumentRepository = new CaseDocumentRepository(_context);

                docInfo = (BO.Document)CaseDocumentRepository.SaveAsBlob(ObjectId, CompanyId, DocumentObject, DocumentType, uploadpath);
                break;

            case EN.Constants.VisitType:
                VisitDocumentRepository VisitDocumentRepository = new VisitDocumentRepository(_context);
                docInfo = (BO.Document)VisitDocumentRepository.SaveAsBlob(ObjectId, CompanyId, DocumentObject, DocumentType, uploadpath);
                break;

            case EN.Constants.PatientType:
                PatientDocumentRepository PatientDocumentRepository = new PatientDocumentRepository(_context);
                docInfo = (BO.Document)PatientDocumentRepository.SaveAsBlob(ObjectId, CompanyId, DocumentObject, DocumentType, uploadpath);
                break;
            }

            return(docInfo);
        }