$(document).ready(function () { $('#orderdetailsItems').on('click', '.remove', function () { var isAllValid = ""; var $Srrmv = $(this).closest("tr").find(".sr") .val(); if ($Srrmv == "0") { isAllValid = false alert("not Get") } else { isAllValid = true; } if (isAllValid) { var $tot = $(this).closest("tr") .find(".Total").val(); var Pnet = $("#NetTotal").val(); var n_result1 = ""; if ($tot !== "" && $.isNumeric($tot) && $.isNumeric(Pnet)) { n_result1 = parseFloat(Pnet) - parseFloat($tot); } var URL = "/Credit/Removeline"; var Srno = $(this).closest("tr").find(".sr").val().trim(); if (Srno != null) { alert(Srnor + "Post Methode") // he show this alert msg then no response// $.post(URL, { Srno: Srno }, function (data) { $(this).parents('tr').remove(); alert("Srno" + $Srrmv + " REMOVE SUCCESSFULLY "); }); } } }); });
[HttpPost] public JsonResult Removeline(Dport pd, int Srno, int PerTranCode) { var rmv = dc.PerchesDetails.Where(m => m.PerTranCode == PerTranCode).ToList(); return Json(pd, JsonRequestBehavior.AllowGet); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)