
function load_device_info(){
	//alert('load_device_info');
	$("#device_list_body").load("module/ground_water/device_list_for_maintenance.php");
}

function set_device_info(sel_device_id){
	var p_dev_sl_no = $("#p_dev_sl_no_"+sel_device_id).val();
	var p_new_id = $("#p_new_id_"+sel_device_id).val();
	var p_old_id = $("#p_old_id_"+sel_device_id).val();
	var p_dist_name = $("#p_dist_name_"+sel_device_id).val();
	var p_upa_name = $("#p_upa_name_"+sel_device_id).val();
	
	$("#pick_no").val(sel_device_id);
	$("#device_sl_no").val(p_dev_sl_no);
	$("#new_id").val(p_new_id);
	$("#old_id").val(p_old_id);
	$("#upazila").val(p_upa_name);
	$("#district").val(p_dist_name);
	$('#modal_device_list').modal('hide');
}

function print_maintenance_history(){
	//alert("welecome");
	var station_id = $("#new_id").val();
	var device_id = $("#device_name").val();
	if(station_id==""){
		alert("Please Select Station");
	} else {
		var param="station_id="+station_id+"&device_id="+device_id;
		//alert(param);
		window.open("module/ground_water/maintenance_history_report_pdf.php?"+param+"");
	}
}