private void TimKiem()
        {
            if (svBUS.getSVTheoMaSV(this.txtMSSV.Text).Count != 0)
            {
                this.dgcDSHP.DataSource = dtBUS.getDiemTheoMSSV(this.txtMSSV.Text);
            }
            else
            {
                MessageBox.Show("MÃ SINH VIÊN không tồn tại.", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            this.btnSua.Enabled = true;

            this.txtMSSV.Focus();
            this.txtMSSV.SelectAll();
        }
Esempio n. 2
0
        // Report Thong ke HocPhi
        public frmReport(string maSV, string tb, string tbTL, string soTCTL, string xepLoai)
        {
            InitializeComponent();

            DIemThiBUS dtBUS = new DIemThiBUS();

            ReportDataSource reportDataSource = new ReportDataSource();

            reportDataSource.Name  = "dsDiemThi_By_MSSV";
            reportDataSource.Value = dtBUS.getDiemTheoMSSV(maSV);
            reportViewer1.LocalReport.DataSources.Add(reportDataSource);

            this.reportViewer1.LocalReport.ReportEmbeddedResource = "GUI.ReportViews.rpDSDiemThiTheoSinhVien.rdlc";
            ReportParameter[] rp = new ReportParameter[4];
            rp[0] = new ReportParameter("TB", tb);
            rp[1] = new ReportParameter("TBTL", tbTL);
            rp[2] = new ReportParameter("SoTCTL", soTCTL);
            rp[3] = new ReportParameter("XepLoai", xepLoai);
            reportViewer1.LocalReport.SetParameters(rp);
        }
Esempio n. 3
0
        private void TimThongTin()
        {
            var listDiemThi = dtBUS.getDiemTheoMSSV(this.txtNhapMSSV.Text);

            if (listDiemThi.Count == 0)
            {
                MessageBox.Show("Không tìm thấy SINH VIÊN.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.txtNhapMSSV.SelectAll();
            }
            else
            {
                this.btnReLoad.Enabled     = true;
                this.btnInBangDiem.Enabled = true;

                this.dgcBangDiemSV.DataSource = listDiemThi;

                this.txtMSSV.Text     = listDiemThi[0].MaSV;
                this.txtHoTen.Text    = listDiemThi[0].HoTen;
                this.txtNgaySinh.Text = listDiemThi[0].NgaySinh.ToString();
                this.txtDiaChi.Text   = listDiemThi[0].DiaChi;
                this.txtGioiTinh.Text = listDiemThi[0].GioiTinh;
                this.txtDanToc.Text   = listDiemThi[0].DanToc;
                this.txtQueQuan.Text  = listDiemThi[0].QueQuan;
                this.txtLop.Text      = listDiemThi[0].MaLop;

                int?   soTCTL = svBUS.getDiemTBTL_SoTCTL(this.txtMSSV.Text)[0].SoTCTL;
                double tbTL   = Convert.ToDouble(svBUS.getDiemTBTL_SoTCTL(this.txtMSSV.Text)[0].DTBTL);
                this.txtTBTichLuy.Text   = Math.Round(tbTL, 2).ToString();
                this.txtSoTCTichLuy.Text = soTCTL.ToString();

                double tb   = Convert.ToDouble(svBUS.getDiemTB_SoTC(this.txtMSSV.Text)[0].DTB);
                int?   soTC = svBUS.getDiemTB_SoTC(this.txtMSSV.Text)[0].SoTC;
                this.txtTBToanKhoa.Text = Math.Round(tb, 2).ToString();

                if (tbTL >= 8.5)
                {
                    this.txtXLHL.Text = "Giỏi";
                }
                else
                {
                    if (tbTL >= 7)
                    {
                        this.txtXLHL.Text = "Khá";
                    }
                    else
                    {
                        if (tbTL >= 5)
                        {
                            this.txtXLHL.Text = "Trung Bình";
                        }
                        else
                        {
                            if (tbTL >= 3.5)
                            {
                                this.txtXLHL.Text = "Yếu";
                            }
                            else
                            {
                                this.txtXLHL.Text = "Kém";
                            }
                        }
                    }
                }
            }
        }