public JsonResult Delete(System.Int32 id)
        {
            RemovePosMerchantRequest request = new RemovePosMerchantRequest();

            request.MerchantId = id;
            RemovePosMerchantResponse response = _posMerchantService.RemovePosMerchant(request);

            return(Json(response));
        }
Пример #2
0
        public RemovePosMerchantResponse RemovePosMerchant(RemovePosMerchantRequest request)
        {
            RemovePosMerchantResponse response = new RemovePosMerchantResponse();

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