Example #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello Saklambac");
            Console.WriteLine("************** LIST ALL NOTES ***************");

            SaklambacDb <Note> saklambacDb = new SaklambacDb <Note>();
            List <Note>        notes       = saklambacDb.GetAll();

            foreach (var item in notes)
            {
                Console.WriteLine(item.Id + "/" + item.Title + "/" + item.Description + "/" + item.isCompleted);
            }

            Console.WriteLine("************** UPDATE NOTE ***************");

            Note updateNote = saklambacDb.GetOneById("0g7ceyzd8ce1fu8ieja8dede");
            Note newNote    = new Note();

            newNote.isCompleted = true;
            newNote.Title       = "Update Tests";
            newNote.Description = "test";
            saklambacDb.Update(updateNote, newNote);

            Console.WriteLine("************** LIST ALL NOTES ***************");

            List <Note> notess = saklambacDb.GetAll();

            foreach (var item in notess)
            {
                Console.WriteLine(item.Id + "/" + item.Title + "/" + item.Description + "/" + item.isCompleted);
            }

            Console.ReadLine();
        }
Example #2
0
 public IActionResult Index()
 {
     CreateContactMessage();
     ViewBag.YoneticiMesajSayi  = contactDb.GetAll().Count.ToString();
     ViewBag.YoneticiEkipSayi   = teamDb.GetAll().Count.ToString();
     ViewBag.YoneticiHaberSayi  = newsDb.GetAll().Count.ToString();
     ViewBag.YoneticiGaleriSayi = galleryDb.GetAll().Count.ToString();
     return(View());
 }
Example #3
0
        public ActionResult Index()
        {
            MainViewModel mainViewModel = new MainViewModel();

            mainViewModel.NewMovies    = movieDb.GetAll().Reverse <Movie>().Take(3).ToList();
            mainViewModel.TopMovies    = movieDb.GetAll().OrderByDescending(x => Convert.ToDouble(x.ImdbScore)).Take(3).ToList();
            mainViewModel.TopDirectors = directorDb.GetAll().OrderByDescending(x => Convert.ToDouble(x.Score)).Take(3).ToList();
            return(View(mainViewModel));
        }
Example #4
0
        void ShowTeachers()
        {
            SaklambacDb <Teacher> teacherDb = new SaklambacDb <Teacher>();
            List <Teacher>        teachers  = teacherDb.GetAll();

            foreach (var teacher in teachers)
            {
                cmbTeacherName.Items.Add(teacher.TeacherName);
            }
            cmbTeacherName.SelectedIndex = 0;
        }
Example #5
0
        public IActionResult Giris(User user)
        {
            var users = userDb.GetAll().Where(x => x.Username == user.Username && x.Password == user.Password);

            if (users.Count() > 0)
            {
                HttpContext.Session.SetString("SessionUserId", user.Username);
                return(RedirectToAction("Index"));
            }
            return(View());
        }
Example #6
0
        static void Main(string[] args)
        {
            SaklambacDb <Note> saklambacDb = new SaklambacDb <Note>();

            Console.WriteLine("Add New Note");
            Note note = new Note();

            note.Title       = "Test01";
            note.Description = "Test01 Description";
            note.isCompleted = false;
            saklambacDb.Add(note);


            Console.WriteLine("List All Notes");
            List <Note> notes = saklambacDb.GetAll();

            foreach (var item in notes)
            {
                Console.WriteLine(item.Id + "/" + item.Title + "/" + item.Description + "/" + item.isCompleted);
            }

            Console.ReadLine();
        }
 /* BUTUN HABERLER */
 public IActionResult Index()
 {
     return(View(newsDb.GetAll()));
 }
Example #8
0
 /* The task of this method is to list all students */
 void ShowAllTeachers()
 {
     dataGridView1.DataSource = teacherDb.GetAll();
 }
 public async Task <ActionResult> GetAll()
 {
     return(Ok(newsDb.GetAll()));
 }
Example #10
0
 /* BELIRLI TAKIMA AIT TUM UYELER */
 public IActionResult TakimUyeleri(string team)
 {
     return(View(teamDb.GetAll().Where(x => x.TeamName == team)));
 }
 /* GALERI */
 public IActionResult Galeri()
 {
     return(View(galleryDb.GetAll()));
 }
Example #12
0
        public ActionResult Messages()
        {
            List <Contact> messages = saklambacDb.GetAll();

            return(View(messages));
        }
Example #13
0
        /* LIST ALL BLOG POSTS */
        public IActionResult Index()
        {
            var blogs = blogDb.GetAll();

            return(View(blogs));
        }
Example #14
0
        public ActionResult Search(string movieName)
        {
            var movies = movieDb.GetAll().Where(x => x.Name.Contains(movieName)).ToList();

            return(View(movies));
        }
 /* BUTUN FOTOGRAFLAR */
 public IActionResult Index()
 {
     return(View(galleryDb.GetAll()));
 }
 /* EKİBİMİZ SAYFALARI */
 public IActionResult Akademisyenler()
 {
     return(View(teamDb.GetAll().Where(x => x.TeamName == "Akademisyen")));
 }
Example #17
0
 /* The task of this method is to list all students */
 void ShowAllStudents()
 {
     dataGridView1.DataSource = studentDb.GetAll();
 }
 /* HABERLER */
 public IActionResult Haberler()
 {
     return(View(newsDb.GetAll()));
 }
Example #19
0
        public JsonResult GetDirectorsList()
        {
            var directors = directorDb.GetAll();

            return(Json(directors, JsonRequestBehavior.AllowGet));
        }