@model MVC121.Models.PriceType

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<link href="~/Content/jquery-ui-datetimepicker.min.css" rel="stylesheet" />
<link href="~/Theme/redmond/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" />

<h2>Edit</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>PriceType</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.ID)

        <div class="form-group">
            @Html.LabelFor(model => model.Factory, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Factory, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Factory, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Final, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Final, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Final, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.TakhfifKharid, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.TakhfifKharid, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.TakhfifKharid, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Eshantion, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Eshantion, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Eshantion, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Marjin, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Marjin, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Marjin, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Promotion, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Promotion, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Promotion, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Tablighat, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Tablighat, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Tablighat, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Rebate, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Rebate, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Rebate, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.TakhfifForosh, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.TakhfifForosh, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.TakhfifForosh, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ArzeshAfzodeh, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ArzeshAfzodeh, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.ArzeshAfzodeh, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.StartDateLicence, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.StartDateLicence, new { htmlAttributes = new { @class = "form-control", ID = "txtslDate" } })
                @Html.ValidationMessageFor(model => model.StartDateLicence, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.EndDateLicence, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.EndDateLicence, new { htmlAttributes = new { @class = "form-control", ID = "txtelDate" } })
                @Html.ValidationMessageFor(model => model.EndDateLicence, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.StartDatePro, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.StartDatePro, new { htmlAttributes = new { @class = "form-control", ID = "txtspDate" } })
                @Html.ValidationMessageFor(model => model.StartDatePro, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.EndDatePro, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.EndDatePro, new { htmlAttributes = new { @class = "form-control", ID = "txtepDate" } })
                @Html.ValidationMessageFor(model => model.EndDatePro, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ProductID, "ProductID", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("ProductID", null, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.ProductID, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CustomerTypeID, "CustomerTypeID", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("CustomerTypeID", null, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.CustomerTypeID, "", new { @class = "text-danger" })
            </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")
    <script src="~/Scripts/jquery-ui-datetimepicker.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#txtslDate").datepicker({
                showButtonPanel: true,
                changeMonth: true,
                changeYear: true
            });
            $("#txtelDate").datepicker({
                showButtonPanel: true,
                changeMonth: true,
                changeYear: true
            });
            $("#txtspDate").datepicker({
                showButtonPanel: true,
                changeMonth: true,
                changeYear: true
            });
            $("#txtepDate").datepicker({
                showButtonPanel: true,
                changeMonth: true,
                changeYear: true
            });
        });
    </script>
}


