Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public string playername { get; set; }
- public DateTime dob { get; set; }
- public string phone { get; set; }
- public string email { get; set; }
- public string clubname { get; set; }
- public string productname { get; set; }
- public decimal amount { get; set; }
- public int transactionID { get; set; }
- public bool approved { get; set; }
- public string subtype { get; set; }
- public DateTime subdate { get; set; }
- }
- public ActionResult Payment()
- {
- DateTime blank = Convert.ToDateTime("01-01-1900");
- var prod = from p in db.Product
- join c in db.Club on p.clubname equals c.clubname
- where p.clubname == "Club1"
- select new PaymentViewModel
- {
- productname = p.prodname,
- clubname = c.clubname,
- playername = c.add1,
- dob = blank,
- phone = c.phone,
- email = c.email,
- transactionID = 0,
- amount = p.amount,
- approved = Convert.ToBoolean("1"),
- subtype = c.city,
- subdate = blank
- };
- return View(prod);
- }
- @S4C.BAL.PaymentViewModel;
- @using (Html.BeginForm())
- {
- @Html.AntiForgeryToken()
- <div class="form-horizontal">
- <h4>Player Name</h4>
- <hr />
- @Html.ValidationSummary(true, "", new { @class = "text-danger" })
- <div class="form-group">
- <b class="control-label col-md-2" style="">Full Name</b>
- <div class="col-md-10">
- @Html.EditorFor(model => model.playername, new { htmlAttributes = new { autofocus = "autofocus", @maxlength = "25", @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.playername, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- <br /><br />
- <div class="form-group">
- <div class="col-md-offset-2 col-md-10">
- <input type="submit" value="Create" class="btn btn-default" />
- </div>
- </div>
- </div>
- </div>
- }
- <div>@Html.ActionLink("Back to List", "Index")</div>
- @section Scripts {@Scripts.Render("~/bundles/jqueryval")}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement