Exemplo n.º 1
0
        public List <Category> GetClaimCategoryListByBrandID(int BrandID)
        {
            List <Category> objCategoryList  = new List <Category>();
            ResponseModel   objResponseModel = new ResponseModel();
            int             StatusCode       = 0;
            string          statusMessage    = "";

            try
            {
                if (BrandID == 0)
                {
                    return(objCategoryList);
                }

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

                MasterCaller newMasterCategory = new MasterCaller();
                objCategoryList = newMasterCategory.GetClaimCategoryList(new CategoryServices(_connectioSting), authenticate.TenantId, BrandID);

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