Ejemplo n.º 1
0
        public DeletePaymentType DeletePaymentType(DeletePaymentType obj)
        {
            var returnModel = new DeletePaymentType();
            var PaymentType = _PaymentTypesRepo.Get(obj.PaymentTypeId);

            if (PaymentType != null)
            {
                _PaymentTypesRepo.Delete(PaymentType);
                returnModel.Message = "Delete Successful.";
            }
            return(returnModel);
        }
Ejemplo n.º 2
0
 public async Task <IActionResult> DeletePaymentType(long PaymentTypeId)
 {
     try
     {
         var model = new DeletePaymentType()
         {
             PaymentTypeId = PaymentTypeId
         };
         await Task.Run(() => _PaymentTypesServ.DeletePaymentType(model));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
     return(RedirectToAction("PaymentTypesList"));
 }