@model eCommerceUI.Models.Reg_ColorTypeMV
@{
ViewBag.Title = "Colores";
}
<div class="container">
<div class="page-width">
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<hr />
<h3 class="docs-title text-center">Products Colors</h3>
<div class="form-horizontal">
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.HiddenFor(model => model.ColorTypeID)
<div class="row" style="margin-left:1px;">
<div class="form-group col-md-3">
@Html.LabelFor(model => model.ColorTitle, "Enter Color Title", htmlAttributes: new { @class = "control-label" })
@Html.EditorFor(model => model.ColorTitle, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.ColorTitle, "", new { @class = "text-danger" })
</div>
<div class="form-group col-md-3">
@Html.LabelFor(model => model.ColorCode, "Enter Color Code", htmlAttributes: new { @class = "control-label" })
@Html.EditorFor(model => model.ColorCode, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.ColorCode, "", new { @class = "text-danger" })
</div>
<div class="form-group col-md-3">
@Html.LabelFor(model => model.StatusID, "Select Status", htmlAttributes: new { @class = "control-label" })
@Html.DropDownList("StatusID", new SelectList(Model.List_Status, "StatusID", "StatusTitle", Model.StatusID), "--Choose--", htmlAttributes: new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.StatusID, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
@if (Model.ColorTypeID == 0)
{
<input type="submit" value="Create" class="btn btn--secondary" />
}
else
{
<input type="submit" value="Update" class="btn btn--secondary" />
}
</div>
</div>
</div>
}
<hr />
<h3 class="docs-title">Colors List</h3>
<form autocomplete="off">
<p>
<div style="float:right;">
<input type="text"
style="background-image: url('@Url.Content("~/Content/Template/images/searchicon.png")');
background-position: 10px 5px;
background-repeat: no-repeat;
font-size: 16px;
padding: 12px 20px 12px 40px;
border: 1px solid #ddd;
margin-bottom: 12px; "
class="search form-control"
id="myInput"
placeholder="What you looking for?">
</div>
</p>
</form>
<div class="table">
<table class="responsive-table">
<thead>
<tr>
<td>#Unique No</td>
<td>Color Title</td>
<td>Color</td>
<td>Status</td>
<th>Action</th>
</tr>
</thead>
<tbody id="myTable">
@foreach (var item in Model.List_Colores)
{
<tr class="responsive-table-row">
<td>#@Html.DisplayFor(modelItem => item.ColorTypeID)</td>
<td>@Html.DisplayFor(modelItem => item.ColorTitle)
</td>
<td>
<span style="height: 25px;
width: 25px;
background-color: @item.ColorCode;
border-radius: 50%;
display: inline-block;"></span>
</td>
<td>
@if (item.Status == "Visible")
{
<span class="label label--new mb-3 mr-3 text-nowrap">
@Html.DisplayFor(modelItem => item.Status)
</span>
}
else
{
<span class="label label--sale mb-3 mr-3 text-nowrap">
@Html.DisplayFor(modelItem => item.Status)
</span>
}
</td>
<td>
@Html.ActionLink("Edit", "ColorType", new { id = item.ColorTypeID }, new { @class = "btn" })
</td>
</tr>
}
<tbody>
</table>
</div>
</div>
</div>
Comments
Post a Comment