コード例 #1
0
        public JsonResult Delete(System.String id)
        {
            RemoveCustomerDemographicRequest request = new RemoveCustomerDemographicRequest();

            request.CustomerTypeID = id;
            RemoveCustomerDemographicResponse response = _customerDemographicService.RemoveCustomerDemographic(request);

            return(Json(response));
        }
コード例 #2
0
        public RemoveCustomerDemographicResponse RemoveCustomerDemographic(RemoveCustomerDemographicRequest request)
        {
            RemoveCustomerDemographicResponse response = new RemoveCustomerDemographicResponse();

            response.Errors = new List <BusinessRule>();
            try {
                if (_customerDemographicRepository.Remove(request.CustomerTypeID) > 0)
                {
                    response.CustomerDemographicDeleted = true;
                }
            } catch (Exception ex)
            {
                response.Errors.Add(new BusinessRule("DAL", "DAL_ERROR: " + ex.Message));
            }
            return(response);
        }