Exemplo n.º 1
0
 private void dgvSheet_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         string str = SIString.TryStr(this.dgvSheet.Rows[e.RowIndex].Cells["sheet_no"].Value);
         if (!string.IsNullOrEmpty(str))
         {
             object obj = this.dgvSheet.Rows[e.RowIndex].DataBoundItem;
             //t_
             using (FrmSHSheetDetail detail = new FrmSHSheetDetail(obj))
             {
                 if (detail.ShowDialog() == DialogResult.Cancel)
                 {
                     this.btnSearch_Click(null, null);
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
 private void btnOpen_Click(object sender, EventArgs e)
 {
     if (this.dgvSheet.CurrentRow != null)
     {
         string str = SIString.TryStr(this.dgvSheet.Rows[this.dgvSheet.CurrentRow.Index].Cells["sheet_no"].Value.ToString().Trim());
         if (!string.IsNullOrEmpty(str))
         {
             object dataRow = this.dgvSheet.CurrentRow.DataBoundItem;
             using (FrmSHSheetDetail detail = new FrmSHSheetDetail(dataRow))
             {
                 if (detail.ShowDialog() == DialogResult.Cancel)
                 {
                     this.btnSearch_Click(null, null);
                 }
             }
         }
     }
     else
     {
         MessageBox.Show("请先选中一行再进行操作!", Gattr.AppTitle);
     }
 }