private void dataGridView1_DoubleClick(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count == 1)
     {
         var row = dataGridView1.CurrentRow;
         if (dataGridView1.CurrentCell.ColumnIndex == dataGridView1.Columns["QRCodeImage"].Index)
         {
             if (!string.IsNullOrEmpty((string)row.Cells["EnglishName"].Value) && !string.IsNullOrEmpty((string)row.Cells["PassportNo"].Value))
             {
                 FrmQRCode frm = new FrmQRCode(row.Cells["EnglishName"].Value + "|" + row.Cells["PassportNo"].Value);
                 frm.ShowDialog();
             }
         }
         else
         {
             VisaInfo model = _bllVisaInfo.GetModel(Guid.Parse(dataGridView1.CurrentRow.Cells["VisaInfo_id"].Value.ToString()));
             if (model == null)
             {
                 MessageBoxEx.Show(Resources.FindModelFailedPleaseCheckInfoCorrect);
                 return;
             }
             FrmInfoTypeIn frm = new FrmInfoTypeIn(model, LoadDataToDataGridView, _curPage);
             frm.ShowDialog();
         }
     }
 }
Esempio n. 2
0
 private void dataGridView1_DoubleClick(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count == 1)
     {
         var row = dataGridView1.CurrentRow;
         if (!string.IsNullOrEmpty((string)row.Cells["EnglishName"].Value) && !string.IsNullOrEmpty((string)row.Cells["PassportNo"].Value))
         {
             FrmQRCode frm = new FrmQRCode(row.Cells["EnglishName"].Value + "|" + row.Cells["PassportNo"].Value);
             frm.ShowDialog();
         }
     }
 }
        /// <summary>
        /// 查看单个二维码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void showQRCode_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.SelectedRows.Count > 1)
            {
                MessageBoxEx.Show(Resources.SelectShowMoreThanOne);
                return;
            }

            string passportNo = dataGridView1.SelectedRows[0].Cells["PassportNo"].Value.ToString();
            string name       = dataGridView1.SelectedRows[0].Cells["EnglishName"].Value.ToString();

            FrmQRCode dlg = new FrmQRCode(passportNo + "|" + name);

            dlg.ShowDialog();
        }
Esempio n. 4
0
        private void btnShowNormalOutQR_Click(object sender, EventArgs e)
        {
            FrmQRCode frm = new FrmQRCode(OutStateString.Type03NormalOut);

            frm.ShowDialog();
        }