|
|
|
@ -1,12 +1,12 @@ |
|
|
|
|
using PEIS.Base; |
|
|
|
|
using PEIS.Base; |
|
|
|
|
using PEIS.Entity; |
|
|
|
|
using PEIS.Event; |
|
|
|
|
using PEIS.Presenter; |
|
|
|
|
using PEIS.Utils; |
|
|
|
|
using System; |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System.Linq; |
|
|
|
|
using System.Threading; |
|
|
|
|
using PEIS.Utils; |
|
|
|
|
using System.Threading; |
|
|
|
|
using System.Windows.Forms; |
|
|
|
|
|
|
|
|
|
namespace PEIS.View.Base |
|
|
|
|
{ |
|
|
|
@ -29,11 +29,16 @@ namespace PEIS.View.Base |
|
|
|
|
OpsPatient.TsmiDelete.Visible = false; |
|
|
|
|
OpsPatient.TsmiSave.Visible = false; |
|
|
|
|
OpsPatient.TsmiSearch.Visible = false; |
|
|
|
|
OpsPatient.TstbKey.TextChanged += Search_TextChanged; |
|
|
|
|
OpsPatient.TstbKey.KeyDown += TstbKey_KeyDown; |
|
|
|
|
|
|
|
|
|
DgvPatient.Initialize(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void TstbKey_KeyDown(object sender, KeyEventArgs e) |
|
|
|
|
{ |
|
|
|
|
if (e.KeyCode == Keys.Enter) OnGetBasePatient(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected override object CreatePresenter() |
|
|
|
|
{ |
|
|
|
|
return new BasePatientPresenter(this); |
|
|
|
@ -43,12 +48,6 @@ namespace PEIS.View.Base |
|
|
|
|
{ |
|
|
|
|
ThreadPool.QueueUserWorkItem(state => OnGetBasePatient()); |
|
|
|
|
} |
|
|
|
|
private void Search_TextChanged(object sender, EventArgs e) |
|
|
|
|
{ |
|
|
|
|
var search = OpsPatient.TstbKey.Text.Trim(); |
|
|
|
|
if (search == @"输入条件查询") return; |
|
|
|
|
DgcPatient.SetDataSource(string.IsNullOrEmpty(search) ? _lstBasePatients : _lstBasePatients.Where(a => a.Name.Contains(search) || a.CardNo.Contains(search)).ToList()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void DgvPatient_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e) |
|
|
|
|
{ |
|
|
|
@ -80,7 +79,7 @@ namespace PEIS.View.Base |
|
|
|
|
} |
|
|
|
|
protected virtual void OnGetBasePatient() |
|
|
|
|
{ |
|
|
|
|
GetBasePatient?.Invoke(this, new Args<BasePatient>{}); |
|
|
|
|
GetBasePatient?.Invoke(this, new Args<BasePatient>{ Code = OpsPatient.TstbKey.Text.Trim() == "输入条件查询" ? null : string.IsNullOrEmpty(OpsPatient.TstbKey.Text) ? null : OpsPatient.TstbKey.Text.Trim() }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|