ab56a9bcf7
SVN-Revision: r240
58 lines
1.7 KiB
C#
58 lines
1.7 KiB
C#
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;
|
|
/// <summary>
|
|
/// 下拉框对象
|
|
/// </summary>
|
|
public DevExpress.XtraEditors.LookUpEdit lookUpEditObject { get { return lookUpEdit1; } }
|
|
/// <summary>
|
|
/// 回车触发下一个
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
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}");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|