Esempio n. 1
0
 private void btnCoPhep_Click(object sender, EventArgs e)
 {
     if (dtDanhSach.SelectedRows.Count > 0)
     {
         foreach (DataGridViewRow r in dtDanhSach.SelectedRows)
         {
             DiemDanhCtrl ctrl = new DiemDanhCtrl();
             if (chkNgayHienTai.Checked == true)
             {
                 ctrl.Them(ctrl.DataToInfo(r, DateTime.Now, true));
             }
             else
             {
                 ctrl.Them(ctrl.DataToInfo(r, dateNgayHienTai.Value, true));
             }
         }
     }
 }
Esempio n. 2
0
 private void btnKhongPhep_Click(object sender, EventArgs e)
 {
     if (dtDanhSach.SelectedRows.Count > 0)
     {
         foreach (DataGridViewRow r in dtDanhSach.SelectedRows)
         {
             DiemDanhCtrl ctrl = new DiemDanhCtrl();
             ctrl.Them(ctrl.DataToInfo(r, DateTime.Now, false));
         }
     }
 }