<?php
$tdatadistrict = array();
$tdatadistrict[".searchableFields"] = array();
$tdatadistrict[".ShortName"] = "district";
$tdatadistrict[".OwnerID"] = "";
$tdatadistrict[".OriginalTable"] = "district";


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

//	field labels
$fieldLabelsdistrict = array();
$fieldToolTipsdistrict = array();
$pageTitlesdistrict = array();
$placeHoldersdistrict = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsdistrict["English"] = array();
	$fieldToolTipsdistrict["English"] = array();
	$placeHoldersdistrict["English"] = array();
	$pageTitlesdistrict["English"] = array();
	$fieldLabelsdistrict["English"]["DistrictID"] = "District ID";
	$fieldToolTipsdistrict["English"]["DistrictID"] = "";
	$placeHoldersdistrict["English"]["DistrictID"] = "";
	$fieldLabelsdistrict["English"]["ProvinceID"] = "Province ID";
	$fieldToolTipsdistrict["English"]["ProvinceID"] = "";
	$placeHoldersdistrict["English"]["ProvinceID"] = "";
	$fieldLabelsdistrict["English"]["DistrinctName"] = "Distrinct Name";
	$fieldToolTipsdistrict["English"]["DistrinctName"] = "";
	$placeHoldersdistrict["English"]["DistrinctName"] = "";
	$pageTitlesdistrict["English"]["list"] = "ແຂວງ";
	if (count($fieldToolTipsdistrict["English"]))
		$tdatadistrict[".isUseToolTips"] = true;
}


	$tdatadistrict[".NCSearch"] = true;



$tdatadistrict[".shortTableName"] = "district";
$tdatadistrict[".nSecOptions"] = 0;

$tdatadistrict[".mainTableOwnerID"] = "";
$tdatadistrict[".entityType"] = 0;
$tdatadistrict[".connId"] = "eflejob_at_localhost";


$tdatadistrict[".strOriginalTableName"] = "district";

	



$tdatadistrict[".showAddInPopup"] = false;

$tdatadistrict[".showEditInPopup"] = false;

$tdatadistrict[".showViewInPopup"] = false;

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

	$tdatadistrict[".audit"] = false;

	$tdatadistrict[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatadistrict[".isUseAjaxSuggest"] = true;



						

$tdatadistrict[".ajaxCodeSnippetAdded"] = false;

$tdatadistrict[".buttonsAdded"] = false;

$tdatadistrict[".addPageEvents"] = false;

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


$tdatadistrict[".badgeColor"] = "6b8e23";


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

$tdatadistrict[".googleLikeFields"] = array();
$tdatadistrict[".googleLikeFields"][] = "DistrictID";
$tdatadistrict[".googleLikeFields"][] = "ProvinceID";
$tdatadistrict[".googleLikeFields"][] = "DistrinctName";



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

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

$tdatadistrict[".nPrinterSplitRecords"] = 40;

$tdatadistrict[".geocodingEnabled"] = false;










$tdatadistrict[".pageSize"] = 20;

$tdatadistrict[".warnLeavingPages"] = true;



$tstrOrderBy = "";
$tdatadistrict[".strOrderBy"] = $tstrOrderBy;

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


$tdatadistrict[".sqlHead"] = "SELECT DistrictID,  	ProvinceID,  	DistrinctName";
$tdatadistrict[".sqlFrom"] = "FROM district";
$tdatadistrict[".sqlWhereExpr"] = "";
$tdatadistrict[".sqlTail"] = "";










//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;
$tdatadistrict[".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;
$tdatadistrict[".arrGroupsPerPage"] = $arrGPP;

$tdatadistrict[".highlightSearchResults"] = true;

$tableKeysdistrict = array();
$tableKeysdistrict[] = "DistrictID";
$tableKeysdistrict[] = "ProvinceID";
$tdatadistrict[".Keys"] = $tableKeysdistrict;


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




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


		$fdata["AutoInc"] = true;

	
			

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

		$fdata["sourceSingle"] = "DistrictID";

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

	
	
				$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["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


	$tdatadistrict["DistrictID"] = $fdata;
		$tdatadistrict[".searchableFields"][] = "DistrictID";
//	ProvinceID
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "ProvinceID";
	$fdata["GoodName"] = "ProvinceID";
	$fdata["ownerTable"] = "district";
	$fdata["Label"] = GetFieldLabel("district","ProvinceID");
	$fdata["FieldType"] = 3;


	
	
			

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

		$fdata["sourceSingle"] = "ProvinceID";

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

	
	
				$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" => "Lookup wizard");

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


	
	

// Begin Lookup settings
				$edata["LookupType"] = 2;
	$edata["LookupTable"] = "province";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "ProvinceID";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "ProvinceName";

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$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"] = "Equals";

			// 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


	$tdatadistrict["ProvinceID"] = $fdata;
		$tdatadistrict[".searchableFields"][] = "ProvinceID";
//	DistrinctName
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "DistrinctName";
	$fdata["GoodName"] = "DistrinctName";
	$fdata["ownerTable"] = "district";
	$fdata["Label"] = GetFieldLabel("district","DistrinctName");
	$fdata["FieldType"] = 200;


	
	
			

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

		$fdata["sourceSingle"] = "DistrinctName";

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

	
	
				$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["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

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

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

		$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


	$tdatadistrict["DistrinctName"] = $fdata;
		$tdatadistrict[".searchableFields"][] = "DistrinctName";


$tables_data["district"]=&$tdatadistrict;
$field_labels["district"] = &$fieldLabelsdistrict;
$fieldToolTips["district"] = &$fieldToolTipsdistrict;
$placeHolders["district"] = &$placeHoldersdistrict;
$page_titles["district"] = &$pageTitlesdistrict;


changeTextControlsToDate( "district" );

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)

//if !@TABLE.bReportCrossTab

$detailsTablesData["district"] = array();
//endif

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



	
	//if !@t.bReportCrossTab
			$strOriginalDetailsTable="province";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="province";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "province";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["district"][0] = $masterParams;
				$masterTablesData["district"][0]["masterKeys"] = array();
	$masterTablesData["district"][0]["masterKeys"][]="ProvinceID";
				$masterTablesData["district"][0]["detailKeys"] = array();
	$masterTablesData["district"][0]["detailKeys"][]="ProvinceID";
		
	//endif
// -----------------end  prepare master-details data arrays ------------------------------//



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











function createSqlQuery_district()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "DistrictID,  	ProvinceID,  	DistrinctName";
$proto0["m_strFrom"] = "FROM district";
$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" => "DistrictID",
	"m_strTable" => "district",
	"m_srcTableName" => "district"
));

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto12=array();
$proto12["m_link"] = "SQLL_MAIN";
			$proto13=array();
$proto13["m_strName"] = "district";
$proto13["m_srcTableName"] = "district";
$proto13["m_columns"] = array();
$proto13["m_columns"][] = "DistrictID";
$proto13["m_columns"][] = "ProvinceID";
$proto13["m_columns"][] = "DistrinctName";
$obj = new SQLTable($proto13);

$proto12["m_table"] = $obj;
$proto12["m_sql"] = "district";
$proto12["m_alias"] = "";
$proto12["m_srcTableName"] = "district";
$proto14=array();
$proto14["m_sql"] = "";
$proto14["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_district = createSqlQuery_district();


	
		;

			

$tdatadistrict[".sqlquery"] = $queryData_district;



$tdatadistrict[".hasEvents"] = false;

?>