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.116.15.124
function callbatchclose() {
$("#page_main_div").load(
"../html_modules/batch_close.html?v=31082019",
function() {
$geditinternalcode = 0;
document.getElementById("display_module_name").innerHTML = "Batch Close";
document.getElementById("module_name_for_save").value = "Batch Close";
getDefaultHeadFooterLinks("Batch Close");
$("#btc_default_reg_div").hide();
}
);
}
function Getbatchclose() {
if ($("#batch_sub_degree_code").val() == "") {
alert("Please Enter Degree Name");
$("#batch_sub_degree_code").focus();
return;
}
if ($("#batch_sub_final_subcode").val() == "") {
alert("Please Enter Subject Code");
$("#batch_sub_final_subcode").focus();
return;
}
if ($("#batch_sub_Examno").val() == "") {
alert("Please Enter Examno");
$("#batch_sub_Examno").focus();
return;
}
if ($("#batch_no").val() == "") {
alert("Please Enter Batch");
$("#batch_no").focus();
return;
}
var bw_condition;
if ($("#batch_sub_range").val() == "B/W") {
condition_name = " between ";
condition_val =
"'" +
$("#batch_sub_range_from").val() +
"'" +
" and " +
"'" +
$("#batch_sub_range_to").val() +
"'";
} else {
condition_name = "like ";
condition_val = $("#batch_sub_range_bw").val();
}
$.blockUI({
message:
"<h1 class='h1' style='font-size:12px'>Saving... <img src='images/spinner.gif' border='0'></h1>"
});
$.ajax({
type: "POST",
url: $host_url + "checkbatchdetails",
data:
"degcode=" +
$("#batch_sub_degree_code").val() +
"&subcode=" +
$("#batch_sub_final_subcode").val() +
"&examno=" +
$("#batch_sub_Examno").val() +
"&batch_no=" +
$("#batch_no").val(),
success: function($responce) {
$responce = eval("(" + $responce + ")");
if ($responce.error_code == 0) {
$.unblockUI();
$("#btc_default_reg_div").show();
document.getElementById("intname").options.length = 0;
for ($i = 0; $i < $responce.data.teachcode.length; $i++) {
$op = new Option(
$responce.data.teachcode[$i]["value"],
$responce.data.teachcode[$i]["id"]
);
$op.id = $responce.data.teachcode[$i]["id"]; //specifying the id for options
document.getElementById("intname").options.add($op);
}
document.getElementById("extname").options.length = 0;
for ($i = 0; $i < $responce.data.teachcode.length; $i++) {
$op = new Option(
$responce.data.teachcode[$i]["value"],
$responce.data.teachcode[$i]["id"]
);
$op.id = $responce.data.teachcode[$i]["id"]; //specifying the id for options
document.getElementById("extname").options.add($op);
}
document.getElementById("chief").options.length = 0;
for ($i = 0; $i < $responce.data.Chief.length; $i++) {
$op = new Option(
$responce.data.Chief[$i]["value"],
$responce.data.Chief[$i]["id"]
);
$op.id = $responce.data.Chief[$i]["id"]; //specifying the id for options
document.getElementById("chief").options.add($op);
}
document.getElementById("clerk").options.length = 0;
document.getElementById("group").options.length = 0;
for ($i = 0; $i < $responce.data.clerk.length; $i++) {
$op = new Option(
$responce.data.clerk[$i]["value"],
$responce.data.clerk[$i]["id"]
);
$op.id = $responce.data.clerk[$i]["id"]; //specifying the id for options
document.getElementById("clerk").options.add($op);
}
document.getElementById("group").options.length = 0;
for ($i = 0; $i < $responce.data.clerk.length; $i++) {
$op = new Option(
$responce.data.clerk[$i]["value"],
$responce.data.clerk[$i]["id"]
);
$op.id = $responce.data.clerk[$i]["id"]; //specifying the id for options
document.getElementById("group").options.add($op);
}
document.getElementById("prdate").value = $responce.data.fexamdate;
document.getElementById("prtime").value = $responce.data.fexamtime;
if ($responce.data.fintexamcode != "") {
document.getElementById("intname").value =
$responce.data.fintexamcode;
if ($responce.data.fedit != "T")
document.getElementById("intname").disabled = true;
} else {
document.getElementById("intname").disabled = false;
}
if ($responce.data.fextexamcode != "") {
document.getElementById("extname").value =
$responce.data.fextexamcode;
if ($responce.data.fedit != "T")
document.getElementById("extname").disabled = true;
} else {
document.getElementById("extname").disabled = false;
}
if ($responce.data.fchief != "") {
document.getElementById("chief").value = $responce.data.fchief;
if ($responce.data.fedit != "T")
document.getElementById("chief").disabled = true;
} else {
document.getElementById("chief").disabled = false;
}
if ($responce.data.fclerk != "") {
document.getElementById("clerk").value = $responce.data.fclerk;
if ($responce.data.fedit != "T")
document.getElementById("clerk").disabled = true;
} else {
document.getElementById("clerk").disabled = false;
}
if ($responce.data.fgroup != "") {
document.getElementById("group").value = $responce.data.fgroup;
if ($responce.data.fedit != "T")
document.getElementById("group").disabled = true;
} else {
document.getElementById("group").disabled = false;
}
if ($responce.data.fsession != "") {
document.getElementById("stype").value = $responce.data.fsession;
if ($responce.data.fedit != "T")
document.getElementById("stype").disabled = true;
} else {
document.getElementById("stype").disabled = false;
}
} else {
$("#btc_default_reg_div").show();
$.unblockUI();
}
}
});
}
function savebatchclose() {
var list_data = "°code=" + $("#batch_sub_degree_code").val();
list_data += "&subcode=" + $("#batch_sub_final_subcode").val();
list_data += "&examno=" + $("#batch_sub_Examno").val();
list_data += "&batchno=" + $("#batch_no").val();
list_data += "&prdate=" + $("#prdate").val();
list_data += "&prtime=" + $("#prtime").val();
list_data += "&stype=" + $("#stype").val();
list_data += "&intname=" + $("#intname").val();
list_data += "&extname=" + $("#extname").val();
list_data += "&chief=" + $("#chief").val();
list_data += "&clerk=" + $("#clerk").val();
list_data += "&group=" + $("#group").val();
$.blockUI({
message:
"<h1 class='h1' style='font-size:12px'>Saving... <img src='images/spinner.gif' border='0'></h1>"
});
var dataString = "&list_data=" + list_data;
$.ajax({
type: "POST",
url: $host_url + "savebatchclose",
data: dataString,
cache: false,
success: function($responce) {
$responce = eval("(" + $responce + ")");
if ($responce.error_code == 0) {
$.unblockUI();
alert($responce.data);
Getbatchclose();
} else {
$.unblockUI();
alert($responce.data);
}
}
});
}
|