Exemplo n.º 1
0
        private void HienThiThongTin()
        {
            LuuTruDanhSach service = new LuuTruDanhSach();
            Diem           objDiem = service.HienThiDiemCuaHocSinhTheoMaHS(MAHS);

            if (objDiem != null)
            {
                string HoVTen = objDiem.Ho + objDiem.Ten;
                txtHoTen.Text = HoVTen;
                txtMaHS.Text  = objDiem.MaHS;

                txtTOAN15.Text = objDiem.TOAN15;
                txtTOAN60.Text = objDiem.TOAN60;
                txtTOANHK.Text = objDiem.TOANHK;
                txtTOANTB.Text = objDiem.TOANTB;

                txtVAN15.Text = objDiem.VAN15;
                txtVAN60.Text = objDiem.VAN60;
                txtVANHK.Text = objDiem.VANHK;
                txtVANTB.Text = objDiem.VANTB;

                txtTA15.Text = objDiem.ANH15;
                txtTA60.Text = objDiem.ANH60;
                txtTAHK.Text = objDiem.ANHHK;
                txtTATB.Text = objDiem.ANHTB;

                txtDIA15.Text = objDiem.DIA15;
                txtDIA60.Text = objDiem.DIA60;
                txtDIAHK.Text = objDiem.DIAHK;
                txtDIATB.Text = objDiem.DIATB;

                txtSU15.Text = objDiem.SU15;
                txtSU60.Text = objDiem.SU60;
                txtSUHK.Text = objDiem.SUHK;
                txtSUTB.Text = objDiem.SUTB;
            }
        }
Exemplo n.º 2
0
        public Diem  HienThiDiemCuaHocSinhTheoMaHS(string MaHS)
        {
            Diem      objDiem = null;
            string    strSQL  = "SELECT * FROM HocSinh ,Diem D WHERE D.MaHS='" + MaHS + "'";
            DataTable dt      = DataProvider.LayDanhSach(strSQL);

            if (dt.Rows.Count > 0)
            {
                objDiem      = new Diem();
                objDiem.Ho   = "" + dt.Rows[0]["Ho"];
                objDiem.Ten  = "" + dt.Rows[0]["Ten"];
                objDiem.MaHS = "" + dt.Rows[0]["MaHS"];

                objDiem.TOAN15 = "" + dt.Rows[0]["Toan15"];
                objDiem.TOAN60 = "" + dt.Rows[0]["Toan60"];
                objDiem.TOANHK = "" + dt.Rows[0]["ToanHK"];
                objDiem.TOANTB = "" + dt.Rows[0]["ToanTB"];

                objDiem.ANH15 = "" + dt.Rows[0]["ANH15"];
                objDiem.ANH60 = "" + dt.Rows[0]["ANH60"];
                objDiem.ANHHK = "" + dt.Rows[0]["ANHHK"];
                objDiem.ANHTB = "" + dt.Rows[0]["ANHTB"];

                objDiem.VAN15 = "" + dt.Rows[0]["Van15"];
                objDiem.VAN60 = "" + dt.Rows[0]["Van60"];
                objDiem.VANHK = "" + dt.Rows[0]["VanHK"];
                objDiem.VANTB = "" + dt.Rows[0]["VanTB"];

                objDiem.DIA15 = "" + dt.Rows[0]["DIA15"];
                objDiem.DIA60 = "" + dt.Rows[0]["DIA60"];
                objDiem.DIAHK = "" + dt.Rows[0]["DIAHK"];
                objDiem.DIATB = "" + dt.Rows[0]["DIATB"];

                objDiem.SU15 = "" + dt.Rows[0]["SU15"];
                objDiem.SU60 = "" + dt.Rows[0]["SU60"];
                objDiem.SUHK = "" + dt.Rows[0]["SUHK"];
                objDiem.SUTB = "" + dt.Rows[0]["SUTB"];

                // objDiem = new Diem();
                //objDiem.Ho = "" + dt.Rows[1]["Ho"];
                //objDiem.Ten = "" + dt.Rows[1]["Ten"];
                //objDiem.MaHS = "" + dt.Rows[1]["MaHS"];

                //objDiem.TOAN15 = "" + dt.Rows[1]["Toan15"];
                //objDiem.TOAN60 = "" + dt.Rows[1]["Toan60"];
                //objDiem.TOANHK = "" + dt.Rows[1]["ToanHK"];
                //objDiem.TOANTB = "" + dt.Rows[1]["ToanTB"];

                //objDiem.ANH15 = "" + dt.Rows[1]["TA15"];
                //objDiem.ANH60 = "" + dt.Rows[1]["TA60"];
                //objDiem.ANHHK = "" + dt.Rows[1]["TAHK"];
                //objDiem.ANHTB = "" + dt.Rows[1]["TATB"];

                //objDiem.VAN15 = "" + dt.Rows[1]["Van15"];
                //objDiem.VAN60 = "" + dt.Rows[1]["Van60"];
                //objDiem.VANHK = "" + dt.Rows[1]["VanHK"];
                //objDiem.VANTB = "" + dt.Rows[1]["VanTB"];

                //objDiem.DIA15 = "" + dt.Rows[1]["DIA15"];
                //objDiem.DIA60 = "" + dt.Rows[1]["DIA60"];
                //objDiem.DIAHK = "" + dt.Rows[1]["DIAHK"];
                //objDiem.DIATB = "" + dt.Rows[1]["DIATB"];

                //objDiem.SU15 = "" + dt.Rows[1]["SU15"];
                //objDiem.SU60 = "" + dt.Rows[1]["SU60"];
                //objDiem.SUHK = "" + dt.Rows[1]["SUHK"];
                //objDiem.SUTB = "" + dt.Rows[1]["SUTB"];
            }
            return(objDiem);
        }