示例#1
0
        public ResponseModel GetClaimSubCategoryByCategoryOnSearch(int CategoryID, string searchText)
        {
            List <SubCategory> objSubCategory   = new List <SubCategory>();
            ResponseModel      objResponseModel = new ResponseModel();
            int    StatusCode    = 0;
            string statusMessage = "";

            try
            {
                MasterCaller newMasterSubCat = new MasterCaller();

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

                objSubCategory = newMasterSubCat.GetClaimSubCategoryByCategoryOnSearch(new CategoryServices(_connectioSting), authenticate.TenantId, CategoryID, searchText);

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

            return(objResponseModel);
        }