public ActionResult Details(int id, Details de) { string role = null; ViewData["Role"] = ""; IEnumerable <string> roles = new List <string>(); roles = ((ClaimsIdentity)User.Identity).Claims .Where(ca => ca.Type == ClaimTypes.Role) .Select(ca => ca.Value); foreach (var x in roles) { role = x; } if (role != null) { ViewData["Role"] = role; } Details d = new Models.Details(); commentaire c = new commentaire(); c = de.Commentaire; c.idUser = User.Identity.GetUserId(); c.idForum = id; comnService.Add(c); comnService.Commit(); return(RedirectToAction("Index")); }
// GET: Detail public ActionResult Detail(string id) { var model = new Models.Details() { data = CatalogBLL.ListOfOrderDetails(Convert.ToInt32(id)) }; return(View(model)); }
public ActionResult Input(string id = "") { ViewBag.Title = "Add products"; var model = new Models.Details() { data = CatalogBLL.ListOfOrderDetails(Convert.ToInt32(id)), orderID = Convert.ToInt32(id) }; return(View(model)); }