Beispiel #1
0
 public FormNhanVien()
 {
     nv = new ClassNhanVien();
     InitializeComponent();
     txtmanhanvien.Enabled = false;
     FormNV_LoadData();
 }
Beispiel #2
0
 private void butxoa_Click(object sender, EventArgs e)
 {
     if (ClassNhanVien.KiemTraXoaNV(txtmanhanvien.Text) == true)
     {
         nv.XoaNV(txtmanhanvien.Text);
         FormNV_LoadData();
         ResetForm();
     }
 }
Beispiel #3
0
        private void butsua_Click(object sender, EventArgs e)
        {
            comboBoxchucvu.ValueMember = "MACV";
            string machucvu_tam = comboBoxchucvu.SelectedValue.ToString();
            string gt           = "";

            if (radioButtonnam.Checked == true)
            {
                gt = radioButtonnam.Text;
            }
            if (radioButtonnu.Checked == true)
            {
                gt = radioButtonnu.Text;
            }
            if (ClassNhanVien.KiemTraSuaNV(txtmanhanvien.Text, txthoten.Text, dateEditngaysinh.Text, gt, txtchoohientai.Text, txtsodienthoai.Text, txtcmnd.Text, txtnoicap.Text, txthokhau.Text, dateEditngaycap.Text, machucvu_tam, ofd.FileName) == true)
            {
                nv.SuaNV(txtmanhanvien.Text, txthoten.Text, dateEditngaysinh.Text, gt, txtchoohientai.Text, txtsodienthoai.Text, txtcmnd.Text, txtnoicap.Text, txthokhau.Text, dateEditngaycap.Text, machucvu_tam, ofd.FileName);
                FormNV_LoadData();
                ResetForm();
            }
        }