Exemple #1
0
        public Form_PhanCong()
        {
            InitializeComponent();

            pbBLL = new PhongBanBLL();
            nvBLL = new NhanVienBLL();
            cvBLL = new CongViecBLL();
            ctBLL = new CongTrinhBLL();

            dataGridView_CongViecCuaNhanVien.AutoGenerateColumns = dataGridView_DanhSachCongTrinh.AutoGenerateColumns = dataGridView_DanhSachCongViecCuaCongTrinh.AutoGenerateColumns = dataGridView_NhanVienTrongPhongBan.AutoGenerateColumns = dataGridView_PhongBan.AutoGenerateColumns = false;

            dataGridView_PhongBan.DataSource          = pbBLL.getAllPhongBan();
            dataGridView_DanhSachCongTrinh.DataSource = ctBLL.getAllCongTrinh();
        }
Exemple #2
0
 private void btnThem_Click(object sender, EventArgs e)
 {
     if (btnThem.Text == "Hủy Thêm Mới")
     {
         btnXoa.Enabled     = true;
         btnCapNhat.Enabled = true;
         btnLuu.Enabled     = false;
         txtNV.Enabled      = false;
         txtDiaChi.Enabled  = false;
         comboBox1.Enabled  = false;
         comboBox2.Enabled  = false;
         txtSDT.Enabled     = false;
         btnThem.Text       = "Thêm Mới";
     }
     else
     {
         trangthai               = 0;
         comboBox2.DataSource    = PhongBanBLL.getAllPhongBan();
         comboBox2.DisplayMember = "tenPhongBan";
         comboBox2.ValueMember   = "idPhongBan";
         btnXoa.Enabled          = false;
         btnCapNhat.Enabled      = false;
         btnLuu.Enabled          = true;
         txtNV.Enabled           = true;
         txtDiaChi.Enabled       = true;
         comboBox1.Enabled       = true;
         comboBox2.Enabled       = true;
         txtSDT.Enabled          = true;
         txtNV.ResetText();
         txtDiaChi.ResetText();
         txtSDT.ResetText();
         comboBox1.ResetText();
         comboBox2.ResetText();
         btnThem.Text = "Hủy Thêm Mới";
     }
 }
Exemple #3
0
 private void reloadGridDanhSachPhongBan()
 {
     dataGridView_PhongBan.DataSource = null;
     dataGridView_PhongBan.DataSource = pbBLL.getAllPhongBan();
 }