private void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                if (grdCheck.SelectedRows.Count == 1)
                {
                    var frmAddCheck = new FrmAddCheck(_userInfo, 1,
                                                  Convert.ToInt64(grdCheck.SelectedRows[0].Cells["CheckID"].Value));

                    frmAddCheck.Show(this);
                }
                else
                {
                    MessageBox.Show("Bạn cần chọn 1 cảnh báo.");
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
                if (GlobalInfo.IsDebug) MessageBox.Show(ex.ToString());
            }
        }
 private void btnAdd_Click(object sender, EventArgs e)
 {
     FrmAddCheck frmAddCheck = new FrmAddCheck(_userInfo, 0, 0);
     frmAddCheck.Show(this);
 }
        private void grdCheck_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            //check permission
            if (_userInfo.UserPermission.Contains(ConstantInfo.PERMISSON_CAP_NHAT_THONG_TIN_DE_NGHI_KIEM_TRA) == false)
            {
                return;
            }

            try
            {
                if (e.RowIndex >= 0 && grdCheck.SelectedRows.Count == 1) // Only select one row
                {
                    var frmAddCheck = new FrmAddCheck(_userInfo, 1,
                                                        Convert.ToInt64(grdCheck.SelectedRows[0].Cells["CheckID"].Value));

                    frmAddCheck.Show(this);
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
                if (GlobalInfo.IsDebug) MessageBox.Show(ex.ToString());
            }
        }