Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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());
        }
Ejemplo n.º 4
0
        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());
        }
Ejemplo n.º 5
0
        public ActionResult Index()
        {
            var WriterValues = wm.GetWriterList();

            return(View(WriterValues));
        }
Ejemplo n.º 6
0
        public ActionResult Index()
        {
            var writerList = wm.GetWriterList();

            return(View(writerList));
        }
Ejemplo n.º 7
0
        // GET: Writer


        public ActionResult WritersList()
        {
            var writerValues = wm.GetWriterList();

            return(View(writerValues));
        }