Example #1
0
        public ActionResult GetLesson()
        {
            NetTcpBinding binding = new NetTcpBinding();
            ChannelFactory <IJobReader> factory = new ChannelFactory <IJobReader>(binding, new EndpointAddress("net.tcp://localhost:10101/InputRequest"));
            IJobReader proxy = factory.CreateChannel();

            List <Lesson> listaSub = new List <Lesson>();



            listaSub = proxy.ReadFromDatabase2();



            return(View(listaSub));
        }
Example #2
0
        public ActionResult EditLesson(string RowKey)
        {
            NetTcpBinding binding = new NetTcpBinding();
            ChannelFactory <IJobReader> factory = new ChannelFactory <IJobReader>(binding, new EndpointAddress("net.tcp://localhost:10101/InputRequest"));
            IJobReader proxy = factory.CreateChannel();

            List <Lesson> listaSub = new List <Lesson>();

            listaSub = proxy.ReadFromDatabase2();

            Lesson l = listaSub.Find(st => st.RowKey.Equals(RowKey));

            ViewBag.Lesson = l;

            return(View());
            //    return View("Edit",s);
        }