Example #1
0
        public ResponseModel GetClaimIssueTypeOnSearch(int SubCategoryID, string searchText)
        {
            List <IssueType> objIssueTypeList = new List <IssueType>();
            ResponseModel    objResponseModel = new ResponseModel();
            int    StatusCode    = 0;
            string statusMessage = "";

            try
            {
                string       token        = Convert.ToString(Request.Headers["X-Authorized-Token"]);
                Authenticate authenticate = new Authenticate();
                authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token));


                MasterCaller newMasterBrand = new MasterCaller();

                objIssueTypeList = newMasterBrand.GetClaimIssueTypeOnSearch(new CategoryServices(_connectioSting), authenticate.TenantId, SubCategoryID, searchText);

                StatusCode =
                    objIssueTypeList.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 = objIssueTypeList;
            }
            catch (Exception)
            {
                throw;
            }

            return(objResponseModel);
        }