Add project files.

This commit is contained in:
2025-07-15 11:14:03 +03:30
parent 8b899ab2a9
commit a1fed6a7ba
142 changed files with 87038 additions and 0 deletions

View File

@ -0,0 +1,62 @@
@model test.Models.User
@{
ViewBag.Title = "Sign Up";
}
<h2>Sign Up</h2>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<hr />
<div class="form-group">
@Html.LabelFor(model => model.User_Name, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.User_Name, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.User_Name, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.User_LastName, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.User_LastName, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.User_LastName, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.User_PhoneNumber, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.User_PhoneNumber, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.User_PhoneNumber, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.User_Password, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.PasswordFor(model => model.User_Password, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.User_Password, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.User_Status, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.User_Status, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.User_Status, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Register" class="btn btn-primary" />
</div>
</div>
</div>
}

View File

@ -0,0 +1,64 @@
@model test.Models.User
@{
ViewBag.Title = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>User</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.User_Name)
</dt>
<dd>
@Html.DisplayFor(model => model.User_Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.User_LastName)
</dt>
<dd>
@Html.DisplayFor(model => model.User_LastName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.User_PhoneNumber)
</dt>
<dd>
@Html.DisplayFor(model => model.User_PhoneNumber)
</dd>
<dt>
@Html.DisplayNameFor(model => model.User_Password)
</dt>
<dd>
@Html.DisplayFor(model => model.User_Password)
</dd>
<dt>
@Html.DisplayNameFor(model => model.User_Status)
</dt>
<dd>
@Html.DisplayFor(model => model.User_Status)
</dd>
</dl>
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
<div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> |
@Html.ActionLink("Back to List", "Index")
</div>
}
</div>

View File

@ -0,0 +1,58 @@
@model test.Models.User
@{
ViewBag.Title = "Details";
}
<h2>Details</h2>
<div>
<h4>User</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.User_Name)
</dt>
<dd>
@Html.DisplayFor(model => model.User_Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.User_LastName)
</dt>
<dd>
@Html.DisplayFor(model => model.User_LastName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.User_PhoneNumber)
</dt>
<dd>
@Html.DisplayFor(model => model.User_PhoneNumber)
</dd>
<dt>
@Html.DisplayNameFor(model => model.User_Password)
</dt>
<dd>
@Html.DisplayFor(model => model.User_Password)
</dd>
<dt>
@Html.DisplayNameFor(model => model.User_Status)
</dt>
<dd>
@Html.DisplayFor(model => model.User_Status)
</dd>
</dl>
</div>
<p>
@Html.ActionLink("Edit", "Edit", new { id = Model.User_ID }) |
@Html.ActionLink("Back to List", "Index")
</p>

View File

@ -0,0 +1,76 @@
@model test.Models.User
@{
ViewBag.Title = "Edit";
}
<h2>Edit</h2>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<h4>User</h4>
<hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.HiddenFor(model => model.User_ID)
<div class="form-group">
@Html.LabelFor(model => model.User_Name, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.User_Name, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.User_Name, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.User_LastName, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.User_LastName, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.User_LastName, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.User_PhoneNumber, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.User_PhoneNumber, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.User_PhoneNumber, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.User_Password, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.User_Password, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.User_Password, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.User_Status, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
<div class="checkbox">
@Html.EditorFor(model => model.User_Status)
@Html.ValidationMessageFor(model => model.User_Status, "", new { @class = "text-danger" })
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</div>
</div>
}
<div>
@Html.ActionLink("Back to List", "Index")
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}

View File

@ -0,0 +1,57 @@
@model IEnumerable<test.Models.User>
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.User_Name)
</th>
<th>
@Html.DisplayNameFor(model => model.User_LastName)
</th>
<th>
@Html.DisplayNameFor(model => model.User_PhoneNumber)
</th>
<th>
@Html.DisplayNameFor(model => model.User_Password)
</th>
<th>
@Html.DisplayNameFor(model => model.User_Status)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.User_Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.User_LastName)
</td>
<td>
@Html.DisplayFor(modelItem => item.User_PhoneNumber)
</td>
<td>
@Html.DisplayFor(modelItem => item.User_Password)
</td>
<td>
@Html.DisplayFor(modelItem => item.User_Status)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.User_ID }) |
@Html.ActionLink("Details", "Details", new { id=item.User_ID }) |
@Html.ActionLink("Delete", "Delete", new { id=item.User_ID })
</td>
</tr>
}
</table>

View File

@ -0,0 +1,28 @@
@{
ViewBag.Title = "Login";
}
<h2>Login</h2>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-group">
<label>Phone Number</label>
<input type="text" name="User_PhoneNumber" class="form-control" required />
</div>
<div class="form-group">
<label>Password</label>
<input type="password" name="User_Password" class="form-control" required />
</div>
<button type="submit" class="btn btn-primary">Login</button>
}
@if (!string.IsNullOrEmpty(Convert.ToString(ViewBag.Message)))
{
<p class="text-danger">@ViewBag.Message</p>
}