using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Lskj.Core; namespace CsHospital.UserControls { public partial class UserByx : UserControl { public UserByx() { InitializeComponent(); DBConfig.Instance.CreateConnection(); DataTable f_Byx = SqlHelper.ExecuteDataTable("select dm_byyzd.byyzdbm ,dm_byyzd.byyzdmc FROM dm_byyzd"); this.lookUpEdit1.Properties.DataSource = f_Byx; this.lookUpEdit1.Properties.DisplayMember = "byyzdmc"; this.lookUpEdit1.Properties.ValueMember = "byyzdbm"; } /// /// 下拉框对象 /// public DevExpress.XtraEditors.LookUpEdit lookUpEditObject { get { return lookUpEdit1; } } /// /// 回车触发下一个 /// /// /// private void textBox_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Enter) { SendKeys.Send("{tab}"); } } } }