<?php
$tdatadepartment = array();
$tdatadepartment[".searchableFields"] = array();
$tdatadepartment[".ShortName"] = "department";
$tdatadepartment[".OwnerID"] = "md";
$tdatadepartment[".OriginalTable"] = "department";


$tdatadepartment[".pagesByType"] = my_json_decode( "{\"add\":[\"add\"],\"edit\":[\"edit\"],\"export\":[\"export\"],\"import\":[\"import\"],\"list\":[\"list\"],\"masterlist\":[\"masterlist\"]}" );
$tdatadepartment[".originalPagesByType"] = $tdatadepartment[".pagesByType"];
$tdatadepartment[".pages"] = types2pages( my_json_decode( "{\"add\":[\"add\"],\"edit\":[\"edit\"],\"export\":[\"export\"],\"import\":[\"import\"],\"list\":[\"list\"],\"masterlist\":[\"masterlist\"]}" ) );
$tdatadepartment[".originalPages"] = $tdatadepartment[".pages"];
$tdatadepartment[".defaultPages"] = my_json_decode( "{\"add\":\"add\",\"edit\":\"edit\",\"export\":\"export\",\"import\":\"import\",\"list\":\"list\",\"masterlist\":\"masterlist\"}" );
$tdatadepartment[".originalDefaultPages"] = $tdatadepartment[".defaultPages"];

//	field labels
$fieldLabelsdepartment = array();
$fieldToolTipsdepartment = array();
$pageTitlesdepartment = array();
$placeHoldersdepartment = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsdepartment["English"] = array();
	$fieldToolTipsdepartment["English"] = array();
	$placeHoldersdepartment["English"] = array();
	$pageTitlesdepartment["English"] = array();
	$fieldLabelsdepartment["English"]["id"] = "Id";
	$fieldToolTipsdepartment["English"]["id"] = "";
	$placeHoldersdepartment["English"]["id"] = "";
	$fieldLabelsdepartment["English"]["department_code"] = "Department Code";
	$fieldToolTipsdepartment["English"]["department_code"] = "";
	$placeHoldersdepartment["English"]["department_code"] = "";
	$fieldLabelsdepartment["English"]["department_name"] = "Department Name";
	$fieldToolTipsdepartment["English"]["department_name"] = "";
	$placeHoldersdepartment["English"]["department_name"] = "";
	$fieldLabelsdepartment["English"]["address"] = "Address";
	$fieldToolTipsdepartment["English"]["address"] = "";
	$placeHoldersdepartment["English"]["address"] = "";
	$fieldLabelsdepartment["English"]["md"] = "Md";
	$fieldToolTipsdepartment["English"]["md"] = "";
	$placeHoldersdepartment["English"]["md"] = "";
	if (count($fieldToolTipsdepartment["English"]))
		$tdatadepartment[".isUseToolTips"] = true;
}
if(mlang_getcurrentlang()=="sinhala")
{
	$fieldLabelsdepartment["sinhala"] = array();
	$fieldToolTipsdepartment["sinhala"] = array();
	$placeHoldersdepartment["sinhala"] = array();
	$pageTitlesdepartment["sinhala"] = array();
	$fieldLabelsdepartment["sinhala"]["id"] = "අංකය";
	$fieldToolTipsdepartment["sinhala"]["id"] = "";
	$placeHoldersdepartment["sinhala"]["id"] = "";
	$fieldLabelsdepartment["sinhala"]["department_code"] = "දේපාර්පතමේන්තු කේතය";
	$fieldToolTipsdepartment["sinhala"]["department_code"] = "";
	$placeHoldersdepartment["sinhala"]["department_code"] = "";
	$fieldLabelsdepartment["sinhala"]["department_name"] = "දේපාර්පතමේන්තුවේ නම";
	$fieldToolTipsdepartment["sinhala"]["department_name"] = "";
	$placeHoldersdepartment["sinhala"]["department_name"] = "";
	$fieldLabelsdepartment["sinhala"]["address"] = "ලිපිනය";
	$fieldToolTipsdepartment["sinhala"]["address"] = "";
	$placeHoldersdepartment["sinhala"]["address"] = "";
	$fieldLabelsdepartment["sinhala"]["md"] = "Md";
	$fieldToolTipsdepartment["sinhala"]["md"] = "";
	$placeHoldersdepartment["sinhala"]["md"] = "";
	if (count($fieldToolTipsdepartment["sinhala"]))
		$tdatadepartment[".isUseToolTips"] = true;
}


	$tdatadepartment[".NCSearch"] = true;



$tdatadepartment[".shortTableName"] = "department";
$tdatadepartment[".nSecOptions"] = 1;

$tdatadepartment[".mainTableOwnerID"] = "md";
$tdatadepartment[".entityType"] = 0;
$tdatadepartment[".connId"] = "allo_at_localhost";


$tdatadepartment[".strOriginalTableName"] = "department";

	



$tdatadepartment[".showAddInPopup"] = false;

$tdatadepartment[".showEditInPopup"] = false;

$tdatadepartment[".showViewInPopup"] = false;

//page's base css files names
$popupPagesLayoutNames = array();
$tdatadepartment[".popupPagesLayoutNames"] = $popupPagesLayoutNames;


	$tdatadepartment[".listAjax"] = true;
//	temporary
$tdatadepartment[".listAjax"] = false;

	$tdatadepartment[".audit"] = true;

	$tdatadepartment[".locking"] = true;


$pages = $tdatadepartment[".defaultPages"];

if( $pages[PAGE_EDIT] ) {
	$tdatadepartment[".edit"] = true;
	$tdatadepartment[".afterEditAction"] = 1;
	$tdatadepartment[".closePopupAfterEdit"] = 1;
	$tdatadepartment[".afterEditActionDetTable"] = "";
}

if( $pages[PAGE_ADD] ) {
$tdatadepartment[".add"] = true;
$tdatadepartment[".afterAddAction"] = 1;
$tdatadepartment[".closePopupAfterAdd"] = 1;
$tdatadepartment[".afterAddActionDetTable"] = "";
}

if( $pages[PAGE_LIST] ) {
	$tdatadepartment[".list"] = true;
}



$tdatadepartment[".strSortControlSettingsJSON"] = "";




if( $pages[PAGE_VIEW] ) {
$tdatadepartment[".view"] = true;
}

if( $pages[PAGE_IMPORT] ) {
$tdatadepartment[".import"] = true;
}

if( $pages[PAGE_EXPORT] ) {
$tdatadepartment[".exportTo"] = true;
}

if( $pages[PAGE_PRINT] ) {
$tdatadepartment[".printFriendly"] = true;
}



$tdatadepartment[".showSimpleSearchOptions"] = true; // temp fix #13449

// Allow Show/Hide Fields in GRID
$tdatadepartment[".allowShowHideFields"] = true; // temp fix #13449
//

// Allow Fields Reordering in GRID
$tdatadepartment[".allowFieldsReordering"] = true; // temp fix #13449
//

$tdatadepartment[".isUseAjaxSuggest"] = true;

$tdatadepartment[".rowHighlite"] = true;



																								

$tdatadepartment[".ajaxCodeSnippetAdded"] = false;

$tdatadepartment[".buttonsAdded"] = false;

$tdatadepartment[".addPageEvents"] = false;

// use timepicker for search panel
$tdatadepartment[".isUseTimeForSearch"] = false;


$tdatadepartment[".badgeColor"] = "D2AF80";


$tdatadepartment[".allSearchFields"] = array();
$tdatadepartment[".filterFields"] = array();
$tdatadepartment[".requiredSearchFields"] = array();

$tdatadepartment[".googleLikeFields"] = array();
$tdatadepartment[".googleLikeFields"][] = "id";
$tdatadepartment[".googleLikeFields"][] = "department_code";
$tdatadepartment[".googleLikeFields"][] = "department_name";
$tdatadepartment[".googleLikeFields"][] = "address";
$tdatadepartment[".googleLikeFields"][] = "md";



$tdatadepartment[".tableType"] = "list";

$tdatadepartment[".printerPageOrientation"] = 0;
$tdatadepartment[".nPrinterPageScale"] = 100;

$tdatadepartment[".nPrinterSplitRecords"] = 40;

$tdatadepartment[".geocodingEnabled"] = false;










$tdatadepartment[".pageSize"] = 20;

$tdatadepartment[".warnLeavingPages"] = true;



$tstrOrderBy = "";
if(strlen($tstrOrderBy) && strtolower(substr($tstrOrderBy,0,8))!="order by")
	$tstrOrderBy = "order by ".$tstrOrderBy;
$tdatadepartment[".strOrderBy"] = $tstrOrderBy;

$tdatadepartment[".orderindexes"] = array();


$tdatadepartment[".sqlHead"] = "SELECT id,  	department_code,  	department_name,  	address,  	md";
$tdatadepartment[".sqlFrom"] = "FROM department";
$tdatadepartment[".sqlWhereExpr"] = "";
$tdatadepartment[".sqlTail"] = "";

//fill array of tabs for list page
$arrGridTabs = array();
$arrGridTabs[] = array(
	'tabId' => "",
	'name' => "All data",
	'nameType' => 'Text',
	'where' => "",
	'showRowCount' => 0,
	'hideEmpty' => 0,
);
$tdatadepartment[".arrGridTabs"] = $arrGridTabs;









//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatadepartment[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatadepartment[".arrGroupsPerPage"] = $arrGPP;

$tdatadepartment[".highlightSearchResults"] = true;

$tableKeysdepartment = array();
$tableKeysdepartment[] = "id";
$tdatadepartment[".Keys"] = $tableKeysdepartment;


$tdatadepartment[".hideMobileList"] = array();




//	id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "id";
	$fdata["GoodName"] = "id";
	$fdata["ownerTable"] = "department";
	$fdata["Label"] = GetFieldLabel("department","id");
	$fdata["FieldType"] = 3;

	
		$fdata["AutoInc"] = true;

	
			

		$fdata["strField"] = "id";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "id";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatadepartment["id"] = $fdata;
		$tdatadepartment[".searchableFields"][] = "id";
//	department_code
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "department_code";
	$fdata["GoodName"] = "department_code";
	$fdata["ownerTable"] = "department";
	$fdata["Label"] = GetFieldLabel("department","department_code");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "department_code";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "department_code";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=250";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatadepartment["department_code"] = $fdata;
		$tdatadepartment[".searchableFields"][] = "department_code";
//	department_name
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "department_name";
	$fdata["GoodName"] = "department_name";
	$fdata["ownerTable"] = "department";
	$fdata["Label"] = GetFieldLabel("department","department_name");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "department_name";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "department_name";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=250";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
			$edata["validateAs"]["basicValidate"][] = "DenyDuplicated";
	$edata["validateAs"]["customMessages"]["DenyDuplicated"] = array("message" => "Value %value% already exists", "messageType" => "Text");

	
	//	End validation

	
			
	
		$edata["denyDuplicates"] = true;

	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatadepartment["department_name"] = $fdata;
		$tdatadepartment[".searchableFields"][] = "department_name";
//	address
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "address";
	$fdata["GoodName"] = "address";
	$fdata["ownerTable"] = "department";
	$fdata["Label"] = GetFieldLabel("department","address");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "address";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "address";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=500";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatadepartment["address"] = $fdata;
		$tdatadepartment[".searchableFields"][] = "address";
//	md
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "md";
	$fdata["GoodName"] = "md";
	$fdata["ownerTable"] = "department";
	$fdata["Label"] = GetFieldLabel("department","md");
	$fdata["FieldType"] = 3;

	
	
	
			

		$fdata["strField"] = "md";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "md";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Readonly");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
							
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatadepartment["md"] = $fdata;
		$tdatadepartment[".searchableFields"][] = "md";


$tables_data["department"]=&$tdatadepartment;
$field_labels["department"] = &$fieldLabelsdepartment;
$fieldToolTips["department"] = &$fieldToolTipsdepartment;
$placeHolders["department"] = &$placeHoldersdepartment;
$page_titles["department"] = &$pageTitlesdepartment;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["department"] = array();
//	expenditure_code
	
	

		$dIndex = 0;
	$detailsParam = array();
	$detailsParam["dDataSourceTable"]="expenditure_code";
		$detailsParam["dOriginalTable"] = "expenditure_code";



		
		$detailsParam["dType"]=PAGE_LIST;
	$detailsParam["dShortTable"] = "expenditure_code";
	$detailsParam["dCaptionTable"] = GetTableCaption("expenditure_code");
	$detailsParam["masterKeys"] =array();
	$detailsParam["detailKeys"] =array();


		
	$detailsTablesData["department"][$dIndex] = $detailsParam;

	
		$detailsTablesData["department"][$dIndex]["masterKeys"] = array();

	$detailsTablesData["department"][$dIndex]["masterKeys"][]="department_code";

				$detailsTablesData["department"][$dIndex]["detailKeys"] = array();

	$detailsTablesData["department"][$dIndex]["detailKeys"][]="department_code";

// tables which are master tables for current table (detail)
$masterTablesData["department"] = array();



// -----------------end  prepare master-details data arrays ------------------------------//



require_once(getabspath("classes/sql.php"));











function createSqlQuery_department()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  	department_code,  	department_name,  	address,  	md";
$proto0["m_strFrom"] = "FROM department";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto2["m_column"]=$obj;
$proto2["m_contained"] = array();
$proto2["m_strCase"] = "";
$proto2["m_havingmode"] = false;
$proto2["m_inBrackets"] = false;
$proto2["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto2);

$proto0["m_where"] = $obj;
$proto4=array();
$proto4["m_sql"] = "";
$proto4["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto4["m_column"]=$obj;
$proto4["m_contained"] = array();
$proto4["m_strCase"] = "";
$proto4["m_havingmode"] = false;
$proto4["m_inBrackets"] = false;
$proto4["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto4);

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto6=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "department",
	"m_srcTableName" => "department"
));

$proto6["m_sql"] = "id";
$proto6["m_srcTableName"] = "department";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "department_code",
	"m_strTable" => "department",
	"m_srcTableName" => "department"
));

$proto8["m_sql"] = "department_code";
$proto8["m_srcTableName"] = "department";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto10=array();
			$obj = new SQLField(array(
	"m_strName" => "department_name",
	"m_strTable" => "department",
	"m_srcTableName" => "department"
));

$proto10["m_sql"] = "department_name";
$proto10["m_srcTableName"] = "department";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

$proto0["m_fieldlist"][]=$obj;
						$proto12=array();
			$obj = new SQLField(array(
	"m_strName" => "address",
	"m_strTable" => "department",
	"m_srcTableName" => "department"
));

$proto12["m_sql"] = "address";
$proto12["m_srcTableName"] = "department";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "md",
	"m_strTable" => "department",
	"m_srcTableName" => "department"
));

$proto14["m_sql"] = "md";
$proto14["m_srcTableName"] = "department";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto16=array();
$proto16["m_link"] = "SQLL_MAIN";
			$proto17=array();
$proto17["m_strName"] = "department";
$proto17["m_srcTableName"] = "department";
$proto17["m_columns"] = array();
$proto17["m_columns"][] = "id";
$proto17["m_columns"][] = "department_code";
$proto17["m_columns"][] = "department_name";
$proto17["m_columns"][] = "address";
$proto17["m_columns"][] = "md";
$obj = new SQLTable($proto17);

$proto16["m_table"] = $obj;
$proto16["m_sql"] = "department";
$proto16["m_alias"] = "";
$proto16["m_srcTableName"] = "department";
$proto18=array();
$proto18["m_sql"] = "";
$proto18["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto18["m_column"]=$obj;
$proto18["m_contained"] = array();
$proto18["m_strCase"] = "";
$proto18["m_havingmode"] = false;
$proto18["m_inBrackets"] = false;
$proto18["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto18);

$proto16["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto16);

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
$proto0["m_srcTableName"]="department";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_department = createSqlQuery_department();


	
		;

					

$tdatadepartment[".sqlquery"] = $queryData_department;



$tableEvents["department"] = new eventsBase;
$tdatadepartment[".hasEvents"] = false;

?>