<?php
namespace PHPMaker2019\project_germanos;

// Write header
WriteHeader(FALSE);

// Create page object
if (!isset($employeeaddress_grid))
	$employeeaddress_grid = new employeeaddress_grid();

// Run the page
$employeeaddress_grid->run();

// Setup login status
SetupLoginStatus();
SetClientVar("login", LoginStatus());

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$employeeaddress_grid->Page_Render();
?>
<?php if (!$employeeaddress->isExport()) { ?>
<script>

// Form object
var femployeeaddressgrid = new ew.Form("femployeeaddressgrid", "grid");
femployeeaddressgrid.formKeyCountName = '<?php echo $employeeaddress_grid->FormKeyCountName ?>';

// Validate form
femployeeaddressgrid.validate = function() {
	if (!this.validateRequired)
		return true; // Ignore validation
	var $ = jQuery, fobj = this.getForm(), $fobj = $(fobj);
	if ($fobj.find("#confirm").val() == "F")
		return true;
	var elm, felm, uelm, addcnt = 0;
	var $k = $fobj.find("#" + this.formKeyCountName); // Get key_count
	var rowcnt = ($k[0]) ? parseInt($k.val(), 10) : 1;
	var startcnt = (rowcnt == 0) ? 0 : 1; // Check rowcnt == 0 => Inline-Add
	var gridinsert = ["insert", "gridinsert"].includes($fobj.find("#action").val()) && $k[0];
	for (var i = startcnt; i <= rowcnt; i++) {
		var infix = ($k[0]) ? String(i) : "";
		$fobj.data("rowindex", infix);
		var checkrow = (gridinsert) ? !this.emptyRow(infix) : true;
		if (checkrow) {
			addcnt++;
		<?php if ($employeeaddress_grid->EmployeeID->Required) { ?>
			elm = this.getElements("x" + infix + "_EmployeeID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeeaddress->EmployeeID->caption(), $employeeaddress->EmployeeID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeeaddress_grid->AddressTypeID->Required) { ?>
			elm = this.getElements("x" + infix + "_AddressTypeID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeeaddress->AddressTypeID->caption(), $employeeaddress->AddressTypeID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeeaddress_grid->Address->Required) { ?>
			elm = this.getElements("x" + infix + "_Address");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeeaddress->Address->caption(), $employeeaddress->Address->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeeaddress_grid->City->Required) { ?>
			elm = this.getElements("x" + infix + "_City");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeeaddress->City->caption(), $employeeaddress->City->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeeaddress_grid->Region->Required) { ?>
			elm = this.getElements("x" + infix + "_Region");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeeaddress->Region->caption(), $employeeaddress->Region->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeeaddress_grid->PostalCode->Required) { ?>
			elm = this.getElements("x" + infix + "_PostalCode");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeeaddress->PostalCode->caption(), $employeeaddress->PostalCode->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeeaddress_grid->Country->Required) { ?>
			elm = this.getElements("x" + infix + "_Country");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeeaddress->Country->caption(), $employeeaddress->Country->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeeaddress_grid->Notes->Required) { ?>
			elm = this.getElements("x" + infix + "_Notes");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeeaddress->Notes->caption(), $employeeaddress->Notes->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeeaddress_grid->Primary->Required) { ?>
			elm = this.getElements("x" + infix + "_Primary[]");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeeaddress->Primary->caption(), $employeeaddress->Primary->RequiredErrorMessage)) ?>");
		<?php } ?>

			// Fire Form_CustomValidate event
			if (!this.Form_CustomValidate(fobj))
				return false;
		} // End Grid Add checking
	}
	return true;
}

// Check empty row
femployeeaddressgrid.emptyRow = function(infix) {
	var fobj = this._form;
	if (ew.valueChanged(fobj, infix, "EmployeeID", false)) return false;
	if (ew.valueChanged(fobj, infix, "AddressTypeID", false)) return false;
	if (ew.valueChanged(fobj, infix, "Address", false)) return false;
	if (ew.valueChanged(fobj, infix, "City", false)) return false;
	if (ew.valueChanged(fobj, infix, "Region", false)) return false;
	if (ew.valueChanged(fobj, infix, "PostalCode", false)) return false;
	if (ew.valueChanged(fobj, infix, "Country", false)) return false;
	if (ew.valueChanged(fobj, infix, "Notes", false)) return false;
	if (ew.valueChanged(fobj, infix, "Primary[]", true)) return false;
	return true;
}

// Form_CustomValidate event
femployeeaddressgrid.Form_CustomValidate = function(fobj) { // DO NOT CHANGE THIS LINE!

	// Your custom validation code here, return false if invalid.
	return true;
}

// Use JavaScript validation or not
femployeeaddressgrid.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

// Dynamic selection lists
femployeeaddressgrid.lists["x_EmployeeID"] = <?php echo $employeeaddress_grid->EmployeeID->Lookup->toClientList() ?>;
femployeeaddressgrid.lists["x_EmployeeID"].options = <?php echo JsonEncode($employeeaddress_grid->EmployeeID->lookupOptions()) ?>;
femployeeaddressgrid.lists["x_AddressTypeID"] = <?php echo $employeeaddress_grid->AddressTypeID->Lookup->toClientList() ?>;
femployeeaddressgrid.lists["x_AddressTypeID"].options = <?php echo JsonEncode($employeeaddress_grid->AddressTypeID->lookupOptions()) ?>;
femployeeaddressgrid.lists["x_Primary[]"] = <?php echo $employeeaddress_grid->Primary->Lookup->toClientList() ?>;
femployeeaddressgrid.lists["x_Primary[]"].options = <?php echo JsonEncode($employeeaddress_grid->Primary->options(FALSE, TRUE)) ?>;

// Form object for search
</script>
<script src="phpjs/ewscrolltable.js"></script>
<?php } ?>
<?php
$employeeaddress_grid->renderOtherOptions();
?>
<?php $employeeaddress_grid->showPageHeader(); ?>
<?php
$employeeaddress_grid->showMessage();
?>
<?php if ($employeeaddress_grid->TotalRecs > 0 || $employeeaddress->CurrentAction) { ?>
<div class="card ew-card ew-grid<?php if ($employeeaddress_grid->isAddOrEdit()) { ?> ew-grid-add-edit<?php } ?> employeeaddress">
<?php if ($employeeaddress_grid->ShowOtherOptions) { ?>
<div class="card-header ew-grid-upper-panel">
<?php $employeeaddress_grid->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<div id="femployeeaddressgrid" class="ew-form ew-list-form form-inline">
<div id="gmp_employeeaddress" class="<?php if (IsResponsiveLayout()) { ?>table-responsive <?php } ?>card-body ew-grid-middle-panel">
<table id="tbl_employeeaddressgrid" class="table ew-table"><!-- .ew-table ##-->
<thead>
	<tr class="ew-table-header">
<?php

// Header row
$employeeaddress_grid->RowType = ROWTYPE_HEADER;

// Render list options
$employeeaddress_grid->renderListOptions();

// Render list options (header, left)
$employeeaddress_grid->ListOptions->render("header", "left");
?>
<?php if ($employeeaddress->EmployeeID->Visible) { // EmployeeID ?>
	<?php if ($employeeaddress->sortUrl($employeeaddress->EmployeeID) == "") { ?>
		<th data-name="EmployeeID" class="<?php echo $employeeaddress->EmployeeID->headerCellClass() ?>"><div id="elh_employeeaddress_EmployeeID" class="employeeaddress_EmployeeID"><div class="ew-table-header-caption"><?php echo $employeeaddress->EmployeeID->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="EmployeeID" class="<?php echo $employeeaddress->EmployeeID->headerCellClass() ?>"><div><div id="elh_employeeaddress_EmployeeID" class="employeeaddress_EmployeeID">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $employeeaddress->EmployeeID->caption() ?></span><span class="ew-table-header-sort"><?php if ($employeeaddress->EmployeeID->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($employeeaddress->EmployeeID->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($employeeaddress->AddressTypeID->Visible) { // AddressTypeID ?>
	<?php if ($employeeaddress->sortUrl($employeeaddress->AddressTypeID) == "") { ?>
		<th data-name="AddressTypeID" class="<?php echo $employeeaddress->AddressTypeID->headerCellClass() ?>"><div id="elh_employeeaddress_AddressTypeID" class="employeeaddress_AddressTypeID"><div class="ew-table-header-caption"><?php echo $employeeaddress->AddressTypeID->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="AddressTypeID" class="<?php echo $employeeaddress->AddressTypeID->headerCellClass() ?>"><div><div id="elh_employeeaddress_AddressTypeID" class="employeeaddress_AddressTypeID">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $employeeaddress->AddressTypeID->caption() ?></span><span class="ew-table-header-sort"><?php if ($employeeaddress->AddressTypeID->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($employeeaddress->AddressTypeID->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($employeeaddress->Address->Visible) { // Address ?>
	<?php if ($employeeaddress->sortUrl($employeeaddress->Address) == "") { ?>
		<th data-name="Address" class="<?php echo $employeeaddress->Address->headerCellClass() ?>"><div id="elh_employeeaddress_Address" class="employeeaddress_Address"><div class="ew-table-header-caption"><?php echo $employeeaddress->Address->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Address" class="<?php echo $employeeaddress->Address->headerCellClass() ?>"><div><div id="elh_employeeaddress_Address" class="employeeaddress_Address">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $employeeaddress->Address->caption() ?></span><span class="ew-table-header-sort"><?php if ($employeeaddress->Address->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($employeeaddress->Address->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($employeeaddress->City->Visible) { // City ?>
	<?php if ($employeeaddress->sortUrl($employeeaddress->City) == "") { ?>
		<th data-name="City" class="<?php echo $employeeaddress->City->headerCellClass() ?>"><div id="elh_employeeaddress_City" class="employeeaddress_City"><div class="ew-table-header-caption"><?php echo $employeeaddress->City->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="City" class="<?php echo $employeeaddress->City->headerCellClass() ?>"><div><div id="elh_employeeaddress_City" class="employeeaddress_City">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $employeeaddress->City->caption() ?></span><span class="ew-table-header-sort"><?php if ($employeeaddress->City->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($employeeaddress->City->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($employeeaddress->Region->Visible) { // Region ?>
	<?php if ($employeeaddress->sortUrl($employeeaddress->Region) == "") { ?>
		<th data-name="Region" class="<?php echo $employeeaddress->Region->headerCellClass() ?>"><div id="elh_employeeaddress_Region" class="employeeaddress_Region"><div class="ew-table-header-caption"><?php echo $employeeaddress->Region->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Region" class="<?php echo $employeeaddress->Region->headerCellClass() ?>"><div><div id="elh_employeeaddress_Region" class="employeeaddress_Region">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $employeeaddress->Region->caption() ?></span><span class="ew-table-header-sort"><?php if ($employeeaddress->Region->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($employeeaddress->Region->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($employeeaddress->PostalCode->Visible) { // PostalCode ?>
	<?php if ($employeeaddress->sortUrl($employeeaddress->PostalCode) == "") { ?>
		<th data-name="PostalCode" class="<?php echo $employeeaddress->PostalCode->headerCellClass() ?>"><div id="elh_employeeaddress_PostalCode" class="employeeaddress_PostalCode"><div class="ew-table-header-caption"><?php echo $employeeaddress->PostalCode->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="PostalCode" class="<?php echo $employeeaddress->PostalCode->headerCellClass() ?>"><div><div id="elh_employeeaddress_PostalCode" class="employeeaddress_PostalCode">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $employeeaddress->PostalCode->caption() ?></span><span class="ew-table-header-sort"><?php if ($employeeaddress->PostalCode->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($employeeaddress->PostalCode->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($employeeaddress->Country->Visible) { // Country ?>
	<?php if ($employeeaddress->sortUrl($employeeaddress->Country) == "") { ?>
		<th data-name="Country" class="<?php echo $employeeaddress->Country->headerCellClass() ?>"><div id="elh_employeeaddress_Country" class="employeeaddress_Country"><div class="ew-table-header-caption"><?php echo $employeeaddress->Country->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Country" class="<?php echo $employeeaddress->Country->headerCellClass() ?>"><div><div id="elh_employeeaddress_Country" class="employeeaddress_Country">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $employeeaddress->Country->caption() ?></span><span class="ew-table-header-sort"><?php if ($employeeaddress->Country->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($employeeaddress->Country->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($employeeaddress->Notes->Visible) { // Notes ?>
	<?php if ($employeeaddress->sortUrl($employeeaddress->Notes) == "") { ?>
		<th data-name="Notes" class="<?php echo $employeeaddress->Notes->headerCellClass() ?>"><div id="elh_employeeaddress_Notes" class="employeeaddress_Notes"><div class="ew-table-header-caption"><?php echo $employeeaddress->Notes->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Notes" class="<?php echo $employeeaddress->Notes->headerCellClass() ?>"><div><div id="elh_employeeaddress_Notes" class="employeeaddress_Notes">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $employeeaddress->Notes->caption() ?></span><span class="ew-table-header-sort"><?php if ($employeeaddress->Notes->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($employeeaddress->Notes->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($employeeaddress->Primary->Visible) { // Primary ?>
	<?php if ($employeeaddress->sortUrl($employeeaddress->Primary) == "") { ?>
		<th data-name="Primary" class="<?php echo $employeeaddress->Primary->headerCellClass() ?>"><div id="elh_employeeaddress_Primary" class="employeeaddress_Primary"><div class="ew-table-header-caption"><?php echo $employeeaddress->Primary->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Primary" class="<?php echo $employeeaddress->Primary->headerCellClass() ?>"><div><div id="elh_employeeaddress_Primary" class="employeeaddress_Primary">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $employeeaddress->Primary->caption() ?></span><span class="ew-table-header-sort"><?php if ($employeeaddress->Primary->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($employeeaddress->Primary->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php

// Render list options (header, right)
$employeeaddress_grid->ListOptions->render("header", "right");
?>
	</tr>
</thead>
<tbody>
<?php
$employeeaddress_grid->StartRec = 1;
$employeeaddress_grid->StopRec = $employeeaddress_grid->TotalRecs; // Show all records

// Restore number of post back records
if ($CurrentForm && $employeeaddress_grid->EventCancelled) {
	$CurrentForm->Index = -1;
	if ($CurrentForm->hasValue($employeeaddress_grid->FormKeyCountName) && ($employeeaddress->isGridAdd() || $employeeaddress->isGridEdit() || $employeeaddress->isConfirm())) {
		$employeeaddress_grid->KeyCount = $CurrentForm->getValue($employeeaddress_grid->FormKeyCountName);
		$employeeaddress_grid->StopRec = $employeeaddress_grid->StartRec + $employeeaddress_grid->KeyCount - 1;
	}
}
$employeeaddress_grid->RecCnt = $employeeaddress_grid->StartRec - 1;
if ($employeeaddress_grid->Recordset && !$employeeaddress_grid->Recordset->EOF) {
	$employeeaddress_grid->Recordset->moveFirst();
	$selectLimit = $employeeaddress_grid->UseSelectLimit;
	if (!$selectLimit && $employeeaddress_grid->StartRec > 1)
		$employeeaddress_grid->Recordset->move($employeeaddress_grid->StartRec - 1);
} elseif (!$employeeaddress->AllowAddDeleteRow && $employeeaddress_grid->StopRec == 0) {
	$employeeaddress_grid->StopRec = $employeeaddress->GridAddRowCount;
}

// Initialize aggregate
$employeeaddress->RowType = ROWTYPE_AGGREGATEINIT;
$employeeaddress->resetAttributes();
$employeeaddress_grid->renderRow();
if ($employeeaddress->isGridAdd())
	$employeeaddress_grid->RowIndex = 0;
if ($employeeaddress->isGridEdit())
	$employeeaddress_grid->RowIndex = 0;
while ($employeeaddress_grid->RecCnt < $employeeaddress_grid->StopRec) {
	$employeeaddress_grid->RecCnt++;
	if ($employeeaddress_grid->RecCnt >= $employeeaddress_grid->StartRec) {
		$employeeaddress_grid->RowCnt++;
		if ($employeeaddress->isGridAdd() || $employeeaddress->isGridEdit() || $employeeaddress->isConfirm()) {
			$employeeaddress_grid->RowIndex++;
			$CurrentForm->Index = $employeeaddress_grid->RowIndex;
			if ($CurrentForm->hasValue($employeeaddress_grid->FormActionName) && $employeeaddress_grid->EventCancelled)
				$employeeaddress_grid->RowAction = strval($CurrentForm->getValue($employeeaddress_grid->FormActionName));
			elseif ($employeeaddress->isGridAdd())
				$employeeaddress_grid->RowAction = "insert";
			else
				$employeeaddress_grid->RowAction = "";
		}

		// Set up key count
		$employeeaddress_grid->KeyCount = $employeeaddress_grid->RowIndex;

		// Init row class and style
		$employeeaddress->resetAttributes();
		$employeeaddress->CssClass = "";
		if ($employeeaddress->isGridAdd()) {
			if ($employeeaddress->CurrentMode == "copy") {
				$employeeaddress_grid->loadRowValues($employeeaddress_grid->Recordset); // Load row values
				$employeeaddress_grid->setRecordKey($employeeaddress_grid->RowOldKey, $employeeaddress_grid->Recordset); // Set old record key
			} else {
				$employeeaddress_grid->loadRowValues(); // Load default values
				$employeeaddress_grid->RowOldKey = ""; // Clear old key value
			}
		} else {
			$employeeaddress_grid->loadRowValues($employeeaddress_grid->Recordset); // Load row values
		}
		$employeeaddress->RowType = ROWTYPE_VIEW; // Render view
		if ($employeeaddress->isGridAdd()) // Grid add
			$employeeaddress->RowType = ROWTYPE_ADD; // Render add
		if ($employeeaddress->isGridAdd() && $employeeaddress->EventCancelled && !$CurrentForm->hasValue("k_blankrow")) // Insert failed
			$employeeaddress_grid->restoreCurrentRowFormValues($employeeaddress_grid->RowIndex); // Restore form values
		if ($employeeaddress->isGridEdit()) { // Grid edit
			if ($employeeaddress->EventCancelled)
				$employeeaddress_grid->restoreCurrentRowFormValues($employeeaddress_grid->RowIndex); // Restore form values
			if ($employeeaddress_grid->RowAction == "insert")
				$employeeaddress->RowType = ROWTYPE_ADD; // Render add
			else
				$employeeaddress->RowType = ROWTYPE_EDIT; // Render edit
		}
		if ($employeeaddress->isGridEdit() && ($employeeaddress->RowType == ROWTYPE_EDIT || $employeeaddress->RowType == ROWTYPE_ADD) && $employeeaddress->EventCancelled) // Update failed
			$employeeaddress_grid->restoreCurrentRowFormValues($employeeaddress_grid->RowIndex); // Restore form values
		if ($employeeaddress->RowType == ROWTYPE_EDIT) // Edit row
			$employeeaddress_grid->EditRowCnt++;
		if ($employeeaddress->isConfirm()) // Confirm row
			$employeeaddress_grid->restoreCurrentRowFormValues($employeeaddress_grid->RowIndex); // Restore form values

		// Set up row id / data-rowindex
		$employeeaddress->RowAttrs = array_merge($employeeaddress->RowAttrs, array('data-rowindex'=>$employeeaddress_grid->RowCnt, 'id'=>'r' . $employeeaddress_grid->RowCnt . '_employeeaddress', 'data-rowtype'=>$employeeaddress->RowType));

		// Render row
		$employeeaddress_grid->renderRow();

		// Render list options
		$employeeaddress_grid->renderListOptions();

		// Skip delete row / empty row for confirm page
		if ($employeeaddress_grid->RowAction <> "delete" && $employeeaddress_grid->RowAction <> "insertdelete" && !($employeeaddress_grid->RowAction == "insert" && $employeeaddress->isConfirm() && $employeeaddress_grid->emptyRow())) {
?>
	<tr<?php echo $employeeaddress->rowAttributes() ?>>
<?php

// Render list options (body, left)
$employeeaddress_grid->ListOptions->render("body", "left", $employeeaddress_grid->RowCnt);
?>
	<?php if ($employeeaddress->EmployeeID->Visible) { // EmployeeID ?>
		<td data-name="EmployeeID"<?php echo $employeeaddress->EmployeeID->cellAttributes() ?>>
<?php if ($employeeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<?php if ($employeeaddress->EmployeeID->getSessionValue() <> "") { ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_EmployeeID" class="form-group employeeaddress_EmployeeID">
<span<?php echo $employeeaddress->EmployeeID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($employeeaddress->EmployeeID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" value="<?php echo HtmlEncode($employeeaddress->EmployeeID->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_EmployeeID" class="form-group employeeaddress_EmployeeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeeaddress" data-field="x_EmployeeID" data-value-separator="<?php echo $employeeaddress->EmployeeID->displayValueSeparatorAttribute() ?>" id="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID"<?php echo $employeeaddress->EmployeeID->editAttributes() ?>>
		<?php echo $employeeaddress->EmployeeID->selectOptionListHtml("x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID") ?>
	</select>
</div>
<?php echo $employeeaddress->EmployeeID->Lookup->getParamTag("p_x" . $employeeaddress_grid->RowIndex . "_EmployeeID") ?>
</span>
<?php } ?>
<input type="hidden" data-table="employeeaddress" data-field="x_EmployeeID" name="o<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" id="o<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" value="<?php echo HtmlEncode($employeeaddress->EmployeeID->OldValue) ?>">
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<?php if ($employeeaddress->EmployeeID->getSessionValue() <> "") { ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_EmployeeID" class="form-group employeeaddress_EmployeeID">
<span<?php echo $employeeaddress->EmployeeID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($employeeaddress->EmployeeID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" value="<?php echo HtmlEncode($employeeaddress->EmployeeID->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_EmployeeID" class="form-group employeeaddress_EmployeeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeeaddress" data-field="x_EmployeeID" data-value-separator="<?php echo $employeeaddress->EmployeeID->displayValueSeparatorAttribute() ?>" id="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID"<?php echo $employeeaddress->EmployeeID->editAttributes() ?>>
		<?php echo $employeeaddress->EmployeeID->selectOptionListHtml("x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID") ?>
	</select>
</div>
<?php echo $employeeaddress->EmployeeID->Lookup->getParamTag("p_x" . $employeeaddress_grid->RowIndex . "_EmployeeID") ?>
</span>
<?php } ?>
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_EmployeeID" class="employeeaddress_EmployeeID">
<span<?php echo $employeeaddress->EmployeeID->viewAttributes() ?>>
<?php echo $employeeaddress->EmployeeID->getViewValue() ?></span>
</span>
<?php if (!$employeeaddress->isConfirm()) { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_EmployeeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" id="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" value="<?php echo HtmlEncode($employeeaddress->EmployeeID->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_EmployeeID" name="o<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" id="o<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" value="<?php echo HtmlEncode($employeeaddress->EmployeeID->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_EmployeeID" name="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" id="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" value="<?php echo HtmlEncode($employeeaddress->EmployeeID->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_EmployeeID" name="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" id="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" value="<?php echo HtmlEncode($employeeaddress->EmployeeID->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<input type="hidden" data-table="employeeaddress" data-field="x_AddressID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressID" id="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressID" value="<?php echo HtmlEncode($employeeaddress->AddressID->CurrentValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_AddressID" name="o<?php echo $employeeaddress_grid->RowIndex ?>_AddressID" id="o<?php echo $employeeaddress_grid->RowIndex ?>_AddressID" value="<?php echo HtmlEncode($employeeaddress->AddressID->OldValue) ?>">
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_EDIT || $employeeaddress->CurrentMode == "edit") { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_AddressID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressID" id="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressID" value="<?php echo HtmlEncode($employeeaddress->AddressID->CurrentValue) ?>">
<?php } ?>
	<?php if ($employeeaddress->AddressTypeID->Visible) { // AddressTypeID ?>
		<td data-name="AddressTypeID"<?php echo $employeeaddress->AddressTypeID->cellAttributes() ?>>
<?php if ($employeeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_AddressTypeID" class="form-group employeeaddress_AddressTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeeaddress" data-field="x_AddressTypeID" data-value-separator="<?php echo $employeeaddress->AddressTypeID->displayValueSeparatorAttribute() ?>" id="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID"<?php echo $employeeaddress->AddressTypeID->editAttributes() ?>>
		<?php echo $employeeaddress->AddressTypeID->selectOptionListHtml("x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID") ?>
	</select>
</div>
<?php echo $employeeaddress->AddressTypeID->Lookup->getParamTag("p_x" . $employeeaddress_grid->RowIndex . "_AddressTypeID") ?>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_AddressTypeID" name="o<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" id="o<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($employeeaddress->AddressTypeID->OldValue) ?>">
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_AddressTypeID" class="form-group employeeaddress_AddressTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeeaddress" data-field="x_AddressTypeID" data-value-separator="<?php echo $employeeaddress->AddressTypeID->displayValueSeparatorAttribute() ?>" id="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID"<?php echo $employeeaddress->AddressTypeID->editAttributes() ?>>
		<?php echo $employeeaddress->AddressTypeID->selectOptionListHtml("x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID") ?>
	</select>
</div>
<?php echo $employeeaddress->AddressTypeID->Lookup->getParamTag("p_x" . $employeeaddress_grid->RowIndex . "_AddressTypeID") ?>
</span>
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_AddressTypeID" class="employeeaddress_AddressTypeID">
<span<?php echo $employeeaddress->AddressTypeID->viewAttributes() ?>>
<?php echo $employeeaddress->AddressTypeID->getViewValue() ?></span>
</span>
<?php if (!$employeeaddress->isConfirm()) { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_AddressTypeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" id="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($employeeaddress->AddressTypeID->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_AddressTypeID" name="o<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" id="o<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($employeeaddress->AddressTypeID->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_AddressTypeID" name="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" id="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($employeeaddress->AddressTypeID->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_AddressTypeID" name="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" id="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($employeeaddress->AddressTypeID->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($employeeaddress->Address->Visible) { // Address ?>
		<td data-name="Address"<?php echo $employeeaddress->Address->cellAttributes() ?>>
<?php if ($employeeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Address" class="form-group employeeaddress_Address">
<input type="text" data-table="employeeaddress" data-field="x_Address" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Address" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Address" size="30" maxlength="150" placeholder="<?php echo HtmlEncode($employeeaddress->Address->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->Address->EditValue ?>"<?php echo $employeeaddress->Address->editAttributes() ?>>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_Address" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Address" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($employeeaddress->Address->OldValue) ?>">
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Address" class="form-group employeeaddress_Address">
<input type="text" data-table="employeeaddress" data-field="x_Address" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Address" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Address" size="30" maxlength="150" placeholder="<?php echo HtmlEncode($employeeaddress->Address->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->Address->EditValue ?>"<?php echo $employeeaddress->Address->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Address" class="employeeaddress_Address">
<span<?php echo $employeeaddress->Address->viewAttributes() ?>>
<?php echo $employeeaddress->Address->getViewValue() ?></span>
</span>
<?php if (!$employeeaddress->isConfirm()) { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Address" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Address" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($employeeaddress->Address->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_Address" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Address" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($employeeaddress->Address->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Address" name="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_Address" id="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($employeeaddress->Address->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_Address" name="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_Address" id="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($employeeaddress->Address->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($employeeaddress->City->Visible) { // City ?>
		<td data-name="City"<?php echo $employeeaddress->City->cellAttributes() ?>>
<?php if ($employeeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_City" class="form-group employeeaddress_City">
<input type="text" data-table="employeeaddress" data-field="x_City" name="x<?php echo $employeeaddress_grid->RowIndex ?>_City" id="x<?php echo $employeeaddress_grid->RowIndex ?>_City" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($employeeaddress->City->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->City->EditValue ?>"<?php echo $employeeaddress->City->editAttributes() ?>>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_City" name="o<?php echo $employeeaddress_grid->RowIndex ?>_City" id="o<?php echo $employeeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($employeeaddress->City->OldValue) ?>">
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_City" class="form-group employeeaddress_City">
<input type="text" data-table="employeeaddress" data-field="x_City" name="x<?php echo $employeeaddress_grid->RowIndex ?>_City" id="x<?php echo $employeeaddress_grid->RowIndex ?>_City" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($employeeaddress->City->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->City->EditValue ?>"<?php echo $employeeaddress->City->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_City" class="employeeaddress_City">
<span<?php echo $employeeaddress->City->viewAttributes() ?>>
<?php echo $employeeaddress->City->getViewValue() ?></span>
</span>
<?php if (!$employeeaddress->isConfirm()) { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_City" name="x<?php echo $employeeaddress_grid->RowIndex ?>_City" id="x<?php echo $employeeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($employeeaddress->City->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_City" name="o<?php echo $employeeaddress_grid->RowIndex ?>_City" id="o<?php echo $employeeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($employeeaddress->City->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_City" name="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_City" id="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($employeeaddress->City->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_City" name="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_City" id="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($employeeaddress->City->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($employeeaddress->Region->Visible) { // Region ?>
		<td data-name="Region"<?php echo $employeeaddress->Region->cellAttributes() ?>>
<?php if ($employeeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Region" class="form-group employeeaddress_Region">
<input type="text" data-table="employeeaddress" data-field="x_Region" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Region" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Region" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($employeeaddress->Region->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->Region->EditValue ?>"<?php echo $employeeaddress->Region->editAttributes() ?>>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_Region" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Region" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($employeeaddress->Region->OldValue) ?>">
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Region" class="form-group employeeaddress_Region">
<input type="text" data-table="employeeaddress" data-field="x_Region" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Region" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Region" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($employeeaddress->Region->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->Region->EditValue ?>"<?php echo $employeeaddress->Region->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Region" class="employeeaddress_Region">
<span<?php echo $employeeaddress->Region->viewAttributes() ?>>
<?php echo $employeeaddress->Region->getViewValue() ?></span>
</span>
<?php if (!$employeeaddress->isConfirm()) { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Region" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Region" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($employeeaddress->Region->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_Region" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Region" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($employeeaddress->Region->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Region" name="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_Region" id="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($employeeaddress->Region->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_Region" name="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_Region" id="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($employeeaddress->Region->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($employeeaddress->PostalCode->Visible) { // PostalCode ?>
		<td data-name="PostalCode"<?php echo $employeeaddress->PostalCode->cellAttributes() ?>>
<?php if ($employeeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_PostalCode" class="form-group employeeaddress_PostalCode">
<input type="text" data-table="employeeaddress" data-field="x_PostalCode" name="x<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" id="x<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" size="30" maxlength="10" placeholder="<?php echo HtmlEncode($employeeaddress->PostalCode->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->PostalCode->EditValue ?>"<?php echo $employeeaddress->PostalCode->editAttributes() ?>>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_PostalCode" name="o<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" id="o<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($employeeaddress->PostalCode->OldValue) ?>">
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_PostalCode" class="form-group employeeaddress_PostalCode">
<input type="text" data-table="employeeaddress" data-field="x_PostalCode" name="x<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" id="x<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" size="30" maxlength="10" placeholder="<?php echo HtmlEncode($employeeaddress->PostalCode->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->PostalCode->EditValue ?>"<?php echo $employeeaddress->PostalCode->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_PostalCode" class="employeeaddress_PostalCode">
<span<?php echo $employeeaddress->PostalCode->viewAttributes() ?>>
<?php echo $employeeaddress->PostalCode->getViewValue() ?></span>
</span>
<?php if (!$employeeaddress->isConfirm()) { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_PostalCode" name="x<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" id="x<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($employeeaddress->PostalCode->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_PostalCode" name="o<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" id="o<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($employeeaddress->PostalCode->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_PostalCode" name="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" id="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($employeeaddress->PostalCode->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_PostalCode" name="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" id="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($employeeaddress->PostalCode->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($employeeaddress->Country->Visible) { // Country ?>
		<td data-name="Country"<?php echo $employeeaddress->Country->cellAttributes() ?>>
<?php if ($employeeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Country" class="form-group employeeaddress_Country">
<input type="text" data-table="employeeaddress" data-field="x_Country" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Country" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Country" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($employeeaddress->Country->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->Country->EditValue ?>"<?php echo $employeeaddress->Country->editAttributes() ?>>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_Country" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Country" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($employeeaddress->Country->OldValue) ?>">
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Country" class="form-group employeeaddress_Country">
<input type="text" data-table="employeeaddress" data-field="x_Country" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Country" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Country" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($employeeaddress->Country->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->Country->EditValue ?>"<?php echo $employeeaddress->Country->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Country" class="employeeaddress_Country">
<span<?php echo $employeeaddress->Country->viewAttributes() ?>>
<?php echo $employeeaddress->Country->getViewValue() ?></span>
</span>
<?php if (!$employeeaddress->isConfirm()) { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Country" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Country" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($employeeaddress->Country->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_Country" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Country" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($employeeaddress->Country->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Country" name="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_Country" id="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($employeeaddress->Country->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_Country" name="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_Country" id="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($employeeaddress->Country->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($employeeaddress->Notes->Visible) { // Notes ?>
		<td data-name="Notes"<?php echo $employeeaddress->Notes->cellAttributes() ?>>
<?php if ($employeeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Notes" class="form-group employeeaddress_Notes">
<input type="text" data-table="employeeaddress" data-field="x_Notes" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Notes" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($employeeaddress->Notes->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->Notes->EditValue ?>"<?php echo $employeeaddress->Notes->editAttributes() ?>>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_Notes" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Notes" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($employeeaddress->Notes->OldValue) ?>">
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Notes" class="form-group employeeaddress_Notes">
<input type="text" data-table="employeeaddress" data-field="x_Notes" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Notes" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($employeeaddress->Notes->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->Notes->EditValue ?>"<?php echo $employeeaddress->Notes->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Notes" class="employeeaddress_Notes">
<span<?php echo $employeeaddress->Notes->viewAttributes() ?>>
<?php echo $employeeaddress->Notes->getViewValue() ?></span>
</span>
<?php if (!$employeeaddress->isConfirm()) { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Notes" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Notes" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($employeeaddress->Notes->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_Notes" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Notes" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($employeeaddress->Notes->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Notes" name="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_Notes" id="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($employeeaddress->Notes->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_Notes" name="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_Notes" id="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($employeeaddress->Notes->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($employeeaddress->Primary->Visible) { // Primary ?>
		<td data-name="Primary"<?php echo $employeeaddress->Primary->cellAttributes() ?>>
<?php if ($employeeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Primary" class="form-group employeeaddress_Primary">
<?php
$selwrk = (ConvertToBool($employeeaddress->Primary->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="employeeaddress" data-field="x_Primary" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" value="1"<?php echo $selwrk ?><?php echo $employeeaddress->Primary->editAttributes() ?>>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_Primary" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" value="<?php echo HtmlEncode($employeeaddress->Primary->OldValue) ?>">
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Primary" class="form-group employeeaddress_Primary">
<?php
$selwrk = (ConvertToBool($employeeaddress->Primary->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="employeeaddress" data-field="x_Primary" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" value="1"<?php echo $selwrk ?><?php echo $employeeaddress->Primary->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($employeeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $employeeaddress_grid->RowCnt ?>_employeeaddress_Primary" class="employeeaddress_Primary">
<span<?php echo $employeeaddress->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($employeeaddress->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $employeeaddress->Primary->getViewValue() ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $employeeaddress->Primary->getViewValue() ?>" disabled>
<?php } ?>
</span>
</span>
<?php if (!$employeeaddress->isConfirm()) { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Primary" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Primary" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Primary" value="<?php echo HtmlEncode($employeeaddress->Primary->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_Primary" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" value="<?php echo HtmlEncode($employeeaddress->Primary->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Primary" name="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_Primary" id="femployeeaddressgrid$x<?php echo $employeeaddress_grid->RowIndex ?>_Primary" value="<?php echo HtmlEncode($employeeaddress->Primary->FormValue) ?>">
<input type="hidden" data-table="employeeaddress" data-field="x_Primary" name="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" id="femployeeaddressgrid$o<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" value="<?php echo HtmlEncode($employeeaddress->Primary->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
<?php

// Render list options (body, right)
$employeeaddress_grid->ListOptions->render("body", "right", $employeeaddress_grid->RowCnt);
?>
	</tr>
<?php if ($employeeaddress->RowType == ROWTYPE_ADD || $employeeaddress->RowType == ROWTYPE_EDIT) { ?>
<script>
femployeeaddressgrid.updateLists(<?php echo $employeeaddress_grid->RowIndex ?>);
</script>
<?php } ?>
<?php
	}
	} // End delete row checking
	if (!$employeeaddress->isGridAdd() || $employeeaddress->CurrentMode == "copy")
		if (!$employeeaddress_grid->Recordset->EOF)
			$employeeaddress_grid->Recordset->moveNext();
}
?>
<?php
	if ($employeeaddress->CurrentMode == "add" || $employeeaddress->CurrentMode == "copy" || $employeeaddress->CurrentMode == "edit") {
		$employeeaddress_grid->RowIndex = '$rowindex$';
		$employeeaddress_grid->loadRowValues();

		// Set row properties
		$employeeaddress->resetAttributes();
		$employeeaddress->RowAttrs = array_merge($employeeaddress->RowAttrs, array('data-rowindex'=>$employeeaddress_grid->RowIndex, 'id'=>'r0_employeeaddress', 'data-rowtype'=>ROWTYPE_ADD));
		AppendClass($employeeaddress->RowAttrs["class"], "ew-template");
		$employeeaddress->RowType = ROWTYPE_ADD;

		// Render row
		$employeeaddress_grid->renderRow();

		// Render list options
		$employeeaddress_grid->renderListOptions();
		$employeeaddress_grid->StartRowCnt = 0;
?>
	<tr<?php echo $employeeaddress->rowAttributes() ?>>
<?php

// Render list options (body, left)
$employeeaddress_grid->ListOptions->render("body", "left", $employeeaddress_grid->RowIndex);
?>
	<?php if ($employeeaddress->EmployeeID->Visible) { // EmployeeID ?>
		<td data-name="EmployeeID">
<?php if (!$employeeaddress->isConfirm()) { ?>
<?php if ($employeeaddress->EmployeeID->getSessionValue() <> "") { ?>
<span id="el$rowindex$_employeeaddress_EmployeeID" class="form-group employeeaddress_EmployeeID">
<span<?php echo $employeeaddress->EmployeeID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($employeeaddress->EmployeeID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" value="<?php echo HtmlEncode($employeeaddress->EmployeeID->CurrentValue) ?>">
<?php } else { ?>
<span id="el$rowindex$_employeeaddress_EmployeeID" class="form-group employeeaddress_EmployeeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeeaddress" data-field="x_EmployeeID" data-value-separator="<?php echo $employeeaddress->EmployeeID->displayValueSeparatorAttribute() ?>" id="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID"<?php echo $employeeaddress->EmployeeID->editAttributes() ?>>
		<?php echo $employeeaddress->EmployeeID->selectOptionListHtml("x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID") ?>
	</select>
</div>
<?php echo $employeeaddress->EmployeeID->Lookup->getParamTag("p_x" . $employeeaddress_grid->RowIndex . "_EmployeeID") ?>
</span>
<?php } ?>
<?php } else { ?>
<span id="el$rowindex$_employeeaddress_EmployeeID" class="form-group employeeaddress_EmployeeID">
<span<?php echo $employeeaddress->EmployeeID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($employeeaddress->EmployeeID->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_EmployeeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" id="x<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" value="<?php echo HtmlEncode($employeeaddress->EmployeeID->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="employeeaddress" data-field="x_EmployeeID" name="o<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" id="o<?php echo $employeeaddress_grid->RowIndex ?>_EmployeeID" value="<?php echo HtmlEncode($employeeaddress->EmployeeID->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($employeeaddress->AddressTypeID->Visible) { // AddressTypeID ?>
		<td data-name="AddressTypeID">
<?php if (!$employeeaddress->isConfirm()) { ?>
<span id="el$rowindex$_employeeaddress_AddressTypeID" class="form-group employeeaddress_AddressTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeeaddress" data-field="x_AddressTypeID" data-value-separator="<?php echo $employeeaddress->AddressTypeID->displayValueSeparatorAttribute() ?>" id="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID"<?php echo $employeeaddress->AddressTypeID->editAttributes() ?>>
		<?php echo $employeeaddress->AddressTypeID->selectOptionListHtml("x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID") ?>
	</select>
</div>
<?php echo $employeeaddress->AddressTypeID->Lookup->getParamTag("p_x" . $employeeaddress_grid->RowIndex . "_AddressTypeID") ?>
</span>
<?php } else { ?>
<span id="el$rowindex$_employeeaddress_AddressTypeID" class="form-group employeeaddress_AddressTypeID">
<span<?php echo $employeeaddress->AddressTypeID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($employeeaddress->AddressTypeID->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_AddressTypeID" name="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" id="x<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($employeeaddress->AddressTypeID->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="employeeaddress" data-field="x_AddressTypeID" name="o<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" id="o<?php echo $employeeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($employeeaddress->AddressTypeID->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($employeeaddress->Address->Visible) { // Address ?>
		<td data-name="Address">
<?php if (!$employeeaddress->isConfirm()) { ?>
<span id="el$rowindex$_employeeaddress_Address" class="form-group employeeaddress_Address">
<input type="text" data-table="employeeaddress" data-field="x_Address" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Address" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Address" size="30" maxlength="150" placeholder="<?php echo HtmlEncode($employeeaddress->Address->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->Address->EditValue ?>"<?php echo $employeeaddress->Address->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_employeeaddress_Address" class="form-group employeeaddress_Address">
<span<?php echo $employeeaddress->Address->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($employeeaddress->Address->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_Address" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Address" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($employeeaddress->Address->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Address" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Address" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($employeeaddress->Address->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($employeeaddress->City->Visible) { // City ?>
		<td data-name="City">
<?php if (!$employeeaddress->isConfirm()) { ?>
<span id="el$rowindex$_employeeaddress_City" class="form-group employeeaddress_City">
<input type="text" data-table="employeeaddress" data-field="x_City" name="x<?php echo $employeeaddress_grid->RowIndex ?>_City" id="x<?php echo $employeeaddress_grid->RowIndex ?>_City" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($employeeaddress->City->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->City->EditValue ?>"<?php echo $employeeaddress->City->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_employeeaddress_City" class="form-group employeeaddress_City">
<span<?php echo $employeeaddress->City->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($employeeaddress->City->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_City" name="x<?php echo $employeeaddress_grid->RowIndex ?>_City" id="x<?php echo $employeeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($employeeaddress->City->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="employeeaddress" data-field="x_City" name="o<?php echo $employeeaddress_grid->RowIndex ?>_City" id="o<?php echo $employeeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($employeeaddress->City->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($employeeaddress->Region->Visible) { // Region ?>
		<td data-name="Region">
<?php if (!$employeeaddress->isConfirm()) { ?>
<span id="el$rowindex$_employeeaddress_Region" class="form-group employeeaddress_Region">
<input type="text" data-table="employeeaddress" data-field="x_Region" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Region" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Region" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($employeeaddress->Region->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->Region->EditValue ?>"<?php echo $employeeaddress->Region->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_employeeaddress_Region" class="form-group employeeaddress_Region">
<span<?php echo $employeeaddress->Region->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($employeeaddress->Region->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_Region" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Region" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($employeeaddress->Region->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Region" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Region" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($employeeaddress->Region->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($employeeaddress->PostalCode->Visible) { // PostalCode ?>
		<td data-name="PostalCode">
<?php if (!$employeeaddress->isConfirm()) { ?>
<span id="el$rowindex$_employeeaddress_PostalCode" class="form-group employeeaddress_PostalCode">
<input type="text" data-table="employeeaddress" data-field="x_PostalCode" name="x<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" id="x<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" size="30" maxlength="10" placeholder="<?php echo HtmlEncode($employeeaddress->PostalCode->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->PostalCode->EditValue ?>"<?php echo $employeeaddress->PostalCode->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_employeeaddress_PostalCode" class="form-group employeeaddress_PostalCode">
<span<?php echo $employeeaddress->PostalCode->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($employeeaddress->PostalCode->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_PostalCode" name="x<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" id="x<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($employeeaddress->PostalCode->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="employeeaddress" data-field="x_PostalCode" name="o<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" id="o<?php echo $employeeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($employeeaddress->PostalCode->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($employeeaddress->Country->Visible) { // Country ?>
		<td data-name="Country">
<?php if (!$employeeaddress->isConfirm()) { ?>
<span id="el$rowindex$_employeeaddress_Country" class="form-group employeeaddress_Country">
<input type="text" data-table="employeeaddress" data-field="x_Country" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Country" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Country" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($employeeaddress->Country->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->Country->EditValue ?>"<?php echo $employeeaddress->Country->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_employeeaddress_Country" class="form-group employeeaddress_Country">
<span<?php echo $employeeaddress->Country->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($employeeaddress->Country->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_Country" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Country" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($employeeaddress->Country->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Country" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Country" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($employeeaddress->Country->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($employeeaddress->Notes->Visible) { // Notes ?>
		<td data-name="Notes">
<?php if (!$employeeaddress->isConfirm()) { ?>
<span id="el$rowindex$_employeeaddress_Notes" class="form-group employeeaddress_Notes">
<input type="text" data-table="employeeaddress" data-field="x_Notes" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Notes" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($employeeaddress->Notes->getPlaceHolder()) ?>" value="<?php echo $employeeaddress->Notes->EditValue ?>"<?php echo $employeeaddress->Notes->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_employeeaddress_Notes" class="form-group employeeaddress_Notes">
<span<?php echo $employeeaddress->Notes->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($employeeaddress->Notes->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_Notes" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Notes" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($employeeaddress->Notes->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Notes" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Notes" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($employeeaddress->Notes->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($employeeaddress->Primary->Visible) { // Primary ?>
		<td data-name="Primary">
<?php if (!$employeeaddress->isConfirm()) { ?>
<span id="el$rowindex$_employeeaddress_Primary" class="form-group employeeaddress_Primary">
<?php
$selwrk = (ConvertToBool($employeeaddress->Primary->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="employeeaddress" data-field="x_Primary" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" value="1"<?php echo $selwrk ?><?php echo $employeeaddress->Primary->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_employeeaddress_Primary" class="form-group employeeaddress_Primary">
<span<?php echo $employeeaddress->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($employeeaddress->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $employeeaddress->Primary->ViewValue ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $employeeaddress->Primary->ViewValue ?>" disabled>
<?php } ?>
</span>
</span>
<input type="hidden" data-table="employeeaddress" data-field="x_Primary" name="x<?php echo $employeeaddress_grid->RowIndex ?>_Primary" id="x<?php echo $employeeaddress_grid->RowIndex ?>_Primary" value="<?php echo HtmlEncode($employeeaddress->Primary->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="employeeaddress" data-field="x_Primary" name="o<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" id="o<?php echo $employeeaddress_grid->RowIndex ?>_Primary[]" value="<?php echo HtmlEncode($employeeaddress->Primary->OldValue) ?>">
</td>
	<?php } ?>
<?php

// Render list options (body, right)
$employeeaddress_grid->ListOptions->render("body", "right", $employeeaddress_grid->RowIndex);
?>
<script>
femployeeaddressgrid.updateLists(<?php echo $employeeaddress_grid->RowIndex ?>);
</script>
	</tr>
<?php
}
?>
</tbody>
</table><!-- /.ew-table -->
<?php if ($employeeaddress->CurrentMode == "add" || $employeeaddress->CurrentMode == "copy") { ?>
<input type="hidden" name="<?php echo $employeeaddress_grid->FormKeyCountName ?>" id="<?php echo $employeeaddress_grid->FormKeyCountName ?>" value="<?php echo $employeeaddress_grid->KeyCount ?>">
<?php echo $employeeaddress_grid->MultiSelectKey ?>
<?php } ?>
<?php if ($employeeaddress->CurrentMode == "edit") { ?>
<input type="hidden" name="<?php echo $employeeaddress_grid->FormKeyCountName ?>" id="<?php echo $employeeaddress_grid->FormKeyCountName ?>" value="<?php echo $employeeaddress_grid->KeyCount ?>">
<?php echo $employeeaddress_grid->MultiSelectKey ?>
<?php } ?>
<?php if ($employeeaddress->CurrentMode == "") { ?>
<input type="hidden" name="action" id="action" value="">
<?php } ?>
<input type="hidden" name="detailpage" value="femployeeaddressgrid">
</div><!-- /.ew-grid-middle-panel -->
<?php

// Close recordset
if ($employeeaddress_grid->Recordset)
	$employeeaddress_grid->Recordset->Close();
?>
</div>
<?php if ($employeeaddress_grid->ShowOtherOptions) { ?>
<div class="card-footer ew-grid-lower-panel">
<?php $employeeaddress_grid->OtherOptions->render("body", "bottom") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
</div><!-- /.ew-grid -->
<?php } ?>
<?php if ($employeeaddress_grid->TotalRecs == 0 && !$employeeaddress->CurrentAction) { // Show other options ?>
<div class="ew-list-other-options">
<?php $employeeaddress_grid->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<?php
$employeeaddress_grid->terminate();
?>
<?php if (!$employeeaddress->isExport()) { ?>
<script>
ew.scrollableTable("gmp_employeeaddress", "", "");
</script>
<?php } ?>
