Example #1
0
        private void FrmnhanVienThuViec_Load(object sender, EventArgs e)
        {
            XuLiNV xl = new XuLiNV();

            vCn.DataSource      = xl.HienThiTv();
            cbmp.DataSource     = xl.hienThiPB();
            cbmnv.DataSource    = xl.HienThiTv();
            cbmp.DisplayMember  = "MaPB";
            cbmnv.DisplayMember = "MaNV";
            cbmp.ValueMember    = "MaPB";
            cbmnv.ValueMember   = "MaNVTV";

            btnLuu.Enabled = false;
            btnHuy.Enabled = false;
        }
Example #2
0
        private void FrmThongTinCoBan_Load(object sender, EventArgs e)
        {
            XuLiNV xl = new XuLiNV();

            vCn.DataSource      = xl.hienThiBangCb();
            cbmp.DataSource     = xl.hienThiPB();
            cbml.DataSource     = xl.hienThiL();
            cbmnv.DataSource    = xl.hienThiBangCb();
            cbmp.DisplayMember  = "MaPB";
            cbml.DisplayMember  = "MaLuong";
            cbmnv.DisplayMember = "MaNV";
            cbmp.ValueMember    = "MaPB";
            cbml.ValueMember    = "MaLuong";
            cbmnv.ValueMember   = "MaNV";
            btnHuy.Enabled      = false;
            btnLuu.Enabled      = false;
        }
Example #3
0
        private void xoa()
        {
            XuLiNV xl = new XuLiNV();

            if (xl.xoa2(cbmnv.Text))
            {
                MessageBox.Show("xoá thành công!!!", "Successful", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                vCn.DataSource      = xl.HienThiTv();
                cbmp.DataSource     = xl.hienThiPB();
                cbmnv.DataSource    = xl.HienThiTv();
                cbmp.DisplayMember  = "MaPB";
                cbmnv.DisplayMember = "MaNVTV";
                cbmp.ValueMember    = "MaPB";
                cbmnv.ValueMember   = "MaNVTV";
            }
            else
            {
                MessageBox.Show("nhân viên không tồn tại!!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }