Пример #1
0
        public ActionResult Index()
        {
            using (StudentServices.StudentClient ServiceClient = new StudentServices.StudentClient())
            {
                ViewBag.Ogrenciler = ServiceClient.GetStudents().ToList();

                return(View());
            }
        }
Пример #2
0
        public ActionResult StudentEdit(int Id, string FullName, string StudentNo, string ClassNo)
        {
            using (StudentServices.StudentClient ServiceClient = new StudentServices.StudentClient())
            {
                ServiceClient.EditStudent(Id, FullName, StudentNo, ClassNo);
            }
            ViewBag.StudentEdit = "Öğrenci Düzenlendi";

            return(RedirectToAction("Index"));
        }
Пример #3
0
        public ActionResult StudentDelete(int Id)
        {
            using (StudentServices.StudentClient ServiceClient = new StudentServices.StudentClient())
            {
                ServiceClient.DeleteStudent(Id);
            }
            ViewBag.StudentDelete = "Öğrenci Silindi";

            return(RedirectToAction("Index"));
        }
Пример #4
0
        public ActionResult StudentCreate(string FullName, string StudentNo, string ClassNo)
        {
            using (StudentServices.StudentClient ServiceClient = new StudentServices.StudentClient())
            {
                ServiceClient.AddStudent(FullName, StudentNo, ClassNo);
            }
            ViewBag.StudentCreate = "Öğrenci Kaydedildi";

            return(View());
        }