@*@model SMS_MVCDTO.Models.DTOs.ProductDTOs.ProductResponseModel*@
@*@model ProductTransactionViewModel*@
@model SMS_MVCDTO.Models.ViewModels.AddToCartProductViewModel

<partial name="_Notification" />


<h1> Buy</h1>
<hr />


<div class="col-md-4">
    @using (Html.BeginForm("Create", "Cart"))
    {

        <div class="form-group">
            @Html.HiddenFor(x => x.Product.Data.Barcode, new {@class = "form-control"})
        </div>

        <div class="form-group">
            @Html.LabelFor(x => x.Product.Data.Name, new {@class = "control-label"})
            @Html.TextBoxFor(x => x.Product.Data.Name, new {@class = "form-control", @readonly="readonly"})
            @Html.ValidationMessageFor(x => x.Product.Data.Name,"", new {@class="text-danger"})
        </div>

        <div class="form-group">
            @Html.LabelFor(x => x.Product.Data.SellingPrice, new {@class = "control-label"})
            @Html.TextBoxFor(x => x.Product.Data.SellingPrice, new {@class = "form-control", @readonly = "readonly"} )
            @Html.ValidationMessageFor(x => x.Product.Data.SellingPrice,"", new {@class="text-danger"})
        </div>

        <div class="form-group">
            @Html.LabelFor(x => x.CartRequestModel.Quantity, new {@class = "control-label"})
            @Html.TextBoxFor(x => x.CartRequestModel.Quantity, new {@class = "form-control"})
            @Html.ValidationMessageFor(x => x.CartRequestModel.Quantity,"", new {@class="text-danger"})
        </div>

        <div class="form-group">
            @Html.LabelFor(x => x.CartRequestModel.CustomerId, new {@class = "control-label"})
            @Html.TextBoxFor(x => x.CartRequestModel.CustomerId, new {@class = "form-control"})
            @Html.ValidationMessageFor(x => x.CartRequestModel.CustomerId,"", new {@class="text-danger"})
        </div>

        <div class="form-group">
            <button type="submit" class="btn btn-success">Add</button>
        </div>
    }
</div>
@section scripts {
    @{
        await Html.RenderPartialAsync("_ValidationScriptsPartial");
    }
}