private void btn_ct_Click(object sender, EventArgs e) { try { frmPopup objpopup = new frmPopup("SOMAIN", "CT", "CTID,CT_NO", "CT_NO;CT NO", "Please select", ""); objpopup.ShowDialog(); txtCtNo.Text = objpopup.ResultFieldValue.Split(',')[1]; } catch (Exception ex) { } }
private void TextBox1_KeyDown(object sender, KeyEventArgs e) { try { bool flgItemEdit = false; if (e.KeyData == Keys.F2) { if (!flgItemEdit) { frmPopup objfrmPopup = new frmPopup("SEMAIN", "SE", "AREID,ARE_NO", "ARE_NO;ARE NO", "Please select", ""); objfrmPopup.ResultFieldValue = txtSplCon.Text; objfrmPopup.ShowDialog(); txtSplCon.Text = objfrmPopup.ResultFieldValue.Split(',')[1]; } } } catch (Exception ex) { } }
private void txt_key_down(object sender, KeyEventArgs e) { try { bool flgItemEdit = false; TextBox txt = (TextBox)sender; if (e.KeyData == Keys.F2 && txt.Name == "prod_nm") { if (!flgItemEdit) { frmPopup objfrmPopup = new frmPopup("PT_MAST", "PT", "PROD_CD,PROD_NM", "PROD_NM;ITEM_NAME", "Please select", "prod_ty_nm IN('RAW MATERIAL','SEMI FINISHED')"); objfrmPopup.ResultFieldValue = txt.Text; objfrmPopup.ShowDialog(); txt.Text = objfrmPopup.ResultFieldValue.Split(',')[1]; dgvRM_For_BOM.CurrentRow.Cells["prod_cd"].Value = objfrmPopup.ResultFieldValue.Split(',')[0]; } } } catch (Exception ex) { } }