基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
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 DevExpress.XtraEditors;
|
||||
|
||||
namespace CsHospital.UserControls
|
||||
{
|
||||
public partial class UserBb : UserControl
|
||||
{
|
||||
public UserBb()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataTable f_Bb = new DataTable();
|
||||
f_Bb.Columns.Add("编号");
|
||||
f_Bb.Columns.Add("名称");
|
||||
f_Bb.Rows.Add("01", "血液");
|
||||
f_Bb.Rows.Add("02", "尿液");
|
||||
this.lookUpEdit1.Properties.DataSource = f_Bb;
|
||||
this.lookUpEdit1.Properties.DisplayMember = "名称";
|
||||
this.lookUpEdit1.Properties.ValueMember = "编号";
|
||||
|
||||
}
|
||||
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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user