private void buttonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { //ConvertPartNumber(); frmPartNumberList pnl = new frmPartNumberList(); pnl.ShowDialog(); if (pnl.Selectedpartnumber != null) { if (pnl.Selectedpartnumber != string.Empty) { buttonEdit1.Text = pnl.Selectedpartnumber; } } if (buttonEdit1.Text != "") { ConvertPartNumber(); } else { simpleButton2.Enabled = false; simpleButton3.Enabled = false; simpleButton4.Enabled = false; } }