Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model PizzariaOvenzinho.Models.Produto
- @{
- ViewBag.Title = "Create";
- Layout = "~/Views/Shared/TemplateAdmin.cshtml";
- }
- <h2 style="color:#fff;text-align:center;font-size:50px;font-family:Brush Script Std, Brush Script MT, cursive;">Cadastrar</h2>
- @using (Html.BeginForm("Create", "Produtos", new {id = ViewContext.RouteData.Values["id"] }, FormMethod.Post,
- new { enctype = "multipart/form-data" }))
- {
- @Html.AntiForgeryToken()
- <div class="form-horizontal">
- <h4 style="color:#fff;font-size:50px;text-align:center;font-family:Brush Script Std, Brush Script MT, cursive;">Produto</h4>
- <hr />
- @Html.ValidationSummary(true, "", new { @class = "text-danger" })
- <div class="form-group">
- @Html.LabelFor(model => model.Nome, htmlAttributes: new { @class = "control-label col-md-2", @style = "color:#fff;" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.Nome, new { htmlAttributes = new { @class = "form-control", @style = "width:300px;" } })
- @Html.ValidationMessageFor(model => model.Nome, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.Descricao, htmlAttributes: new { @class = "control-label col-md-2", @style = "color:#fff;" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.Descricao, new { htmlAttributes = new { @class = "form-control", @style = "width:300px;" } })
- @Html.ValidationMessageFor(model => model.Descricao, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.Valor, htmlAttributes: new { @class = "control-label col-md-2", @style = "color:#fff;" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.Valor, new { htmlAttributes = new { @class = "form-control", @style = "width:300px;" } })
- @Html.ValidationMessageFor(model => model.Valor, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.CategoriaId, "CategoriaId", htmlAttributes: new { @class = "control-label col-md-2", @style = "color:#fff;" })
- <div class="col-md-10">
- @Html.DropDownList("CategoriaId", null, htmlAttributes: new { @class = "form-control", @style = "width:300px;" })
- @Html.ValidationMessageFor(model => model.CategoriaId, "", new { @class = "text-danger" })
- </div>
- </div>
- <div style="background-color:#fff;width:400px;">
- <label for="file">Upload de Imagem:</label>
- <input type="file" name="file" id="file" style="width: 100%;" />
- <input type="submit" value="Upload" class="btn btn-primary" />
- </div>
- <div class="form-group">
- <div class="col-md-offset-2 col-md-10">
- <input type="submit" value="Cadastrar" class="btn btn-default" />
- </div>
- </div>
- </div>
- }
- <div>
- @Html.ActionLink("Voltar a lista", "Index", "Produtos", null, new { @class = "btn btn-default" })
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement