0xV3NOMx
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.145.70.108


Current Path : /var/www/oasis/js/
Upload File :
Current File : /var/www/oasis/js/stud_wise_report.js

function stdwisereport() {
  $("#page_main_div").load(
    "../html_modules/stud_wise_report.html",
    function () {
      $("#admstatus").hide();
      document.getElementById("display_module_name").innerHTML =
        "Student Detailed Report";

      //     document.getElementById("module_name_for_save").value =
      //       "ReportAdmissionList";
      //     $("#report_degree_code").val("");
      //     $("#report_degree_name").val("");
      //     getDefaultHeadFooterLinks("Admission Listing");
      getnShowDegreegrp();
      //Reference the DropDownList.
      // var ddlYears = document.getElementById("ddlYears");

      // //Determine the Current Year.
      // var currentYear = new Date().getFullYear();

      // //Loop and add the Year values to DropDownList.
      // for (var i = 2000; i <= currentYear; i++) {
      //   var option = document.createElement("OPTION");
      //   option.innerHTML = i;
      //   option.value = i;
      //   ddlYears.appendChild(option);
      // }
    }
  );
}

function getnShowDegreegrp() {
  $.ajax({
    type: "POST",
    async: false,
    url: $host_url + "loaddegreegrpjss",
    success: loaddegreegrpRsponsAdmList,
  });
}

function loaddegreegrpRsponsAdmList($responceCat) {
  $responceCat = eval("(" + $responceCat + ")");
  // console.log($responceCat,"vvv");
  if ($responceCat.error_code == 0) {
    var optionsAsString = "<option value=''>--Select Degree Group--</option>";
    for (var i = 0; i < $responceCat.data.length; i++) {
      optionsAsString +=
        "<option value='" +
        $responceCat.data[i].fdeggrp +
        "'>" +
        $responceCat.data[i].fdeggrp +
        " - " +
        $responceCat.data[i].fdescpn +
        "</option>";
    }
    $("#stud_degree_code").html(optionsAsString);
  }
}

function getDegreestudreport() {
  var deggrp = document.getElementById("stud_degree_code").value;
  $.ajax({
    type: "POST",
    async: false,
    url: $host_url + "loaddegreestudreport" + "&deggrp=" + deggrp,
    success: loaddegreeRsponsAdmList,
  });
}

function loaddegreeRsponsAdmList($responceCat) {
  $responceCat = eval("(" + $responceCat + ")");
  console.log($responceCat);
  if ($responceCat.error_code == 0) {
    var optionsAsString = "<option value='All'>--All--</option>";
    for (var i = 0; i < $responceCat.data.length; i++) {
      optionsAsString +=
        "<option value='" +
        $responceCat.data[i].fdegree +
        "'>" +
        $responceCat.data[i].fdegree +
        " - " +
        $responceCat.data[i].fdescpn +
        "</option>";
    }
    $("#report_degree_code").html(optionsAsString);
  }
}

function getYearstudreport() {
    var deggrp = document.getElementById("stud_degree_code").value;
    var degree = document.getElementById("report_degree_code").value;
    // console.log(degree,deggrp);
    // return
    $.ajax({
      type: "POST",
      async: false,
      url: $host_url + "loadyearstudreport" + "&deggrp=" + deggrp+ "&degree=" + degree,
      success: loadyearRsponsAdmList,
    });
  }
  
  function loadyearRsponsAdmList($responceCat) {
    $responceCat = eval("(" + $responceCat + ")");
    console.log($responceCat);
    if ($responceCat.error_code == 0) {
      var optionsAsString = "<option value='All'>Empty Year List</option>";
      for (var i = 0; i < $responceCat.data.length; i++) {
        optionsAsString +=
          "<option value='" +
          $responceCat.data[i].fayear +
          "'>" +
          $responceCat.data[i].fayear  +
          "</option>";
      }
      $("#ddlYears").html(optionsAsString);
    }
  }

function getstuddetreport() {
  var deggrp = document.getElementById("stud_degree_code").value;
  var degree = document.getElementById("report_degree_code").value;
  var report = document.getElementById("Reprttype").value;
  var year = document.getElementById("ddlYears").value;

  if(deggrp == '')
  {
      alert("Please Select Degree Group");
      return;
  }
  if(degree == '')
  {
      alert("Please Select Degree");
      return;
  }
  if(year == '')
  {
      alert("Please Select year");
      return;
  }
  if (report == "stdwise") {
    var parameter =
      "&deggrp=" +
      deggrp +
      "&degree=" +
      degree +
      "&year=" +
      year +
      "&type=" +
      report;

    window.open($host_url + "studentWiseReport" + parameter);
    
  }
}