2022-08-23 21:12:59 +08:00

65 lines
1.9 KiB
C#

using DrawGraph;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace AIMS.OperationDoing.AnasRecordBill.UI
{
public partial class frmSeleteRoom : Form
{
public string RoomId;
public string NowRoomId;
public frmSeleteRoom()
{
InitializeComponent();
}
private void frmDeletePhysio_Load(object sender, EventArgs e)
{
List<DataDictionary.Model.OperationRoom> rooms = DataDictionary.BLL.OperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'");
panel1.Controls.Clear();
int rows = 0;
//循环加载CheckBox控件
foreach (DataDictionary.Model.OperationRoom ade in rooms )
{
if (NowRoomId!=null && ade.Id.ToString() == NowRoomId) continue;
RadioButton cb = new RadioButton ();
cb.Tag = ade;
cb.Text = ade.Name;
cb.Font = new System.Drawing.Font("微软雅黑", 10.5f);
cb.Width = 100;
cb.Tag = ade;
cb.CheckedChanged += new EventHandler(cb_CheckedChanged);
cb.Location = new Point(10, rows * (cb.Height + 5));
panel1.Controls.Add(cb);
rows++;
}
}
void cb_CheckedChanged(object sender, EventArgs e)
{
//判断CheckBox被选中时
if (((RadioButton)sender).Checked)
{
RoomId = (((RadioButton)sender).Tag as DataDictionary.Model.OperationRoom).Id.ToString();
}
}
private void btnSave_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnDelete_Click(object sender, EventArgs e)
{
this.Close();
}
}
}