@ -124,14 +124,17 @@
@* <a href="#edit-personal-details" data-bs-toggle="modal" class="ms-auto text-2 text-uppercase btn-link">
@* <a href="#edit-personal-details" data-bs-toggle="modal" class="ms-auto text-2 text-uppercase btn-link">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
</a> *@
</a> *@
<a href="#edit-personal-details" data-bs-toggle="modal" class="ms-auto text-1 text-uppercase btn-link">
@* <a href="#edit-personal-details" data-bs-toggle="modal" class="ms-auto text-1 text-uppercase btn-link">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
</a>
</a> *@
</h3>
</h3>
<hr class="mx-n4 mb-4" />
<hr class="mx-n4 mb-4" />
<div class="row gx-3 align-items-center">
<div class="row gx-3 align-items-center">
<p class="col-sm-3 text-muted text-sm-end mb-0 mb-sm-3">ZipCode:</p>
<p class="col-sm-3 text-muted text-sm-end mb-0 mb-sm-3">ZipCode:</p>
<p class="col-sm-9 text-3" id="zipCode"></p>
<p class="col-sm-9 text-3" id="zipCode"></p>
<a href="#edit-personal-details" data-bs-toggle="modal" class="ms-auto text-1 text-uppercase btn-link">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
</a>
</div>
</div>
<div class="row gx-3 align-items-center">
<div class="row gx-3 align-items-center">
@ -167,15 +170,15 @@
<hr />
<hr />
<div class="row g-3">
<div class="row g-3">
<div class="col-12 col-sm-6">
@* <div class="col-12 col-sm-6">
<label for="postalCode" class="form-label">City</label>
<label for="postalCode" class="form-label">City</label>
<input type="text" class="form-control" required placeholder="City" readonly />
<input type="text" class="form-control" required placeholder="City" readonly />
</div>
</div> *@
<input asp-for="customerId" hidden/>
<div class="col-12 col-sm-6">
<div class="col-12 col-sm-6">
<label for="zipCode" class="form-label">Zip Code</label>
<label for="zipCode" class="form-label">Zip Code</label>
<input asp-for="postalCode" type="text" class="form-control" required placeholder="City " />
<input asp-for="postalCode" type="text" class="form-control" required placeholder="Zip Code " />
<span class="input-group-text px-2">
<span class="input-group-text px-2">
<button class="btn-choose bg-transparent text-white border-0" id="btnSearch" type="button">Lookup</button>
<button class="btn-choose bg-transparent text-white border-0" id="btnSearch" type="button">Lookup</button>
</span>
</span>
@ -215,7 +218,7 @@
<input type="text" class="form-control" asp-for="address2" />
<input type="text" class="form-control" asp-for="address2" />
</div>
</div>
<div class="col-12 mt-4 d-grid"><button class="btn btn-primary" type="submit">Sav e Changes</button></div>
<div class="col-12 mt-4 d-grid"><button class="btn btn-primary" type="submit" onclick="UpdateAddress()">Updat e Changes</button></div>
</div>
</div>
</form>
</form>
</div>
</div>
@ -426,9 +429,33 @@
}
}
function UpdateAddress() {
debugger;
$.ajax({
url: "/Customer/UpdateCustomer",
type: "post",
anync: false,
data: {
//CustomerId: $("#customerId").val(),
zipCode: $("#postalCode").val(),
address: $("#address").val(),
address2: $("#address2").val(),
},
success: function (data) {
debugger;
if (data === 1) {
alert("Updated Successfully");
}
},
error: function (data) {
alert("Sorry Couldn't be updated");
}
}
);
}
</script>
</script>
}
}