Ejemplo n.º 1
0
        private void btnTaoBangChamCong_Click(object sender, EventArgs e)
        {
            _Thang = Convert.ToInt32(cboThang.SelectedIndex) + 1;
            _Nam   = Convert.ToInt32(nudNam.Value);
            frmPhongBan frm_PhongBan = new frmPhongBan(this);

            frm_PhongBan.ShowDialog();
            clsChamCong_BUS BUS = new clsChamCong_BUS();

            dgvChamCong.DataSource = BUS.LayTenBangChamCong();
        }
Ejemplo n.º 2
0
 private void btnTaoBangChamCong_Click(object sender, EventArgs e)
 {
     _Thang = dtpThangNam.Value.Month;
     _Nam   = dtpThangNam.Value.Year;
     if (_Nam > DateTime.Now.Year || DateTime.Now.Year <= _Nam && _Thang > DateTime.Now.Month)
     {
         MessageBox.Show("Tháng chấm công không hợp lệ", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         frmPhongBan frm_PhongBan = new frmPhongBan(this);
         frm_PhongBan.ShowDialog();
         // clsChiTietChamCong_BUS BUS = new clsChiTietChamCong_BUS();
     }
 }