Beispiel #1
0
        public SimpleResponse <PaymentDto> Create(PaymentDto dto)
        {
            var response = new SimpleResponse <PaymentDto>();

            try
            {
                var model = SimpleMapper.Map <PaymentDto, PaymentViewModel>(dto);
                var resp  = iPaymentBusiness.Create(model);
                response = new SimpleResponse <PaymentDto>()
                {
                    ResponseCode    = resp.ResponseCode,
                    ResponseMessage = resp.ResponseMessage,
                    RCode           = resp.RCode
                };

                response.Data = SimpleMapper.Map <PaymentViewModel, PaymentDto>(resp.Data);
            }
            catch (Exception ex)
            {
                response.ResponseCode    = BusinessResponseValues.InternalError;
                response.ResponseMessage = "Okuma iþleminde hata oluþtu.";
                SimpleFileLogger.Instance.Error(ex);
            }

            return(response);
        }
Beispiel #2
0
        public IHttpActionResult CreatePost(PaymentViewModel model)
        {
            var response = new SimpleResponse <PaymentViewModel>();

            response = iPaymentBusiness.Create(model);
            return(Json(response));
        }
Beispiel #3
0
        public IActionResult CreatePost(PaymentViewModel model)
        {
            var response = iPaymentBusiness.Create(model);

            if (response.ResponseCode > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError(string.Empty, response.ResponseMessage);
                return(View("Create", model));
            }
        }
Beispiel #4
0
 public Payment Create(Payment value)
 {
     return(_paymentBusiness.Create(value));
 }
        public SimpleResponse <PaymentViewModel> Create(PaymentViewModel model)
        {
            var response = iPaymentBusiness.Create(model);

            return(response);
        }