private void gridLop_Click(object sender, EventArgs e)
 {
     try
     {
         var temp = BangDiemLogic.SelectDetail(GlobalSettings.UserID, O2S_Common.TypeConvert.Parse.ToInt32(gridLop.SelectedRows[0].Cells["clmLopHocId"].Value.ToString()));
         lblTenLop.Text     = temp.TenLopHoc;
         lblMaLop.Text      = temp.LopHocId.ToString();
         lblTenKhoaHoc.Text = temp.TenKhoaHoc;
         lblNgayBD.Text     = temp.NgayBatDau.Value.ToShortDateString();
         lblNgayKT.Text     = temp.NgayKetThuc.Value.ToShortDateString();
         lblSiSo.Text       = temp.SiSo.ToString();
         lblTinhTrang.Text  = (bool)temp.DangMo ? "Đang mở" : "Đã đóng";
         lblDiemTB.Text     = temp.DiemTrungBinh.ToString();
     }
     catch
     {
         lblTenLop.Text     = string.Empty;
         lblMaLop.Text      = string.Empty;
         lblTenKhoaHoc.Text = string.Empty;
         lblNgayBD.Text     = string.Empty;
         lblNgayKT.Text     = string.Empty;
         lblSiSo.Text       = string.Empty;
         lblTinhTrang.Text  = string.Empty;
         lblDiemTB.Text     = string.Empty;
     }
 }
 /// <summary>
 /// Nạp bảng điểm lên giao diện
 /// </summary>
 /// <param name="maHV">Mã học viên</param>
 /// <param name="maLop">Mã lớp</param>
 public void LoadBangDiem(int maHV, int maLop)
 {
     try
     {
         var bangDiem = BangDiemLogic.SelectDetail(maHV, maLop);
         lblTenLop.Text               = bangDiem.TenLopHoc;
         lblTenKhoaHocoa.Text         = bangDiem.TenKhoaHoc;
         lblDiemTrungBinh.Text        = (bangDiem.DiemTrungBinh ?? 0).ToString("N2");
         gridControlDSDiem.DataSource = bangDiem.BangDiemChiTiets;
     }
     catch (Exception ex)
     {
         O2S_Common.Logging.LogSystem.Warn(ex);
     }
 }
Beispiel #3
0
        public void LoadPanelDiem(int _hocvienId, int _lophocId)
        {
            //List<BangDiemChiTietDTO> _lstBangDiem = new List<BangDiemChiTietDTO>();

            this.bangDiemFull_Click = BangDiemLogic.SelectDetail(_hocvienId, _lophocId);
            lblMaLop.Text           = this.bangDiemFull_Click.TenLopHoc;
            lblTenLop.Text          = this.bangDiemFull_Click.TenLopHoc;
            lblKhoa.Text            = this.bangDiemFull_Click.TenKhoaHoc;
            lblMaHV.Text            = this.bangDiemFull_Click.MaHocVien;
            lblTenHocVien.Text      = this.bangDiemFull_Click.TenHocVien;
            ////load Danh sach diem
            //foreach (var item in this.bangDiemFull_Click.BangDiemChiTiets)
            //{
            //    BangDiemChiTietDTO _bangdiem = new BangDiemChiTietDTO();
            //    _bangdiem.BangDiemChiTietId = item.BangDiemChiTietId; ;
            //    _bangdiem.BangDiemId = this.bangDiemFull_Click.BangDiemId;
            //    _bangdiem.MaMonHoc = item.MaMonHoc;
            //    _bangdiem.TenMonHoc = item.TenMonHoc;
            //    _bangdiem.Diem = item.Diem ?? 0;
            //    _lstBangDiem.Add(_bangdiem);
            //}
            gridControlDSDiem.DataSource = this.bangDiemFull_Click.BangDiemChiTiets;
        }