Advertisement
Guest User

Untitled

a guest
Feb 19th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. public string playername { get; set; }
  2. public DateTime dob { get; set; }
  3. public string phone { get; set; }
  4. public string email { get; set; }
  5. public string clubname { get; set; }
  6. public string productname { get; set; }
  7. public decimal amount { get; set; }
  8. public int transactionID { get; set; }
  9. public bool approved { get; set; }
  10. public string subtype { get; set; }
  11. public DateTime subdate { get; set; }
  12. }
  13.  
  14. public ActionResult Payment()
  15. {
  16. DateTime blank = Convert.ToDateTime("01-01-1900");
  17. var prod = from p in db.Product
  18. join c in db.Club on p.clubname equals c.clubname
  19. where p.clubname == "Club1"
  20. select new PaymentViewModel
  21. {
  22. productname = p.prodname,
  23. clubname = c.clubname,
  24. playername = c.add1,
  25. dob = blank,
  26. phone = c.phone,
  27. email = c.email,
  28. transactionID = 0,
  29. amount = p.amount,
  30. approved = Convert.ToBoolean("1"),
  31. subtype = c.city,
  32. subdate = blank
  33. };
  34.  
  35.  
  36. return View(prod);
  37. }
  38.  
  39. @S4C.BAL.PaymentViewModel;
  40. @using (Html.BeginForm())
  41. {
  42. @Html.AntiForgeryToken()
  43.  
  44. <div class="form-horizontal">
  45. <h4>Player Name</h4>
  46. <hr />
  47. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  48. <div class="form-group">
  49. <b class="control-label col-md-2" style="">Full Name</b>
  50. <div class="col-md-10">
  51. @Html.EditorFor(model => model.playername, new { htmlAttributes = new { autofocus = "autofocus", @maxlength = "25", @class = "form-control" } })
  52. @Html.ValidationMessageFor(model => model.playername, "", new { @class = "text-danger" })
  53. </div>
  54. </div>
  55.  
  56. <div class="form-group">
  57.  
  58. <br /><br />
  59. <div class="form-group">
  60. <div class="col-md-offset-2 col-md-10">
  61. <input type="submit" value="Create" class="btn btn-default" />
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66.  
  67. }
  68.  
  69. <div>@Html.ActionLink("Back to List", "Index")</div>
  70.  
  71. @section Scripts {@Scripts.Render("~/bundles/jqueryval")}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement