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 : 18.118.142.101
Current Path : /var/www/oasis/js/ |
| Current File : /var/www/oasis/js/room_allotment_shifiting.js |
function stdRoomShiftDet() {
$("#page_main_div").load(
"../html_modules/room_allotment_shifiting.html?v=1122",
function () {
document.getElementById("display_module_name").innerHTML = "";
getDefaultHeadFooterLinks("Student Room Shifting");
getRoomDat();
}
);
}
var subj = "";
function getStudInfo() {
$("room_fregno").val("");
$("subj_fregno").val("");
$("fname").val("");
$("fdegree").val("");
let fregno = $("#fregno").val();
$.ajax({
type: "POST",
url: $host_url + "getStudDet",
data: "fregno=" + fregno,
success: function ($response) {
let res = eval("(" + $response + ")");
if (res.error_code == -1) {
alert(res.data.msg);
return;
} else {
var room_det = res.data.stddet;
var fdegree = room_det.FDEGREE + "-" + room_det.FDESCPN;
$("#fname").val(room_det.FNAME);
$("#fdegree").val(fdegree);
subj = res.data.qpcode;
var op = `<option value=''>---select---</option>`;
for ($i = 0; $i < subj.length; $i++) {
op += `<option value='${subj[$i]["fsubcode"]}'>${subj[$i]["fqpcode"]} - ${subj[$i]["fsubname"]}</option>`;
}
$("#subj_fregno").html(op);
}
},
});
}
function getRoomDat() {
$.ajax({
type: "POST",
url: $host_url + "getRoomDetails",
success: function ($response) {
let res = eval("(" + $response + ")");
if (res.error_code == -1) {
alert(res.status);
return;
} else {
var room_det = res.data;
var room = `<option value=''>---select---</option>`;
for ($i = 0; $i < room_det.length; $i++) {
room += `<option value='${room_det[$i]["id"]}'>${room_det[$i]["value"]}</option>`;
}
$("#room_fregno").html(room);
}
},
});
}
function setExamDate() {
let subjcode = $("#subj_fregno").val();
for ($i = 0; $i < subj.length; $i++) {
if (subjcode == subj[$i]["fsubcode"]) {
$("#curr_date").val(subj[$i]["fdoe"]);
}
}
}
function ClearAllData() {
$("#fregno").val("");
$("#fname").val("");
$("#fdegree").val("");
$("#curr_date").val("");
$("#subj_fregno").val("");
$("#room_fregno").val("");
}
function roomallotmentStd() {
let fregno = $("#fregno").val();
let subj = $("#subj_fregno").val();
let roomno = $("#room_fregno").val();
let fslno = $("#fslno").val();
let split = subj.split("-");
let fsubj = split[0];
let fqpcode = split[1];
if (fregno == "") {
alert("Enter Reg no.");
$("#fregno").focus();
return;
}
if (subj == "") {
alert("Select Subject");
$("#subj_fregno").focus();
return;
}
if (fslno == "") {
alert("Enter Seat No.");
$("#fslno").focus();
return;
}
if (roomno == "") {
alert("Select Room");
$("#room_fregno").focus();
return;
}
$.ajax({
type: "POST",
url:
$host_url +
"roomallotmentStd" +
"®no=" +
fregno +
"&fsubj=" +
fsubj +
"&roomno=" +
roomno+"&fslno="+fslno,
success: function ($response) {
let res = eval("(" + $response + ")");
if (res.error_code == 0) {
alert(res.status);
$("#fregno").val("");
$("#fname").val("");
$("#fdegree").val("");
$("#subj_fregno").val("");
$("#fslno").val("");
$("#room_fregno").val("");
} else {
alert(res.data.msg);
return;
}
},
});
}
|