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; } //docInfo = (BO.Document)fileUploadManager.SaveBlob(streamContent, ObjectId, DocumentObject, uploadpath); return(docInfo); }
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; } //docInfo = (BO.Document)fileUploadManager.SaveBlob(streamContent, ObjectId, DocumentObject, uploadpath); return(docInfo); }