예제 #1
0
        public ActionResult Liste() //Ajax
        {
            var gonder     = UrunRepo.Liste();
            var jsonResult = Json(gonder, JsonRequestBehavior.AllowGet);

            jsonResult.MaxJsonLength = int.MaxValue;
            return(jsonResult);
        }
예제 #2
0
        private static int[] Analiz()
        {
            int[] Toplam         = new int[20];
            var   liste          = UrunRepo.Liste();
            var   markalar       = liste.Select(p => p.Marka).Distinct().ToList();
            var   Modeller       = liste.Select(p => p.Model).Distinct().ToList();
            var   sinifkodlari   = liste.Select(p => p.SinifKodu).Distinct().ToList();
            var   siniftanimlari = liste.Select(p => p.SinifTanimi).Distinct().ToList();
            var   malzemekodlari = liste.Select(p => p.MalzemeKodu).Distinct().ToList();
            var   Section1       = liste.Select(p => p.Section1).Distinct().ToList();
            var   Section2       = liste.Select(p => p.Section2).Distinct().ToList();
            var   Section3       = liste.Select(p => p.Section3).Distinct().ToList();
            var   Section4       = liste.Select(p => p.Section4).Distinct().ToList();
            var   Section5       = liste.Select(p => p.Section5).Distinct().ToList();
            var   Section6       = liste.Select(p => p.Section6).Distinct().ToList();
            var   Section7       = liste.Select(p => p.Section7).Distinct().ToList();
            var   Section8       = liste.Select(p => p.Section8).Distinct().ToList();
            var   Section9       = liste.Select(p => p.Section9).Distinct().ToList();
            var   Section10      = liste.Select(p => p.Section10).Distinct().ToList();
            var   Section11      = liste.Select(p => p.Section11).Distinct().ToList();
            var   Section12      = liste.Select(p => p.Section12).Distinct().ToList();
            var   Section13      = liste.Select(p => p.Section13).Distinct().ToList();
            var   Section14      = liste.Select(p => p.Section14).Distinct().ToList();
            var   Section15      = liste.Select(p => p.Section15).Distinct().ToList();

            Toplam[0]  = markalar.Count;
            Toplam[1]  = Modeller.Count;
            Toplam[2]  = sinifkodlari.Count;
            Toplam[3]  = siniftanimlari.Count;
            Toplam[4]  = malzemekodlari.Count;
            Toplam[5]  = Section1.Count();
            Toplam[6]  = Section2.Count();
            Toplam[7]  = Section3.Count();
            Toplam[8]  = Section4.Count();
            Toplam[9]  = Section5.Count();
            Toplam[10] = Section6.Count();
            Toplam[11] = Section7.Count();
            Toplam[12] = Section8.Count();
            Toplam[13] = Section9.Count();
            Toplam[14] = Section10.Count();
            Toplam[15] = Section11.Count();
            Toplam[16] = Section12.Count();
            Toplam[17] = Section13.Count();
            Toplam[18] = Section14.Count();
            Toplam[19] = Section15.Count();
            return(Toplam);
        }
        public IHttpActionResult Get() //Ürün Ajax ile çektik
        {
            var liste = UrunRepo.Liste();

            return(Ok(liste));
        }