public ActionResult Index() { using (StudentServices.StudentClient ServiceClient = new StudentServices.StudentClient()) { ViewBag.Ogrenciler = ServiceClient.GetStudents().ToList(); return(View()); } }
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")); }
public ActionResult StudentDelete(int Id) { using (StudentServices.StudentClient ServiceClient = new StudentServices.StudentClient()) { ServiceClient.DeleteStudent(Id); } ViewBag.StudentDelete = "Öğrenci Silindi"; return(RedirectToAction("Index")); }
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()); }