예제 #1
0
        // GET: Home
        public ActionResult Index()
        {
            List <Calisan> liste = repository.GetList().ToList();

            return(View(new CalisanViewModel {
                CalisanList = liste
            }));
        }
예제 #2
0
        public ActionResult Edit()
        {
            int ID = Convert.ToInt32(RouteData.Values["id"]);


            Calisan c = CalisanRepository.FirstOrDefault(x => x.Id == ID);


            List <Calisan> liste = CalisanRepository.GetList().ToList();

            DepartmanYukle(c.DepartmanId);

            YoneticiYukle((Int32)c.YoneticiBilgisiId);

            return(View(c));
        }
예제 #3
0
        void YoneticiYukle(int CalisanId)
        {
            List <SelectListItem> SelectList  = new List <SelectListItem>();
            List <Calisan>        CalisanList = CalisanRepository.GetList().ToList();

            foreach (var item in CalisanList)
            {
                bool state = false;
                if (CalisanId == item.Id)
                {
                    state = true;
                }

                SelectList.Add(new SelectListItem {
                    Text = item.Ad + " " + item.Soyad, Value = item.Id.ToString(), Selected = state
                });
            }
            ViewBag.Yoneticiler = SelectList;
        }
예제 #4
0
 // GET: Admin/Calisan
 public ActionResult Listele()
 {
     return(View(CalisanRepository.GetList()));
 }