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;
using DevExpress.XtraEditors;
namespace CsHospital.UserControls
{
public partial class UserIcu : UserControl
{
public UserIcu()
{
InitializeComponent();
DBConfig.Instance.CreateConnection();
DataTable f_Icu = SqlHelper.ExecuteDataTable(" SELECT dm_icu_type.dm,dm_icu_type.mc FROM dm_icu_type ");
this.lookUpEdit1.Properties.DataSource = f_Icu;
this.lookUpEdit1.Properties.DisplayMember = "mc";
this.lookUpEdit1.Properties.ValueMember = "dm";
}
public delegate void BindTextCode(bool flag);
public event BindTextCode bindTextCode;
///
/// 下拉框对象
///
public DevExpress.XtraEditors.LookUpEdit lookUpEditObject { get { return lookUpEdit1; } }
///
/// 回车触发下一个
///
///
///
private void textBox_KeyPress(object sender, KeyPressEventArgs e)
{
bool isnull = false;
LookUpEdit gu = sender as LookUpEdit;
if (e.KeyChar == (char)Keys.Enter)
{
if (string.IsNullOrWhiteSpace(gu.Text))
{
isnull = true;
bindTextCode(isnull);
}
else
{
SendKeys.Send("{tab}");
}
}
}
}
}