public ActionResult Add() { List <SelectListItem> valueCategory = (from x in categoryManager.GetAll() select new SelectListItem { Text = x.CategoryName, Value = x.CategoryId.ToString() }).ToList(); ViewBag.categoryVlc = valueCategory; List <SelectListItem> valueWriter = (from x in writerManager.GetAll() select new SelectListItem { Text = x.WriterName + " " + x.WriterSurName, Value = x.WriterId.ToString() }).ToList(); ViewBag.writerVlc = valueWriter; return(View()); }
public ActionResult AddHeading() { List <SelectListItem> valueCategory = (from category in categoryManager.GetAll() select new SelectListItem { Text = category.CategoryName, Value = category.CategoryId.ToString() }).ToList(); List <SelectListItem> valueWriter = (from writer in writerManager.GetAll() select new SelectListItem { Text = writer.WriterName + " " + writer.WriterSurName, Value = writer.WriterId.ToString() }).ToList(); ViewBag.category = valueCategory; ViewBag.writer = valueWriter; return(View()); }
public ActionResult Add() { List <SelectListItem> CategoryList = (from c in categoryManager.GetAll() select new SelectListItem { Text = c.Name, Value = c.Id.ToString() }).ToList(); List <SelectListItem> WriterList = (from w in writerManager.GetAll() select new SelectListItem { Text = w.FirstName + " " + w.LastName, Value = w.Id.ToString() }).ToList(); ViewBag.CategoryList = CategoryList; ViewBag.WriterList = WriterList; return(View()); }
public ActionResult Index() { return(View(writerManager.GetAll())); }
public ActionResult List() { var model = writerManager.GetAll(); return(View(model)); }
public ActionResult Index() { var WriterValues = _writerManager.GetAll(); return(View(WriterValues)); }
public ActionResult Index(int?page) { var writerValues = _writerManager.GetAll().ToPagedList(page ?? 1, 6);; return(View(writerValues)); }