Ejemplo n.º 1
0
        //xem lịch thi
        private void btnTest_day_Click(object sender, EventArgs e)
        {
            controlStudent.TabPages.Clear();
            controlStudent.TabPages.Add(Tab_test_day);
            controlStudent.SelectedTab = Tab_test_day;


            dt_test_day.DataSource = BUS_Hoc_Sinh.Lay_lich_Thi(BUS_Hoc_Sinh.ID_Lop(hs.Lop));
        }
Ejemplo n.º 2
0
        //Nộp Bài
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            Thoi_Gian.Stop();
            Luu_Cau_Tra_Loi();
            double So_cau_Dung = 0;
            double Tong_So_cau = De.De.Count;
            double Diem;

            for (int i = 0; i < DS_Cau_Tra_Loi.Count; i++)
            {
                if (DS_Cau_Tra_Loi[i].cau_tra_loi.Replace(" ", "") == DS_Cau_Tra_Loi[i].Dap_An.Replace(" ", ""))
                {
                    So_cau_Dung++;
                }
            }
            Diem = (So_cau_Dung / Tong_So_cau) * 10;
            Diem = Math.Round(Diem, 2);

            for (int i = 0; i < De.De.Count; i++)
            {
                if (i > DS_Cau_Tra_Loi.Count - 1)
                {
                    CauTraLoi cauTraLoi = new CauTraLoi();
                    cauTraLoi.new_Cau_Tra_Loi(i, "", De.De[i].Dap_An);
                    DS_Cau_Tra_Loi.Add(cauTraLoi);
                }
            }
            frmDap_An.DS_Cau_Tra_Loi = DS_Cau_Tra_Loi;
            KETQUATHI kqua = new KETQUATHI();

            kqua.MaKyThi         = _ma_ky_thi_;
            kqua.MaDeThi         = _ma_de_thi_;
            kqua.TaiKhoan        = hs.Tai_Khoan;
            kqua.Diem            = Diem;
            kqua.ThoiGianBatDau  = Start_time;
            kqua.ThoiGianKetThuc = End_time;

            if (BUS_Hoc_Sinh.Luu_Ket_Qua(kqua) == true)
            {
                MessageBox.Show("Đã Lưu ^_^", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                frmKetQua.Diem = Diem;
                frmKetQua frmKetQua1 = new frmKetQua();
                frmKetQua1.ShowDialog();
            }
            else
            {
                MessageBox.Show("Đã Có Kết Quả Đề Này ^_^", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            btnSubmit.Enabled      = false;
            btnNext.Enabled        = false;
            btnPrev.Enabled        = false;
            btnStart_Pause.Enabled = false;
        }
Ejemplo n.º 3
0
 //Chọn Đề
 private void btn_Chon_Click(object sender, EventArgs e)
 {
     if (BUS_Hoc_Sinh.Kiem_tra_de(_tai_khoan_, BUS_De_Thi.Ma_Ky_Thi(cbb_Ky_Thi.Text), cbb_MaDe.Text) == false)
     {
         MessageBox.Show("Đã Thi Đề Này !_!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         frmHoc_Sinh._ma_de_thi_ = cbb_MaDe.Text;
         frmHoc_Sinh._ma_ky_thi_ = BUS_De_Thi.Ma_Ky_Thi(cbb_Ky_Thi.Text);
         this.Close();
     }
 }
Ejemplo n.º 4
0
        //Lưu Thông Tin
        private void btnSave_Click(object sender, EventArgs e)
        {
            Disable();
            Hoc_Sinhh hs_new = new Hoc_Sinhh();

            hs_new.Tai_Khoan = txtSudent_code.Text;
            hs_new.Ho_Ten    = txtStudent_Name.Text;
            hs_new.CMND_TCC  = txtCMND.Text;
            hs_new.Email     = txtStudent_email.Text;
            hs_new.SDT       = txtStudent_phone_number.Text;
            hs_new.Ngay_Sinh = dpStudent_birth_date.Value;
            hs_new.Lop       = txtStudent_class.Text;

            BUS_Hoc_Sinh.Sua_Thong_Tin(hs_new);
        }
Ejemplo n.º 5
0
        private void frmChon_Bai_Thi_Load(object sender, EventArgs e)
        {
            List <string> Kythi = new List <string>();

            if (this.Text.Contains("Thử"))
            {
                Kythi = BUS_De_Thi.DanhSach_KyThi(BUS_Hoc_Sinh.ID_Khoi(lop), "LKT000002");
            }
            else
            {
                Kythi = BUS_De_Thi.DanhSach_KyThi(BUS_Hoc_Sinh.ID_Khoi(lop), "LKT000001");
            }

            cbb_Ky_Thi.DataSource = Kythi;
        }
Ejemplo n.º 6
0
 public static void Sua_Thong_Tin(Hoc_Sinhh hs_new)
 {
     using (var QLTTN = new QLTTNDataContext())
     {
         var Querry = from _hs_ in QLTTN.NGUOIDUNGs
                      where _hs_.TaiKhoan == hs_new.Tai_Khoan
                      select _hs_;
         Querry.First().HoTen       = hs_new.Ho_Ten;
         Querry.First().CMND_TCC    = hs_new.CMND_TCC;
         Querry.First().Email       = hs_new.Email;
         Querry.First().NgaySinh    = hs_new.Ngay_Sinh;
         Querry.First().SoDienThoai = hs_new.SDT;
         Querry.First().MaLop       = BUS_Hoc_Sinh.ID_Lop(hs_new.Lop);
         QLTTN.SubmitChanges();
     }
 }