Esempio n. 1
0
        public ActionResult <BaseViewModel <string> > DeletePaymentMethod([CheckGuid(Property = "PaymentMethodId")] string id)
        {
            var result = _locationService.DeletePaymentMethod(new Guid(id));

            this.HttpContext.Response.StatusCode = (int)result.StatusCode;

            return(result);
        }
Esempio n. 2
0
        public ActionResult Delete(int id)
        {
            if (!_paymentMethodService.DoesPaymentMethodExist(id))
            {
                return(HttpNotFound());
            }

            _paymentMethodService.DeletePaymentMethod(id);

            return(RedirectToAction("Index"));
        }
        public async Task <IActionResult> DeletePaymentMethod(int PaymentMethodId)
        {
            try
            {
                var response = await _service.DeletePaymentMethod(PaymentMethodId);

                if (response != null)
                {
                    return(Ok(response));
                }
                return(StatusCode(StatusCodes.Status204NoContent));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public ActionResult Delete(int id)
        {
            int result = 0;

            if (UserRolePermissionForPage.Delete == true)
            {
                result = _iCommonService.GetValidateReference("PaymentMethod", id.ToString());
                if (result > 0)
                {
                    return(RedirectToAction(nameof(Index), new { noDelete = result }));
                }
                else
                {
                    var deletedid = _iPaymentMethodService.DeletePaymentMethod(id);
                    return(RedirectToAction(nameof(Index)));
                }
            }
            else
            {
                return(RedirectToAction("NotFound", "Error"));
            }
        }
Esempio n. 5
0
 public virtual ActionResult PostDelete(int id)
 {
     _paymentMethodService.DeletePaymentMethod(id);
     return(RedirectToAction(MVC.Home.ActionNames.Index, MVC.Home.Name));
 }