EOS/Views/Notifications/Inventory/ManageOwner_GetOwnerDetails.cshtml
Nidhi Bhargava f0c1ab20e1 code push
2025-09-04 16:25:07 +05:30

180 lines
11 KiB
Plaintext

@model GODATA.Models.Inventory.ManageOwner
@using (Ajax.BeginForm("", "", new AjaxOptions { HttpMethod = "POST" }, new { @id = "Form2" }))
{
@Html.HiddenFor(model => model.CustomerId, new { @id = "hdnCustomerId" })
@Html.ValidationSummary(true)
@Html.HiddenFor(model => model.OwnerCityId)
<div id="divDetails" class="listDetails">
<div class="ldSection">
<table class="themeTable" cellpadding="5" cellspacing="0">
<tbody class="StructureTD">
<tr>
<td class="tableCelllabel">
<span class="darktxt">@Html.DisplayNameFor(model => model.CustomerCustomerName)</span>
</td>
<td class="tableCellinfo">
@Html.TextBoxFor(model => model.CustomerCustomerName, new { @onkeypress = "return AllowSpecialCharacterForOwner(event,this)" })
<span id="spanOwnerName" class="error" style="display: none; color: red">*</span>
<td class="tableCelllabel">
<span class="darktxt">@Html.DisplayNameFor(model => model.CustomerMobileNumber1)</span>
</td>
<td class="tableCellinfo">
@Html.TextBoxFor(model => model.CustomerMobileNumber1, new { @onblur = "CheckDUP(3)", @onkeypress = "return isNumber(event,this);", @maxlength = "10" })
<span id="spanOwnerMobileNo" class="error" style="display: none; color: red">*</span>
</td>
</tr>
<tr>
<td class="tableCelllabel">
<span class="darktxt">@Html.DisplayNameFor(model => model.CustomerAddress)</span>
</td>
<td class="tableCellinfo">
@Html.TextBoxFor(model => model.CustomerAddress, new { @id = "OwnerAddress" })
<span id="spanOwnerAddress" class="error" style="display: none; color: red">*</span>
</td>
<td class="tableCelllabel bordernone">
<span class="darktxt">@Html.DisplayNameFor(model => model.CustomerEmailId)</span>
</td>
<td class="tableCellinfo bordernone">
@Html.TextBoxFor(model => model.CustomerEmailId)
<span id="spanOwnerEmailId" class="error" style="display: none; color: red">*</span>
</td>
</tr>
<tr>
<td class="tableCelllabel">
<span class="darktxt">@Html.DisplayNameFor(model => model.CustomerState)</span>
</td>
<td class="tableCellinfo">
@Html.DropDownListFor(model => model.OwnerStateId, (IEnumerable<SelectListItem>)ViewBag.StateList, "-Select-", new { @id = "ddlOwnerState", @onchange = "LoadCityList('#ddlOwnerState','#ddlOwnerCity')" })
<span id="spanOwnerState" class="error" style="display: none; color: red">*</span>
</td>
<td class="tableCelllabel">
<span class="darktxt">@Html.DisplayNameFor(model => model.CustomerCity)</span>
</td>
<td class="tableCellinfo">
<select id="ddlOwnerCity" data-val="true" data-val-required="*" name="City">
<option value="-Select-">-Select-</option>
</select>
<span id="spanOwnerCity" class="error" style="display: none; color: red">*</span>
</td>
</tr>
<tr>
<td class="tableCelllabel">
<span class="darktxt">@Html.DisplayNameFor(model => model.IsKamUser)</span>
</td>
<td class="tableCellinfo">
@Html.CheckBoxFor(model => model.IsKamUser, new { @style = "height: 18px;" })
<span id="spanIsKam" class="error" style="display: none; color: red">*</span>
</td>
<td class="tableCelllabel"><span class="darktxt">@Html.DisplayNameFor(model => model.LicenseKey)</span></td>
<td class="tableCellinfo"><span class="darktxt">@Html.DisplayFor(model => model.LicenseKey)</span></td>
</tr>
</tbody>
</table>
<div class="DInv_Tbl_Wrapper Manage_Owner">
<a class='k-button k-button-icontext' onclick='AddVechileDetl()' href='#'>Add Vehicle</a>
@(Html.Kendo().Grid(Model.plsVechileList)
.Name("gridVechile").Filterable().Pageable().Scrollable().Resizable(resize => resize.Columns(true))
.Events(events => events.DataBound("onRowBoundVechile").ColumnResize("onColumnResize")).Sortable()
.ClientDetailTemplateId("template")
//.HtmlAttributes(new { style = "height:430px;" })
.Columns(columns =>
{
columns.Bound(model => model.VehicleId).Hidden();
columns.Bound(model => model.CustomerId).Hidden();
columns.Bound(model => model.CustomerCustomerName).Hidden();
columns.Bound(model => model.CustomerMobileNumber1).Hidden();
columns.Bound(model => model.CustomerAddress).Hidden();
columns.Bound(model => model.CustomerState).Hidden();
columns.Bound(model => model.CustomerCity).Hidden();
columns.Bound(model => model.IsDealetedVehicle).Hidden();
columns.Bound(model => model.VehicleModelNumber).Hidden();
columns.Bound(model => model.VehicleRegistrationNumber);
columns.Bound(model => model.VehicleNumberPlate);
columns.Bound(model => model.CustomerVehicleModelName);
columns.Bound(model => model.VehicleType);
columns.Bound(model => model.CustomerVehicleModelTagging);
columns.Bound(model => model.VehicleInstallationDate);
columns.Command(command =>
command.Custom("AddCustomer").Text("Add Driver").Click("AddCustDetl").HtmlAttributes(new { title = "Add Driver", @id = "cmdVanLocation" }));
columns.Command(command =>
{
command.Custom("Edit").Text("").Click("editVechile").HtmlAttributes(new { title = "Edit" });
command.Custom("Delete").Text("").Click("DeleteVechile").HtmlAttributes(new { title = "Delete", @id = "cmdDelete" });
}).Title("Device Actions");
})
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.PageSize((int)ViewBag.pageSize)
.ServerOperation(false)
)
)
</div>
</div>
</div>
<script id="template" type="text/kendo-tmpl">
@(Html.Kendo().Grid<GODATA.Models.Inventory.ManageOwner>()
.Name("gridCust_#=VehicleRegistrationNumber#").Filterable().Pageable().Scrollable().Resizable(resize => resize.Columns(true))
.Events(events => events.DataBound("onRowBoundCust").ColumnResize("onColumnResize"))
.Sortable()
.Columns(columns =>
{
columns.Bound(o => o.CustomerCustomerName).Width(160);
columns.Bound(o => o.CustomerEmailId).Width(160);
columns.Bound(o => o.CustomerMobileNumber1).Width(130);
columns.Bound(o => o.CustomerAddress).Width(155);
columns.Bound(o => o.CustomerState).Width(137);
columns.Bound(o => o.CustomerCity).Width(130);
columns.Bound(o => o.VehicleId).Hidden();
columns.Bound(o => o.CustomerId).Hidden();
columns.Bound(model => model.IsDeleted).Hidden();
columns.Bound(model => model.VehicleRegistrationNumber).Hidden();
columns.Bound(model => model.VehicleNumberPlate).Hidden();
columns.Bound(model => model.VehicleModelNumber).Hidden();
columns.Bound(model => model.VehicleType).Hidden();
columns.Bound(model => model.CustomerVehicleModelTagging).Hidden();
columns.Bound(model => model.VehicleInstallationDate).Hidden();
columns.Command(command =>
{
command.Custom("Edit").Text("").Click("editCust").HtmlAttributes(new { title = "Edit" });
command.Custom("Delete").Text("").Click("DeleteCust").HtmlAttributes(new { title = "Delete", @id = "cmdDeleteVech" });
}).Title("Device Actions");
})
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.PageSize((int)ViewBag.pageSize)
.ServerOperation(false)
.Read(read => read.Action("GetCustList", "Inventory", new
{
VechileIdNo = "#=VehicleId#",
CustId = "#=CustomerId#",
CustomerName = "#=CustomerCustomerName#",
CustMobNo = "#=CustomerMobileNumber1#",
CustomerAddress = "#=CustomerAddress#",
CustState = "#=CustomerState#",
CustCity = "#=CustomerCity#",
VehicleRegistrationNumber = "#=VehicleRegistrationNumber#",
CustomerEmailId = "#=CustomerEmailId#",
producVar = "#=CustomerVehicleModelTagging#",
VehicleInstallationDate = "#=VehicleInstallationDate#",
VehicleNumberPlate = "#=VehicleNumberPlate#",
VehicleModelNumber = "#=VehicleModelNumber#",
VehicleType = "#=VehicleType#",
CustomerVehicleModelName = "#=CustomerVehicleModelName#"
}))
)
.Pageable()
.Sortable()
.ToClientTemplate()
)
</script>
<div id="divAddCustDetl" style="display: none; min-height: 150px; height: auto;">
</div>
}