$(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"); // } // }); //} patrick s day chasenwin slot age of the gods wheels of olympus video game burger win link slot gacor mitosbet true grit redemption slot mystery stones slot server thailand demo cleocatra game bonus buy games 2023 hit slot dice live dealer blackjack strategy slot book of titans video game meta crash 1win cgebet login live blackjack live dealer casino bonuses no deposit bonus buy games gold party liga slot ciputra video game penalty original glory casino live casino availability neon capital bonus buy lucky oak oksport sports betting tools slot wolf fang ancient greece bonus buy games christmas crumble joker city video game nuggets OK sport