public ActionResult Index() { var categoryvalues = cm.GetCategoryList(); ViewBag.KategoriSayi = categoryvalues.Count(); var baslikfilm = hm.GetHeadingList().Where(x => x.CategoryID == 5); ViewBag.filmSayi = baslikfilm.Count(); var yazarisima = wm.GetWriterList().Where(x => x.WriterName.Contains("u")); ViewBag.yazarisima = yazarisima.Count(); var topcategory = cm.GetCategoryList().Where(x => x.CategoryID == hm.GetHeadingList().GroupBy(c => c.CategoryID).OrderByDescending(c => c.Count()).Select(c => c.Key).FirstOrDefault()).Select(x => x.CategoryName).FirstOrDefault(); ViewBag.topcategory = topcategory; var categorytrue = cm.GetCategoryList().Where(x => x.CategoryStatus == "True").Count(); var categoryfalse = cm.GetCategoryList().Where(x => x.CategoryStatus == "False").Count(); ViewBag.TF = categorytrue - categoryfalse; return(View()); }
public ActionResult AddHeading() { List <SelectListItem> valuecategory = (from x in cm.GetCategoryList() select new SelectListItem { Text = x.CategoryName, Value = x.CategoryID.ToString() }).ToList(); List <SelectListItem> valuewriter = (from x in wm.GetWriterList() select new SelectListItem { Text = x.WriterName + " " + x.WriterSurName, Value = x.WriterID.ToString() }).ToList(); ViewBag.vlc = valuecategory; ViewBag.wrt = valuewriter; return(View()); }
public ActionResult AddHeading() { List <SelectListItem> valueCategory = (from c in cm.GetCategoryList() //Listeleme select new SelectListItem() { Text = c.CategoryName, Value = c.CategoryId.ToString() }).ToList(); List <SelectListItem> valueWriter = (from w in wm.GetWriterList() select new SelectListItem() { Text = w.WriterName + " " + w.WriterSurName, Value = w.WriterId.ToString() }).ToList(); ViewBag.vlw = valueWriter; ViewBag.vlc = valueCategory; return(View()); }
public ActionResult AddHeading() { List <SelectListItem> categoryListItem = (from x in cm.GetCategoryList() select new SelectListItem { Text = x.CategoryName, Value = x.CategoryId.ToString() }).ToList(); List <SelectListItem> writerListItem = (from y in wm.GetWriterList() select new SelectListItem { Text = y.WriterName + " " + y.WriterSurname, Value = y.ID.ToString() }).ToList(); ViewBag.clv = new SelectList(cm.GetCategoryList(), "CategoryId", "CategoryName"); ViewBag.wrv = writerListItem; //ViewBag.clv = categoryListItem; return(View()); }
public ActionResult Index() { var WriterValues = wm.GetWriterList(); return(View(WriterValues)); }
public ActionResult Index() { var writerList = wm.GetWriterList(); return(View(writerList)); }
// GET: Writer public ActionResult WritersList() { var writerValues = wm.GetWriterList(); return(View(writerValues)); }