private void btnHocPhan_Click(object sender, EventArgs e) { try { DataRow hp = ((sender as Button).Tag as DataRow); String MaHocPhan = hp["MANHOM"].ToString(); TenHP = hp["TENHOCPHAN"].ToString(); MaHP = MaHocPhan; ShowDanhSachLopHocByMaHocPhan(MaHocPhan); //NhomDAO.Instance.getHocPhanByID(MaHocPhan); lblTenLop.Text = string.Format("{0} - {1}", hp["MAHOCPHAN"], hp["TENHOCPHAN"]); //TrangThaiTuanHoc TrangThai = TrangThaiTuanHocDAO.Instance.getTrangThaiTuanHocByMaHocPhan(MaHocPhan); txtNhomHP.Text = string.Format("{0} - {1}", hp["MANHOM"], hp["TENNHOM"]); lblSoLuong.Text = hp["SOTINCHI"].ToString(); txtTotalBuoiHoc.Text = hp["SOBUOIHOC"].ToString(); int stc = Convert.ToInt32(hp["SOTINCHI"].ToString()); int times = Convert.ToInt32(ConfigurationManager.AppSettings["thoigian1tiet"].ToString()) * Convert.ToInt32(hp["SOTINCHI"].ToString()); if (stc > 1) { times = times + (stc - 1) * 5; } FrmConfigSetting.EditAppSetting("thoigianhoc", times.ToString()); } catch (Exception ex) { MessageBox.Show("Không thể đáp ứng yêu cầu, Vui lòng liên hệ quản trị để được hổ trợ", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void thiếtLậpToolStripMenuItem1_Click(object sender, EventArgs e) { FrmConfigSetting cofig = new FrmConfigSetting(); cofig.ShowDialog(); }