Example #1
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            var frmTBGiaoVien = new frmTBGiaoVien();

            frmTBGiaoVien.SetText(GetGiaoVien().ToString());
            frmTBGiaoVien.ShowDialog();
        }
Example #2
0
        private void btnSearchOK_Click(object sender, EventArgs e)
        {
            var kieuTim = KieuTim.TheoHoTen;

            if (rdMaGV.Checked)
            {
                kieuTim = KieuTim.TheoMa;
            }
            else if (rdHoTen.Checked)
            {
                kieuTim = KieuTim.TheoHoTen;
            }
            else if (rdSoDT.Checked)
            {
                kieuTim = KieuTim.TheoSDT;
            }

            var ketQua = quanLyGV.Tim(txtSearch.Text, kieuTim);

            if (ketQua is null)
            {
                MessageBox.Show("Không tìm thấy", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                var frmTBGiaoVien = new frmTBGiaoVien();
                frmTBGiaoVien.SetText(ketQua.ToString());
                frmTBGiaoVien.ShowDialog();
            }
        }