public async Task <IActionResult> deliveryboypayment(driverAmountViewModel model) { if (ModelState.IsValid) { if (model.finalamt < model.amount) { ModelState.AddModelError("ModelOnly", "Please Pay Proper Amount"); return(View(model)); } else { var paramter = new DynamicParameters(); paramter.Add("@deliveryboyid", model.id); paramter.Add("@amount", model.amount); _sP_Call.Execute("insertdeliveryboypayamt", paramter); TempData["success"] = "Amount Pay to Deliveryboy successfully"; return(RedirectToAction(nameof(deliveryboypaymentIndex))); } } else { return(View(model)); } // return View(model); }
public async Task <IActionResult> deliveryboypayment(int id, string name, decimal amount) { var model = new driverAmountViewModel { id = id , drivername = name , amount = 0 , finalamt = amount , remaining = amount }; return(View(model)); }