328 lines
5.2 KiB
PHP
328 lines
5.2 KiB
PHP
<?php include('techsyn_header.php'); ?>
|
|
|
|
<!-- Main Content Container for side bar and body-->
|
|
|
|
<div class="main-container ace-save-state" id="main-container">
|
|
|
|
<script type="text/javascript">
|
|
|
|
try{ace.settings.loadState('main-container')}catch(e){}
|
|
|
|
</script>
|
|
|
|
<?php include('techsyn_sidebar.php'); ?>
|
|
|
|
|
|
|
|
<!--breadcrumb-->
|
|
|
|
<div class="main-content">
|
|
|
|
<div class="main-content-inner">
|
|
|
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
|
|
|
<ul class="breadcrumb">
|
|
|
|
|
|
|
|
<li class="#">Data Setup</li><li class="#">Master</li><li class="active">Bussiness Unit</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<!-- End of breadcrumb -->
|
|
|
|
|
|
|
|
|
|
|
|
<div class="page-content">
|
|
|
|
<div id="flexigridDiv" class="table-responsive">
|
|
|
|
|
|
|
|
<form name="f1" method="post" action=""id="flex_form_bussiness_unit">
|
|
|
|
<div id="flex1" style="width:100%">
|
|
|
|
</div>
|
|
|
|
<input type="hidden" name="flex_patient_id" id="flex_patient_id"/>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div><!-- /.page-content -->
|
|
|
|
</div>
|
|
|
|
</div><!-- /.main-content -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
|
|
var w=screen.width*.90;
|
|
|
|
|
|
|
|
var h =0;
|
|
|
|
h =(window.innerHeight-($("#navbar").height()+$(".breadcrumbs").height()))*.75;
|
|
|
|
$("#flex1").flexigrid({
|
|
|
|
url: 'bussiness_unit_list_script.php',
|
|
|
|
dataType: 'json',
|
|
|
|
colModel: [
|
|
|
|
{display: 'Sr', name: 'count', width: w*.04, sortable: false, align: 'left'},
|
|
{display: 'Bussiness Unit ID', name: 'bu_id', width: w*.1, sortable: true, align: 'left'},
|
|
|
|
|
|
|
|
{display: 'Bussiness Unit Name', name: 'bu_name', width: w*.2, sortable: true, align: 'left'},
|
|
|
|
{display: 'Bussines Head Name', name: 'bu_headname', width: w*.2, sortable: true, align: 'left'},
|
|
|
|
{display: 'Bussiness Head Email', name: 'bu_email', width: w*.2, sortable: true, align: 'left'},
|
|
|
|
{display: '', name: '', width: w*.2, sortable: true, align: 'left'},
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
buttons: [
|
|
|
|
|
|
|
|
{name: 'Add', bclass: 'add', onpress : add},
|
|
|
|
|
|
|
|
{separator: true},
|
|
|
|
],
|
|
|
|
searchitems: [
|
|
|
|
|
|
|
|
{display: 'Bussiness Unit Name', name: 'bu_name', isdefault: true},
|
|
|
|
|
|
{display: 'Bussiness Unit Head Name ', name: 'bu_headname'},
|
|
{display: 'Bussiness Unit Head Email', name: 'bu_email'}
|
|
|
|
],
|
|
|
|
sortname: "bu_id",
|
|
|
|
sortorder: "asc",
|
|
|
|
usepager: true, //pagination
|
|
|
|
|
|
|
|
useRp: true,
|
|
|
|
rp: 50, //records per page
|
|
|
|
showTableToggleBtn: false, //toggle button for the whole table
|
|
|
|
resizable: true,
|
|
|
|
//width: w,
|
|
|
|
height: h,
|
|
|
|
singleSelect: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
function excel()
|
|
|
|
{
|
|
|
|
window.open('excel_patient.php') ;
|
|
|
|
}
|
|
|
|
function pdf()
|
|
|
|
{
|
|
|
|
window.open('pdf_patient.php') ;
|
|
|
|
}
|
|
|
|
|
|
|
|
function add(){
|
|
|
|
$(".save_button").show();
|
|
|
|
$("#bu_id").val("");
|
|
|
|
$("#bu_name").val("");
|
|
$("#bu_headname").val("");
|
|
$("#bu_email").val("");
|
|
|
|
|
|
|
|
$('#modal-add-bussiness_unit').modal("show");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function save_bussiness_unit(){
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
url : 'save_bussiness_unit.php ',
|
|
|
|
type : "POST",
|
|
|
|
data : $("#bussiness_unit_form").serialize(),
|
|
|
|
success : function(data) {
|
|
|
|
BootstrapDialog.alert('bussiness unit Saved Successfully.');
|
|
|
|
$("#flex1").flexReload();
|
|
|
|
return;
|
|
|
|
},
|
|
|
|
error : function(data) {
|
|
|
|
BootstrapDialog.alert('Error In Saving bussiness unit');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
$('.close').click();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function open_bussiness_unit(bu_id, action) {
|
|
|
|
|
|
|
|
|
|
|
|
if(action=="V"){
|
|
|
|
$(".save_button").hide();
|
|
|
|
|
|
|
|
}else{
|
|
|
|
$(".save_button").show();
|
|
|
|
}
|
|
|
|
$.ajax({
|
|
|
|
url : 'select_bussiness_unit.php',
|
|
|
|
type : 'POST',
|
|
|
|
data:{bu_id:bu_id},
|
|
|
|
dataType:'json',
|
|
|
|
success : function(data) {
|
|
|
|
//alert(data);
|
|
|
|
//alert(data);
|
|
|
|
|
|
|
|
$("#bu_id").val(data.bu_id);
|
|
|
|
$("#bu_name").val(data.bu_name);
|
|
|
|
$("#bu_headname").val(data.bu_headname);
|
|
|
|
$("#bu_email").val(data.bu_email);
|
|
|
|
// $("#bussiness unit_code").val(data.bu_code);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#modal-add-bussiness_unit').modal("show");
|
|
|
|
},
|
|
|
|
error : function(data) {
|
|
|
|
BootstrapDialog.alert('Error Populating bussiness unit');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
|
|
<?php include('form/add_bussiness_unit.php');?>
|
|
|