Exemplo n.º 1
0
        public ResponseModel GetCategoryListByMultiBrandID(string BrandIDs)
        {
            List <Category> objcategory      = new List <Category>();
            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.GetAuthenticateDataFromTokenCache(Cache, SecurityService.DecryptStringAES(token));
                MasterCaller newMasterCategory = new MasterCaller();

                objcategory = newMasterCategory.GetCategoryListByMultiBrandID(new CategoryServices(Cache, Db), BrandIDs, authenticate.TenantId);
                statusCode  =
                    objcategory.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 = objcategory;
            }
            catch (Exception)
            {
                throw;
            }
            return(objResponseModel);
        }