private void Addhstoclass_Load(object sender, EventArgs e) { HSB.Load(); List <string> kl = new List <string>(); foreach (var s in ClassDTO.khoilop) { kl.Add(s.TenK1); } KLcombo.DataSource = kl.ToList(); foreach (var s in HocSinhDTO.lisths) { string gt = ""; if (s.Gioitinh == true) { gt = "Nam"; } else { gt = "Nữ"; } DataGridViewRow row = new DataGridViewRow(); DataGridViewCell cell = new DataGridViewTextBoxCell(); cell.Value = s.Name; row.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = gt; row.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = s.Ngsinh; row.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = s.Diachi; row.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = s.Email; row.Cells.Add(cell); DShsgridview.Rows.Add(row); } }
private void QDf_Load(object sender, EventArgs e) { HSB.getSS(); HSB.Load(); HSB.TLSL(); lbltoithieu.Text = HocSinhDTO.toithieu.ToString(); lbltoida.Text = HocSinhDTO.toida.ToString(); lblsstoida.Text = clasDTO.SS.ToString(); lbldiemdat.Text = CTMonHoc.DiemDat.ToString(); }
private void DSclass_Load(object sender, EventArgs e) { HSB.Load(); HSB.loadBCM(); if (dshsgrid.SelectedRows.Count < 0) { if (UsserrDTO.u.Per == 3) { button1.Visible = false; } } List <string> kl = new List <string>(); foreach (var s in ClassDTO.khoilop) { kl.Add(s.TenK1); } kLcombo.DataSource = kl.ToList(); if (UsserrDTO.u.Per == 0 || UsserrDTO.u.Per == 2) { txtht.Enabled = false; txtdate.Enabled = false; txt15p.Enabled = false; txt1t.Enabled = false; txtaddr.Enabled = false; txtck.Enabled = false; txtclass.Enabled = false; txtdate.Enabled = false; txthk1.Enabled = false; txthk2.Enabled = false; txtmail.Enabled = false; button1.Visible = false; button2.Visible = false; addsubjecttohs.Visible = false; updateD.Visible = false; button3.Visible = false; button4.Visible = false; } }
private void DSclass_Load(object sender, EventArgs e) { HSB.Load(); if (dshsgrid.SelectedRows.Count < 0) { button1.Visible = false; } List <string> kl = new List <string>(); foreach (var s in ClassDTO.khoilop) { kl.Add(s.TenK1); } kLcombo.DataSource = kl.ToList(); }
private void TongKetHK_Load(object sender, EventArgs e) { HSB.Loadkl(); HSB.loadnohk(); HSB.loadBCM(); List <string> NH = new List <string>(); foreach (var s in HocKi.HK) { int k = 1; string x = s.MaHK1.ToString(); char[] ar = x.ToCharArray(); string nam = ar[1].ToString() + ar[2].ToString() + ar[3].ToString() + ar[4].ToString(); for (int o = 0; o < NH.Count(); o++) { if (nam == NH[o]) { k = 0; } } if (k == 1) { NH.Add(nam); } } namhoccombo.DataSource = NH.ToList(); HSB.Load(); HSB.loadBCM(); List <string> kl = new List <string>(); foreach (var s in ClassDTO.khoilop) { kl.Add(s.TenK1); } kLcombo.DataSource = kl.ToList(); }
private void Form1_Load(object sender, EventArgs e) { HSB.Load(); }