private void dg_ProductDetailsSO_KeyDown(object sender, KeyEventArgs e) { if (dg_ProductDetailsSO.CurrentCell.ColumnIndex == 1) { if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F2) { ColorAdd cA = new ColorAdd(); cA.ShowDialog(); this.dg_ProductDetailsSO.CurrentRow.Cells[1].Value = cA.cCode; this.dg_ProductDetailsSO.CurrentRow.Cells[2].Value = cA.cColor; } } if (dg_ProductDetailsSO.CurrentCell.ColumnIndex == 3) { if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F2) { SearchSize ss = new SearchSize(); ss.ShowDialog(); this.dg_ProductDetailsSO.CurrentRow.Cells[3].Value = ss.sCode; this.dg_ProductDetailsSO.CurrentRow.Cells[4].Value = ss.sSize; } } if (dg_ProductDetailsSO.CurrentCell.ColumnIndex == 5) { if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F2) { SearchQuality searchQuality = new SearchQuality(); searchQuality.ShowDialog(); this.dg_ProductDetailsSO.CurrentRow.Cells[5].Value = searchQuality.qCode; this.dg_ProductDetailsSO.CurrentRow.Cells[6].Value = searchQuality.qQuality; } } }
private void txt_SizeCode_KeyDown(object sender, KeyEventArgs e) { if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F2) { SearchSize ss = new SearchSize(); ss.ShowDialog(); this.txt_SizeCode.Text = ss.sCode; this.txt_Size.Text = ss.sSize; } if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F) { fetch(); } }