Ejemplo n.º 1
0
        public ActionResult GetRequestHistoryByRequestID(int _requestID, int?_skip)
        {
            //Note:- Only in case of Email Pop Up  emailRecordId act as RFARequestID & FileTypeId is -1 -----------------//
            var          _requestHistory = _intakeService.getRequestHistoryByRFARequestID(_requestID, _skip.Value, GlobalConst.Records.Take);
            string       a             = System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString();// +"\\" + _rfaRFAReferralFile.RFAReferralFileName;
            StorageModel _storageModel = new StorageModel();

            RequestHistoryViewModel _RequestHistoryViewModel = new RequestHistoryViewModel();

            _RequestHistoryViewModel.RequestHistoryDetails = Mapper.Map <IEnumerable <RequestHistory> >(_requestHistory.RequestHistoryDetails);
            foreach (var reqhistory in _RequestHistoryViewModel.RequestHistoryDetails)
            {
                if (reqhistory.FileTypeId != -1)
                {
                    if (reqhistory.FileTypeId == 6)
                    {
                        string path = System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString();
                        reqhistory.FileFullPath = path + GlobalConst.ConstantChar.DoubleBackSlash + "IntakeUploadFiles" + GlobalConst.ConstantChar.DoubleBackSlash + reqhistory.filename;
                    }
                    else
                    {
                        _storageModel            = Mapper.Map <StorageModel>(_commonService.GetStorageStuctureByID(reqhistory.RFAReferralID, 'R'));
                        _storageModel.FolderName = GlobalConst.FolderName.LegalDocs;
                        _storageModel.path       = System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString();
                        reqhistory.FileFullPath  = _storageService.GeneateStorage(_storageModel) + GlobalConst.ConstantChar.DoubleBackSlash + reqhistory.filename;
                    }
                }
            }
            _RequestHistoryViewModel.TotalCount = _requestHistory.TotalCount;

            int _rFAReferralID = _intakeService.getRFARequestByID(_requestID).RFAReferralID.Value;

            _RequestHistoryViewModel.NotificationProcessLevelCheck = _commonService.getProcessLevelsByReferralID(_rFAReferralID).Where(rk => rk.ProcessLevel > GlobalConst.ProcessLevel.Notifications).Count() > 0 ? 1 : 0;
            _RequestHistoryViewModel.CliniclAuditProcessLevelCheck = _commonService.getProcessLevelsByReferralID(_rFAReferralID).Where(rk => rk.ProcessLevel == GlobalConst.ProcessLevel.Notifications).Count() > 0 ? 1 : 0;



            return(Json(_RequestHistoryViewModel, GlobalConst.ContentTypes.TextHtml));
        }