private void btnUpadte_Click(object sender, EventArgs e) { if (IDmember == null) { MessageBox.Show("No Select!!", "Thông tin", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } else { int i = CurR; MaHS = listHS[i].MaHS; HoTen = listHS[i].HoTen; QueQuan = listHS[i].QueQuan; if (listHS[i].GioiTinh == "Nữ") { GioiTinh = true; } else { GioiTinh = false; } NgaySinh = DateTime.Parse(listHS[i].NgaySinh); TenBo = listHS[i].TenMe; TenMe = listHS[i].TenBo; MaLop = listHS[i].MaLop; frmHocSinh frmThem = new frmHocSinh(MaHS, HoTen, QueQuan, GioiTinh, NgaySinh, TenBo, TenMe, MaLop, 2); frmThem.ShowDialog(); } }
private void btnNew_Click(object sender, EventArgs e) { DateTime dt = DateTime.Now; frmHocSinh frmThem = new frmHocSinh("", "", "", true, dt, "", "", "", 1); frmThem.ShowDialog(); }