private void LopvaChuongPage_AfterLogin_Loaded(object sender, RoutedEventArgs e)
        {
            txtblock_tenKhoaHoc.Text = "Bạn đang xem khóa học: " + khoahocdangxem.tenKhoaHoc;
            User_btn.Content         = "Xin chào, " + UserSession.userlogined.tenNguoiDung;


            ws       = new kidmathwebserviceSoapClient();
            dschuong = ws.getDataChuongAsync().Result.Body.getDataChuongResult.ToList <chuong>();
            dschuong = dschuong.FindAll(chuong => chuong.maKhoaHoc == khoahocdangxem.maKhoaHoc);
            dstenchuong.ItemsSource = dschuong;
            chuongduocchon          = dschuong[0];


            ws    = new kidmathwebserviceSoapClient();
            dsbai = ws.getDataBaiAsync().Result.Body.getDataBaiResult.ToList <bai>();
            dsbai = dsbai.FindAll(bai => bai.maChuong == chuongduocchon.maChuong);
            listbox_dsbaihoctrong1chuong.ItemsSource = dsbai;
            baiduocchon        = dsbai[0];
            tenbaihienthi.Text = baiduocchon.tenBai;

            ws                      = new kidmathwebserviceSoapClient();
            videoduocchon           = (ws.getDatavideoAsync().Result.Body.getDatavideoResult.ToList <video>()).Find(video => video.maBai == baiduocchon.maBai);
            VideoPage.videoduocchon = videoduocchon;
            Active_frame.Navigate((typeof(VideoPage)));

            ws       = new kidmathwebserviceSoapClient();
            dsbaithi = ws.getDataDanhSachCauHoiAsync().Result.Body.getDataDanhSachCauHoiResult.ToList <danhSachCauHoi>();
            dsbaithi = dsbaithi.FindAll(baithi => baithi.maBai == baiduocchon.maBai);
        }
Example #2
0
        private void Chinhsuanoidungkhoahoc_Loaded(object sender, RoutedEventArgs e)
        {
            ws       = new kidmathwebserviceSoapClient();
            dschuong = ws.getDataChuongAsync().Result.Body.getDataChuongResult.ToList <chuong>();
            dschuong = dschuong.FindAll(chuong => chuong.maKhoaHoc == khoahocdangxem.maKhoaHoc);
            ListView_dschuong.ItemsSource = dschuong;
            chuongduocchon = dschuong[0];


            ws    = new kidmathwebserviceSoapClient();
            dsbai = ws.getDataBaiAsync().Result.Body.getDataBaiResult.ToList <bai>();
            dsbai = dsbai.FindAll(bai => bai.maChuong == chuongduocchon.maChuong);
            ListView_dsbai.ItemsSource = dsbai;
            baiduocchon = dsbai[0];
        }