Files
lserp_cs_6.0/其他程序/CsHospital/WardSelec.cs
T
cyf ab56a9bcf7 基线 SVN r240
SVN-Revision: r240
2025-02-06 06:46:06 +00:00

46 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
namespace CsHospital
{
public partial class WardSelec : DevExpress.XtraEditors.XtraForm
{
public string f_zyh = "";
public WardSelec(DataTable dt) {
InitializeComponent();
gridControl1.DataSource = dt;
this.gridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.GridView_KeyDown);
}
private void btn_add_Click(object sender, EventArgs e)
{
DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle);
f_zyh = dr["住院号"] + "";
this.Close();
this.DialogResult = System.Windows.Forms.DialogResult.OK;
}
private void GridView_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
btn_add_Click(sender,e);
}
}
}
}