$(document).ready(function () { $('a.pg').on('click', function (e) { e.preventDefault(); $('.grid').attr('action', $('.grid').attr('action') + $(this).attr('href')); $('form.grid').submit(); }); }); function BindCascadingDropDownList(sourceid, url, selectedvalue, cascadeParamValue, selectAll) { console.log(cascadeParamValue) $('#' + sourceid).empty(); if (selectAll) $("#" + sourceid).append(''); else $("#" + sourceid).append(''); //alert(sourceid) //alert($('#' + sourceid+' option:selected').val()) // if ($("#" + sourceid).val() != '') { $.ajax({ type: 'POST', url: url, dataType: 'json', data: cascadeParamValue, contentType: "application/json", async: false, success: function (data) { //debugger; $.each(data, function (i, item) { $("#" + sourceid).append(''); }); // if (selectedvalue == 0) // selectedvalue = ""; if (!selectAll && selectedvalue == 0) selectedvalue = ""; $("#" + sourceid).val(selectedvalue); }, failure: function (response) { console.log(response); } }); // } return false; } // Push data into array function BindArray(sourceid, url, params) { $('#' + sourceid).empty(); var items = []; $.ajax({ type: 'POST', url: url, dataType: 'json', data: params, contentType: "application/json", async: false, success: function (data) { $.each(data, function (i, item) { items.push(item.Value); }); $('#' + sourceid).val(items) }, failure: function (response) { console.log(response); } }); return false; } function BindDropDownList(sourceid, url, selectedValue) { $('#' + sourceid).empty(); } // To Get min and max Wardnumber function GetMinMaxWardNumber(requestType) { var params = '{"requestType": "' + requestType + '"}'; $.ajax({ type: 'POST', url: '/Bind/GetMinMaxWardNumber', dataType: 'json', data: params, contentType: "application/json", async: false, success: function (data) { debugger; $('#fromWard').val(data[0].minward); $('#toWard').val(data[0].maxward); }, failure: function (response) { console.log(response); } }); return false; } //// // // // / Old js function // function BindElectionID(selectedValue) { // $("#ElectionID").empty(); // debugger // $.ajax({ // type: 'POST',//url: '@Url.Action("BindElectionIDAdmin", "Bind")', // url: '@Url.Action("BindElectionIDForAdmin", "Bind")', // //data: '{ClientID: "' + @Session["ClientID"].ToString() + '"}', // data: '{UserID: "' + @Session["UserId"].ToString() + '"}', // dataType: 'json', // contentType: "application/json", // success: function (Elections) { // // debugger; // $("#ElectionID").append(''); // $.each(Elections, function (i, Election) { // $("#ElectionID").append(''); // }); // $("#ElectionID").val(selectedValue); // BindAssembly('@selAssembly'); // }, // error: function (ex) { // alert('Failed to retrieve ElectionID.' + ex); // } // }); // } //function BindParts() { // $("#Part").empty(); // var Assembly = $("#Assembly").val(); // var parts = []; // $.ajax({ // type: 'POST', // url: '@Url.Action("BindParts", "Bind")', // dataType: 'json', // data: '{Assembly: "' + Assembly + '"}', // contentType: "application/json", // async: false, // success: function (Parts) { // $.each(Parts, function (i, Part) { // parts.push(Parts[i].PartCode); // }); // $('#parts').val(parts); // }, // failure: function (response) { // // alert('Failed to retrieve Part.' + ex); // } // }); // return false; //} //function BindSection() { // $("#SectionAddress").empty(); // var Part = $("#Part").val(); // var Assembly = $("#Assembly").val(); // $.ajax({ // type: 'POST', // url: '@Url.Action("BindSectionAddress", "Bind")', // dataType: 'json', // data: '{Part: "' + Part + '" , Assembly: "' + Assembly + '"}', // contentType: "application/json", // async: false, // success: function (SectionAddresses) { // //debugger; // $("#SectionAddress").append(''); // $.each(SectionAddresses, function (i, SectionAddress) { // $("#SectionAddress").append(''); // }); // $("#SectionAddress").val('@ViewBag.SectionAddress'); // // BindPollingStation(); // }, // failure: function (response) { // alert('Failed to retrieve Section.' + ex); // } // }); // return false; //} //function GetSectionName() { // var Part = $("#Part").val(); // var Assembly = $("#Assembly").val(); // var SectionAddress = $('#SectionAddress').val(); // $.ajax({ // type: 'POST', // url: '@Url.Action("GetSectionAddress", "Bind")', // dataType: 'json', // data: '{Part: "' + Part + '" , Assembly: "' + Assembly + '" ,SectionAddress: "' + SectionAddress + '"}', // contentType: 'application/json; charset=utf-8', // async: false, // success: function (BindSectionName) { // // alert(BindSectionName[0].SectionName); // if (BindSectionName[0].SectionName != null) { // //alert(); // $('#SectionName').val(BindSectionName[0].SectionName); // //alert($('#SectionName').val()); // } // else { // alert('Failed to retrieve Section!!'); // return false; // } // }, // error: function () { // alert("error"); // } // }); //} bonus buy games revenge of loki megaways bonus buy games panda blitz bonus buy games book of xerxes slot ugliest catch bonus buy games 20 hot super fruits slot tooty fruity fruit bonus buy games diamond cascade bonus buy games giga blast bonus buy games gold hit lil demon sweet candy cash megaways judi onlen slot safari chase situs gacor mitosbet bonus buy games golden queen pragmatic play casino rtp live jewel rush web whatsapp gacor slots bonuses live casino promotions and bonuses book of kemet genting casino the candy crush best live casino with low house edge slot machine jackpot in las vegas mc casino account suspension video game crashx OK sport