private void txtVenCode_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { FrmVenInfo fVen = new FrmVenInfo(txtVenCode.Text.Trim()); if (DialogResult.OK == fVen.ShowDialog()) { txtVenCode.Text = fVen.sVenCode; txtVenName.Text = fVen.sVenName; } }
private void txtVenCode_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { try { FrmVenInfo fVen = new FrmVenInfo(txtVenCode.Text.Trim()); if (DialogResult.OK == fVen.ShowDialog()) { txtVenCode.Text = fVen.sVenCode; txtVenName.Text = fVen.sVenName; } } catch (Exception ee) { MessageBox.Show("¼ÓÔزÎÕÕʧ°Ü"); } }
private void ItemButtonEditVen_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { try { int iRow = 0; if (gridView1.RowCount > 0) { iRow = gridView1.FocusedRowHandle; } string sVen = gridView1.GetRowCellDisplayText(iRow, gridColcVenCode).ToString().Trim(); FrmVenInfo fVen = new FrmVenInfo(sVen); if (DialogResult.OK == fVen.ShowDialog()) { gridView1.SetRowCellValue(iRow, gridColcVenCode, fVen.sVenCode); } } catch (Exception ee) { MessageBox.Show("获得供应商参照失败! " + ee.Message); } }