private void btnSel_Click_1(object sender, EventArgs e) { frmExpress F = new frmExpress(); F.dtField = this.dtField; F.meFormula.Text = richTextBox1.Text; if (F.ShowDialog() == DialogResult.OK) { this.strExpress = F.strExpress; richTextBox1.Text = F.meFormula.Text; } F.Dispose(); }
private void BtnExpress_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { frmExpress F = new frmExpress(); F.dtField = (DataTable)gridField.DataSource; if (viewField.GetRowCellValue(viewField.FocusedRowHandle, "F_Express") != DBNull.Value) { F.meFormula.Text = viewField.GetRowCellValue(viewField.FocusedRowHandle, "F_Express").ToString(); } if (F.ShowDialog() == DialogResult.OK) { viewField.SetRowCellValue(viewField.FocusedRowHandle, "F_Express", F.meFormula.Text); viewField.SetRowCellValue(viewField.FocusedRowHandle, "F_Express1", F.strExpress); } F.Dispose(); }