public JsonResult TalepislemYap(int TalepID, int sure)
        {
            JsonResultModel jmodel = new JsonResultModel();

            try
            {
                Talepler talep = taleprepo.Get(TalepID);
                Okullar  okul  = okulrepo.Get((int)talep.OkulID);
                okul.BaslangicTarihi = DateTime.Now;
                okul.BitisTarihi     = DateTime.Now.Date.AddMonths(sure);

                okul.AktifMi  = true;
                talep.AktifMi = false;

                okulrepo.Update(okul);
                taleprepo.Update(talep);

                jmodel.IsSuccess   = true;
                jmodel.UserMessage = "İşlem başarılı bir şekilde gerçekleştirildi.";
            }
            catch (Exception)
            {
                jmodel.IsSuccess   = false;
                jmodel.UserMessage = "Güncelleme işlemi sırasında bir hata oluştu.";
            }
            return(Json(jmodel, JsonRequestBehavior.AllowGet));
        }
        public ActionResult Ogrenciler()
        {
            int     okulid = Convert.ToInt32(Session["OkulID"]);
            Okullar okul   = okulrepo.Get(okulid);

            ViewBag.Okul = okul;
            List <Ogrenciler> ogrenciliste = ogrencirepo.GetByFilterList(a => a.OkulID == okulid && a.AktifMi == true);
            Donemler          donem        = donemrepo.GetByFilter(a => a.AktifMi == true);

            ViewBag.Donem = donem;
            //var sinifgrup = (from i in ogrencirepo.GetByFilterList(a => a.OkulID == okulid && a.AktifMi==true).ToList()
            //                group i by i.Sinif into g
            //                select new SelectListItem
            //                {
            //                    Text = g.Key.ToString(),
            //                    Value=g.Key.ToString()
            //                }).ToList();
            //ViewBag.Siniflar = sinifgrup;
            return(View(ogrenciliste));
        }