Пример #1
0
        private void btThem_CN_Click(object sender, EventArgs e)
        {
            if (txtHoCN.Text == "" || txtTenCN.Text == "" || cbGioitinh.Text == "" || dtNgaysinh.Value == null || txtNoisinh.Text == "" || txtCMND.Text == "" || txtDantoc.Text == "" || txttongiao.Text == "" || txtQuequan.Text == "" || txtSonha.Text == "" || txtNoiOHien.Text == "" || txtSDTN.Text == "" || txtSDT.Text == "" || txtEmail.Text == "" || cbTTHonnhan.Text == "" || dtNgaycap.Value == null || txtNoiLV.Text == "" || txtTrinhdoVH.Text == "" || txtMaCN.Text == "" || txtMahesoluong.Text == "" || txtPhuCap.Text == "" || txtTKNganhang.Text == "" || txtNoicap.Text == "" || dtNgaycap.Value == null || picCN.ImageLocation == "" || txtQuoctich.Text == "" || txtBHXH.Text == "" || txtBHYT.Text == "")
            {
                MessageBox.Show("Lỗi!! Vui lòng nhập thông tin");
                return;
            }
            CongNhan    cn  = new CongNhan(txtMaCN.Text, txtHoCN.Text, txtTenCN.Text, cbGioitinh.Text, dtNgaysinh.Value, txtNoisinh.Text, txtCMND.Text, txtDantoc.Text, txttongiao.Text, txtQuequan.Text, txtSonha.Text, txtNoiOHien.Text, txtSDTN.Text, txtSDT.Text, txtEmail.Text, cbTTHonnhan.Text, dtNgaytuyendung.Value, txtNoiLV.Text, txtTrinhdoVH.Text, cbChucvu.Text, txtMahesoluong.Text, txtPhuCap.Text, txtTKNganhang.Text, txtNoicap.Text, dtNgaycap.Value, picCN.ImageLocation, "1", txtQuoctich.Text, txtBHXH.Text, txtBHYT.Text);
            CongnhanBUS cnb = new CongnhanBUS();

            try
            {
                cnb.AddCongNhan(cn);
            }
            catch (Exception p)
            {
                MessageBox.Show(p.ToString());
            }
        }
Пример #2
0
 private void DangNhap_Load(object sender, EventArgs e)
 {
     cnb = new CongnhanBUS();
 }
Пример #3
0
 private void Form1_Load(object sender, EventArgs e)
 {
     cnb = new CongnhanBUS();
 }