Beispiel #1
0
        static void Main(string[] args)
        {
            ChannelFactory <IStudent> factory = new ChannelFactory <IStudent>(new NetTcpBinding(), new EndpointAddress("net.tcp://127.255.0.0:11000/InputRequest"));

            IStudent proxy = factory.CreateChannel();


            proxy.AddStudent("pr88-2015", "Stefan", "Ruvceski");
            proxy.AddStudent("pr89-2015", "Stefana", "Ruvceska");
            proxy.AddStudent("pr90-2015", "Stefani", "Ruvceska");
            proxy.AddStudent("pr91-2015", "Stefanu", "Ruvceski");
            proxy.AddStudent("pr92-2015", "Stefa", "Ruvceska");

            foreach (Student s in proxy.RetrieveAllStudents())
            {
                Console.WriteLine(s.Index);
            }
            Console.WriteLine("-----------------------------------------------");
            proxy.RemoveStudent("pr90-2015");

            foreach (Student s in proxy.RetrieveAllStudents())
            {
                Console.WriteLine(s.Index);
            }
            Console.WriteLine("-----------------------------------------------");
            proxy.EditStudent("pr89-2015", "Teodora", "Ruvceska");

            foreach (Student s in proxy.RetrieveAllStudents())
            {
                Console.WriteLine(s.Index);
            }

            Console.ReadKey();
        }
Beispiel #2
0
        public async Task <IActionResult> Edit(DAL.Student student)
        {
            await _student.EditStudent(student);

            await AddLog(student.FIRSTNAME + " adlı öğrenci güncellendi.");

            return(RedirectToAction("Edit", new { id = student.STUDENTID, success = true }));
        }
Beispiel #3
0
 public IActionResult Edit(Student stud)
 {
     _student.EditStudent(stud);
     return(View("Success"));
 }
Beispiel #4
0
        public StudentDto Put(Guid id, StudentDto value)
        {
            var result = _studentService.EditStudent(id, value);

            return(result);
        }
 public IActionResult EditStudent(Student stdl)
 {
     _stud.EditStudent(stdl);
     return(RedirectToAction("Index"));
 }
        // GET: StudentController/Edit/5
        public ActionResult Edit(int id)
        {
            var student = _istudent.EditStudent(id);

            return(View(student));
        }