163 lines
7.3 KiB
Plaintext
163 lines
7.3 KiB
Plaintext
@model GODATA.Models.UserInventory.UserInventory
|
|
|
|
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
|
|
|
|
@using (Ajax.BeginForm("ManagePrincipleDealerInventory_AddPrincipleDealer", "UserInventory", new AjaxOptions { HttpMethod = "POST", OnBegin = "onBeginPrincipleDealer", OnSuccess = "onSuccessAddPrincipleDealer" }))
|
|
{
|
|
@Html.ValidationSummary(true)
|
|
@Html.HiddenFor(model => model.StateName, new { id = "stateName" })
|
|
|
|
<div>
|
|
<table class="themeTable" id="tblUserInventory" cellpadding="5" cellspacing="0" width="100%">
|
|
<tbody>
|
|
<tr>
|
|
<td class="tableCelllabel bordernone">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.OrganizationId)
|
|
|
|
</span>
|
|
<span class="error" style="color: red">* </span>
|
|
</td>
|
|
<td class="tableCellinfo bordernone SelectDD">
|
|
@Html.DropDownListFor(model => model.OrganizationId, (IEnumerable<SelectListItem>)ViewBag.OrganizationList, "-Select-", new { @id = "ddOrganization", @onchange = "LoadStateListRegionWise(id, 'ddState','ddCity')" })
|
|
@*@Html.DropDownListFor(model => model.OrganizationId, (IEnumerable<SelectListItem>)ViewBag.OrganizationList, "-Select-", new { @id = "ddOrganization"})*@
|
|
@Html.ValidationMessageFor(model => model.OrganizationId)
|
|
</td>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">Principal Dealer Name</span><span class="error" style="color: red"> * </span>
|
|
</td>
|
|
<td class="tableCellinfo">
|
|
@Html.EditorFor(model => model.FirstName)
|
|
@Html.ValidationMessageFor(model => model.FirstName)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.State)</span>
|
|
</td>
|
|
<td class="tableCellinfo SelectDD">
|
|
|
|
@* <select id="ddState" name="State" onchange="LoadCityList()">
|
|
<option value="-Select-">-Select-</option>
|
|
</select>*@
|
|
|
|
@Html.DropDownListFor(model => model.State, (IEnumerable<SelectListItem>)ViewBag.StateList, "-Select-", new { @id = "ddState", @onchange = "LoadCityList()" })
|
|
@Html.ValidationMessageFor(model => model.State)
|
|
</td>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.City)</span>
|
|
</td>
|
|
<td class="tableCellinfo SelectDD">
|
|
<select id="ddCity" name="City">
|
|
<option value="-Select-">-Select-</option>
|
|
</select>
|
|
@Html.ValidationMessageFor(model => model.City)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.PrincipleDealerContactNo)</span>
|
|
</td>
|
|
<td class="tableCellinfo">
|
|
@Html.EditorFor(model => model.PrincipleDealerContactNo)
|
|
@Html.ValidationMessageFor(model => model.PrincipleDealerContactNo)
|
|
</td>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.UserName)</span><span class="error" style="color: red"> * </span>
|
|
</td>
|
|
<td class="tableCellinfo">
|
|
@Html.EditorFor(model => model.UserName)
|
|
<span id="spanUserName" class="error" style="display: none">This user already exist!</span>
|
|
@Html.ValidationMessageFor(model => model.UserName)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.Password)
|
|
</span><span class="error" style="color: red">* </span>
|
|
</td>
|
|
<td class="tableCellinfo">
|
|
@Html.EditorFor(model => model.Password)
|
|
@Html.ValidationMessageFor(model => model.Password)
|
|
</td>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.ConfirmPassword)
|
|
</span>
|
|
</td>
|
|
<td class="tableCellinfo">
|
|
@Html.EditorFor(model => model.ConfirmPassword)
|
|
@Html.ValidationMessageFor(model => model.ConfirmPassword)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.ChildDealerList)</span>
|
|
</td>
|
|
<td class="tableCellinfo comboboxdiv" colspan="3">
|
|
|
|
@(Html.Kendo().MultiSelectFor(model => model.ChildDealerList)
|
|
.Name("ChildDealerList").Placeholder("-Select-").Filter("contains")
|
|
.BindTo(new SelectList(ViewBag.DealerList, "Value", "Text"))
|
|
)
|
|
<span id="spanChildDealerList" class="error" style="display: none">*</span>
|
|
@Html.ValidationMessageFor(model => model.ChildDealerList)
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<br />
|
|
<div class="Create_Wrp">
|
|
<input type="submit" value="Create" class="button_blue" style="margin-top: 0px; width: auto; overflow: hidden; height: 27px; line-height: 9px;" />
|
|
<input type="button" value="Cancel" class="button_blue" style="background: #ee2e22 !important; margin-top: 0px; width: auto; overflow: hidden; height: 27px; line-height: 9px;" onclick="btnCancelAddUser();" />
|
|
</div>
|
|
}
|
|
<script>
|
|
|
|
|
|
|
|
//on begin
|
|
function onBeginPrincipleDealer() {
|
|
console.log("begin");
|
|
|
|
$("#spanUser").hide();
|
|
$("#spanChildDealerList").hide();
|
|
|
|
if ($("#ChildDealerList").data("kendoMultiSelect").value() == "") {
|
|
$("#spanChildDealerList").show();
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
checkIfUsernameIsExist();
|
|
|
|
//$("#ChildDealerList").kendoMultiSelect({
|
|
// filter: "contains"
|
|
//});
|
|
|
|
$(document).ready(function () {
|
|
|
|
});
|
|
|
|
</script>
|
|
<style type="text/css">
|
|
.SelectDD select { width: 173px; padding: 6px 0px; font-family: 'HermesFB Regular'; font-family: Arial; text-indent: 3px; }
|
|
|
|
.width17 { width: 17px !important; }
|
|
|
|
|
|
.comboboxdiv .k-multiselect.k-header { width: 73%; }
|
|
|
|
#ChildDealerList_taglist .k-button { background-color: #e3e3e3 !important; }
|
|
</style>
|
|
|
|
|