Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.138.134.247
function marksEntryDet() {
$("#page_main_div").load("../html_modules/marksEntryExt.html", function () {
// window.enable_proper_module = "SubjectType";
document.getElementById("display_module_name").innerHTML =
"Marks Entry (External)";
document.getElementById("module_name_for_save").value =
"Marks Entry (External)";
getDefaultHeadFooterLinks("Marks Entry (External)");
getExtMarkQP();
});
}
function getExtMarkQP() {
$.ajax({
type: "GET",
url: $host_url + "getExtMarkQP",
success: function (response) {
var res = JSON.parse(response);
var qpcodeOptions = "<option value=''>----Select----</option>";
for (var i = 0; i < res.data.length; i++) {
qpcodeOptions += `<option value='${res.data[i].fsubcode}'>${res.data[i].fsubcode} - ${res.data[i].fsubname}</option>`;
}
$("#marks_entry_qp").html(qpcodeOptions);
},
});
}
function getPackNo() {
var qpcode = document.getElementById("marks_entry_qp").value;
$.ajax({
type: "GET",
data: "&qpcode=" + qpcode,
url: $host_url + "getPackNo",
success: function (response) {
var res = JSON.parse(response);
var packetOptions = "<option value=''>----Select----</option>";
for (var i = 0; i < res.data.length; i++) {
packetOptions += `<option value='${res.data[i].fcollcode}'>${res.data[i].fcollcode}</option>`;
}
$("#marks_entry_pack_no").html(packetOptions);
},
});
}
function getValNo() {
var qpcode = document.getElementById("marks_entry_qp").value;
var packet = document.getElementById("marks_entry_pack_no").value;
$.ajax({
type: "GET",
data: "&qpcode=" + qpcode + "&packet=" + packet,
url: $host_url + "getValNo",
success: function (response) {
var res = JSON.parse(response);
var valOptions = "<option value=''>----Select----</option>";
for (var i = 0; i < res.data.length; i++) {
valOptions += `<option value='${res.data[i].fvalno}'>${res.data[i].fvalno}</option>`;
}
$("#marks_entry_val_no").html(valOptions);
},
});
}
function entryMarksData() {
var qpcode = document.getElementById("marks_entry_qp").value;
var packet = document.getElementById("marks_entry_pack_no").value;
var valno = document.getElementById("marks_entry_val_no").value;
if (qpcode == "") {
alert("Select QP Code");
return;
}
if (packet == "") {
alert("Select Packet No.");
return;
}
if (valno == "") {
alert("Select Valution No.");
return;
}
$.ajax({
type: "GET",
data: "packet=" + packet + "&valno=" + valno + "&qpcode=" + qpcode,
url: $host_url + "entryMarksData",
success: function (response) {
var res = JSON.parse(response);
$("#marksentryexternaltab").html(res.data["tabledata"]);
console.log(res);
qpcnt = res.data["qpcnt"];
tablecnt = res.data["tablecnt"];
qno = res.data["qno"];
},
});
}
function saveExtMarks() {
var slno = 1;
var maxmarks = "";
var finarr = [];
var qpcode = document.getElementById("marks_entry_qp").value;
var packet = document.getElementById("marks_entry_pack_no").value;
var valno = document.getElementById("marks_entry_val_no").value;
if (qpcode == "") {
alert("Select QP Code");
return;
}
if (packet == "") {
alert("Select Packet No.");
return;
}
if (valno == "") {
alert("Select Valution No.");
return;
}
for (var z = 0; z <= tablecnt; z++) {
let regno = $(`#${slno}hregno`).val();
let totmarks = $(`#${slno}totmarks`).html();
let upd = $(`#${slno}hcregno`).val();
let arr = [];
if (upd == "U") {
for (var i = 0; i < qpcnt; i++) {
let arr1 = {};
maxmarks = $(`#${slno}_qp_${i}`).val();
qp = $(`#${slno}_hqp_${i}`).val();
arr1["maxmarks"] = maxmarks;
arr1["qp"] = qp;
arr1["regno"] = regno;
arr1["totmarks"] = totmarks;
arr.push(arr1);
}
finarr.push(arr);
}
slno++;
}
$.ajax({
type: "POST",
url: $host_url + "saveExtMarks",
data:
`&packet=` +
packet +
`&valno=` +
valno +
`&qpcode=` +
qpcode +
`&submarks=` +
JSON.stringify(finarr),
success: function (response) {
var res = JSON.parse(response);
console.log(res);
},
// SaveCopoMarkEntrySuccessExternal,
});
}
|