예제 #1
0
        public ResponseModel DeleteClaimCategory(int CategoryID)
        {
            MasterCaller  newMasterCategory = new MasterCaller();
            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));

                int result = newMasterCategory.DeleteClaimCategory(new CategoryServices(_connectioSting), CategoryID, authenticate.TenantId);
                statusCode =
                    result == 0 ?
                    (int)EnumMaster.StatusCode.RecordNotFound : (int)EnumMaster.StatusCode.Success;
                statusMessage               = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode);
                objResponseModel.Status     = true;
                objResponseModel.StatusCode = statusCode;
                objResponseModel.Message    = statusMessage;
            }
            catch (Exception)
            {
                throw;
            }
            return(objResponseModel);
        }