[HttpGet] public ActionResult checkout(string usernam) { ViewBag.username = usernam; var FeacherToTwoModel = new ViewModelX() ; return View(FeacherToTwoModel); } [HttpPost] public ActionResult checkout(ViewModelX model) { if (ModelState.IsValid) { UsersClass.InsertInOrderAndBasket(model.tbl_order.id, model.tbl_ order.id_Type, model.tbl_ order.username,model.tbl_basket.username, model.tbl_basket.id_order); } else { } return View();
. . . <div id="collapseFour" class="accordion-body collapse"> <div class="accordion-inner"> @model MyProject.Models.ViewModelX <p>please select a style</p> <label class="checkbox payment-method inline"> @Html.CheckBoxFor(m => m. )remember me </label> <label class="checkbox payment-method inline"> @Html.CheckBoxFor(m => m. ) online </label> <form class="form-inline"> <input class="input-block span4" placeholder="Enter your coupon code here" type="text" id="couponcode"> <button type="submit" class="btn btn-general">register</button> </form> </div> </div> . . . <tbody> @model IEnumerable<MyProject.Models.vw_basket> @foreach (var item in Model) { <tr> <td class="image"><a href='../Kala/Product?NID=@item.id_product'> <img '@item.comment' alt='@item.name_product' src="~/Content/Media/Images/product/@MyProject.Models.ProductClass.GetPicById_Product(int.Parse(item.id_Product.ToString()))" width="100"></a></td> <td class="product"><a href='../Kala/Product?NID=@item.id_ Product ' title='@item.comment'>@item.name_ Product </a> </td> <td class="stock">@item.number</td> <td class="price"><s></s> @item.cost </td> <td class="price">@(item.number*item.cost) </td> </tr> } <tr> </tr> </tbody> . . .
public class ViewModelX { public tbl_order tbl_order { get; set; } public tbl_basket tbl_basket { get; set; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)