コード例 #1
0
        public ResponseModel GetFileUploadLogs()
        {
            ResponseModel         objResponseModel   = new ResponseModel();
            List <FileUploadLogs> objFileUploadModel = new List <FileUploadLogs>();
            int    statusCode    = 0;
            string statusMessage = "";
            int    fileUploadFor = 0;

            try
            {
                //Get token (Double encrypted) and get the tenant id
                string       token        = Convert.ToString(Request.Headers["X-Authorized-Token"]);
                Authenticate authenticate = new Authenticate();
                authenticate = SecurityService.GetAuthenticateDataFromTokenCache(Cache, SecurityService.DecryptStringAES(token));

                SettingsCaller newAlert = new SettingsCaller();

                objFileUploadModel = newAlert.GetFileUploadLogs(new FileUploadService(Cache, Db), authenticate.TenantId, fileUploadFor);
                statusCode         = objFileUploadModel.Count == 0 ? (int)EnumMaster.StatusCode.RecordNotFound : (int)EnumMaster.StatusCode.Success;

                statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode);

                objResponseModel.Status       = true;
                objResponseModel.StatusCode   = statusCode;
                objResponseModel.Message      = statusMessage;
                objResponseModel.ResponseData = objFileUploadModel;
            }
            catch (Exception)
            {
                throw;
            }

            return(objResponseModel);
        }