170 lines
7.7 KiB
Plaintext
170 lines
7.7 KiB
Plaintext
@model GODATA.Models.UserInventory.UserInventory
|
|
|
|
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
|
|
|
|
@using (Ajax.BeginForm("ManageDealerInventory_AddDealer", "UserInventory", new AjaxOptions { HttpMethod = "POST", OnBegin = "onBegin", OnSuccess = "onSuccessAddDealer" }))
|
|
{
|
|
@Html.ValidationSummary(true)
|
|
@Html.HiddenFor(model => model.StateName, new { id = "stateName" })
|
|
@Html.HiddenFor(model => model.OrganizationName, new { id = "organizationName" })
|
|
<div>
|
|
<table class="themeTable" cellpadding="5" cellspacing="0" width="100%">
|
|
<tbody>
|
|
<tr>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.ObjectId)</span><span class="error" style="color: red"> * </span>
|
|
</td>
|
|
<td class="tableCellinfo SelectDD">
|
|
@(Html.Kendo().ComboBox()
|
|
.SelectedIndex(0)
|
|
.Events(e => e.Change("getOrganizationDealerWise"))
|
|
.Name("ObjectId")
|
|
.Filter("contains")
|
|
.DataTextField("Text")
|
|
.DataValueField("Value")
|
|
.BindTo(new SelectList(ViewBag.NonUserDealerList, "Value", "Text"))
|
|
.HtmlAttributes(new { @style = "width: 173px" })
|
|
.Suggest(true)
|
|
)
|
|
<span id="spanUser" class="error" style="display: none; color: red">*</span>
|
|
@Html.ValidationMessageFor(model => model.ObjectId)
|
|
</td>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.OrganizationId)</span>
|
|
</td>
|
|
<td class="tableCellinfo">
|
|
<input type="text" id="ddOrganization" name="OrganizationId" class="disable_btn " readonly />
|
|
@Html.ValidationMessageFor(model => model.OrganizationId)
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.Designation)
|
|
</span>
|
|
</td>
|
|
<td class="tableCellinfo">
|
|
<input type="text" id="ddDesignation" class="disable_btn " name="Designation" readonly />
|
|
@Html.ValidationMessageFor(model => model.Designation)
|
|
</td>
|
|
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">@Html.LabelFor(model => model.Language)</span></td>
|
|
<td class="tableCellinfo SelectDD">
|
|
@Html.DropDownListFor(model => model.Language, (IEnumerable<SelectListItem>)ViewBag.LanguageList, "-Select-", new { @id = "ddLanguage" })
|
|
@Html.ValidationMessageFor(model => model.Language)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.State)</span>
|
|
</td>
|
|
<td class="tableCellinfo SelectDD">
|
|
@Html.TextBoxFor(model => model.State, new { @readonly = "readonly", @class = "disable_btn " })
|
|
@Html.ValidationMessageFor(model => model.State)
|
|
</td>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.City)</span>
|
|
</td>
|
|
<td class="tableCellinfo SelectDD">
|
|
@Html.TextBoxFor(model => model.City, new { @readonly = "readonly", @class = "disable_btn " })
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.FirstName)</span><span class="error" style="color: red"> * </span>
|
|
</td>
|
|
<td class="tableCellinfo">
|
|
@Html.EditorFor(model => model.FirstName)
|
|
@Html.ValidationMessageFor(model => model.FirstName)
|
|
</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" style="display: none;">
|
|
<span class="darktxt">
|
|
@Html.LabelFor(model => model.Region)</span>
|
|
</td>
|
|
<td class="tableCellinfo" style="display: none;">
|
|
|
|
@Html.EditorFor(model => model.Region, new { @id = "Region" })
|
|
@Html.ValidationMessageFor(model => model.Region)
|
|
</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>
|
|
|
|
$("#ddDesignation").val("Dealer");
|
|
getOrganizationDealerWise();
|
|
//on begin
|
|
function onBegin() {
|
|
$("#spanUser").hide();
|
|
$("#spanChildDealerList").hide();
|
|
if ($('#ObjectId').find('option:selected').text() == "-Select-") {
|
|
$("#spanUser").show();
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
checkIfUsernameIsExist();
|
|
|
|
checkIfEmailidIsExist();
|
|
|
|
</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;
|
|
}
|
|
</style>
|