RIG000
پنج شنبه 18 مهر 1392, 12:56 عصر
@model Toranj_Co.Models.tblUser
@{
ViewBag.Title = "GetUser";
}
<html>
<head>
<script src="~/js/jquery-1.6.3.min.js"></script>
<script src="~/js/jquery.min.js"></script>
<script src="~/js/jquery.validate.min.js"></script>
<script>
jQuery().ready(function () {
jQuery('#myform').validate();
});
</script>
</head>
<body style="float:right;direction:rtl;background-color:lightblue; margin:0px " >
<header style="width:auto;height:80px;background-color:limegreen ; width:auto ; text-align:center;" >
<br />
<h2>
فرم ثبت اطلاعات فردی شرکت ترنج تابان
</h2>
</header>
@using (Html.BeginForm("UserCreate", "Home", FormMethod.Post, new {id="myform" }))
{
@Html.ValidationSummary(true)
<fieldset style="color:blue" >
<legend ></legend>
<div class="editor-label">
<b>@Html.Label("نام")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Name, new { @class="required" })
@Html.ValidationMessageFor(model => model.Name)
</div>
<div class="editor-label">
<b> @Html.Label("نام خانوادگی")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Lname, new { @class="required" })
@Html.ValidationMessageFor(model => model.Lname)
</div>
<div class="editor-label">
<b> @Html.Label("نام کاربری")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.UserName,new { @class="required" })
@Html.ValidationMessageFor(model => model.UserName)
</div>
<div class="editor-label">
<b> @Html.Label("رمز ورود")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Password,new { @class="required" })
@Html.ValidationMessageFor(model => model.Password)
</div>
<div class="editor-label">
<b> @Html.Label("ایمیل")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Email,new { @class="required email" })
@Html.ValidationMessageFor(model => model.Email)
</div>
<div class="editor-label">
<b>@Html.Label("آدرس")</b>
</div>
<div class="editor-field">
@*<textarea rows="2" cols="100" name="Address"></textarea>*@
@Html.EditorFor(model => model.Address,new { @class="required" })
@Html.ValidationMessageFor(model => model.Address)
</div>
<div class="editor-label">
<b>@Html.Label("شهر")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.City,new { @class="required" })
@Html.ValidationMessageFor(model => model.City)
</div>
<div class="editor-label">
<b>@Html.Label("موبایل")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Mobile,new { @class="required" })
@Html.ValidationMessageFor(model => model.Mobile)
</div>
<div class="editor-label">
<b>@Html.Label("تلفن")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Tell,new { @class="required" })
@Html.ValidationMessageFor(model => model.Tell)
</div>
<p>
<input type="submit" value="ثبت" /><br />
@Html.ActionLink("انصراف/بازگشت", "Index")
</p>
</fieldset>
}
</body>
</html>
Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.Entity.Validation.DbEntityValidationEx ception: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
Source Error:
این ارور رو میده!!! چیکارش کنم؟؟؟؟؟؟؟
@{
ViewBag.Title = "GetUser";
}
<html>
<head>
<script src="~/js/jquery-1.6.3.min.js"></script>
<script src="~/js/jquery.min.js"></script>
<script src="~/js/jquery.validate.min.js"></script>
<script>
jQuery().ready(function () {
jQuery('#myform').validate();
});
</script>
</head>
<body style="float:right;direction:rtl;background-color:lightblue; margin:0px " >
<header style="width:auto;height:80px;background-color:limegreen ; width:auto ; text-align:center;" >
<br />
<h2>
فرم ثبت اطلاعات فردی شرکت ترنج تابان
</h2>
</header>
@using (Html.BeginForm("UserCreate", "Home", FormMethod.Post, new {id="myform" }))
{
@Html.ValidationSummary(true)
<fieldset style="color:blue" >
<legend ></legend>
<div class="editor-label">
<b>@Html.Label("نام")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Name, new { @class="required" })
@Html.ValidationMessageFor(model => model.Name)
</div>
<div class="editor-label">
<b> @Html.Label("نام خانوادگی")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Lname, new { @class="required" })
@Html.ValidationMessageFor(model => model.Lname)
</div>
<div class="editor-label">
<b> @Html.Label("نام کاربری")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.UserName,new { @class="required" })
@Html.ValidationMessageFor(model => model.UserName)
</div>
<div class="editor-label">
<b> @Html.Label("رمز ورود")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Password,new { @class="required" })
@Html.ValidationMessageFor(model => model.Password)
</div>
<div class="editor-label">
<b> @Html.Label("ایمیل")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Email,new { @class="required email" })
@Html.ValidationMessageFor(model => model.Email)
</div>
<div class="editor-label">
<b>@Html.Label("آدرس")</b>
</div>
<div class="editor-field">
@*<textarea rows="2" cols="100" name="Address"></textarea>*@
@Html.EditorFor(model => model.Address,new { @class="required" })
@Html.ValidationMessageFor(model => model.Address)
</div>
<div class="editor-label">
<b>@Html.Label("شهر")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.City,new { @class="required" })
@Html.ValidationMessageFor(model => model.City)
</div>
<div class="editor-label">
<b>@Html.Label("موبایل")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Mobile,new { @class="required" })
@Html.ValidationMessageFor(model => model.Mobile)
</div>
<div class="editor-label">
<b>@Html.Label("تلفن")</b>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Tell,new { @class="required" })
@Html.ValidationMessageFor(model => model.Tell)
</div>
<p>
<input type="submit" value="ثبت" /><br />
@Html.ActionLink("انصراف/بازگشت", "Index")
</p>
</fieldset>
}
</body>
</html>
Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.Entity.Validation.DbEntityValidationEx ception: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
Source Error:
این ارور رو میده!!! چیکارش کنم؟؟؟؟؟؟؟