76 lines
2.3 KiB
C#
76 lines
2.3 KiB
C#
using AIMSBLL;
|
|
using AIMSModel;
|
|
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.OperationAanesthesia
|
|
{
|
|
public partial class frmSeleteRoom : Form
|
|
{
|
|
public string RoomId;
|
|
public string RoomName;
|
|
public string NowRoomId;
|
|
|
|
public string RoomSite;
|
|
public frmSeleteRoom()
|
|
{
|
|
InitializeComponent();
|
|
panel1.Height = ControlExtension.SiteRooms.Count * 30 + 30;
|
|
this.Height = ControlExtension.SiteRooms.Count * 30 + 100;
|
|
}
|
|
|
|
private void frmDeletePhysio_Load(object sender, EventArgs e)
|
|
{
|
|
//ControlExtension.GetOperationSite(labelSite, CboOperationSite);
|
|
|
|
panel1.Controls.Clear();
|
|
int rows = 0;
|
|
//循环加载CheckBox控件
|
|
foreach (OperationRoom ade in ControlExtension.SiteRooms)
|
|
{
|
|
if (ade.Id == -1) continue;
|
|
if (NowRoomId != null && ade.Id.ToString() == NowRoomId) continue;
|
|
if (RoomSite != null && ade.Site != RoomSite) 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 OperationRoom).Id.ToString();
|
|
RoomName = (((RadioButton)sender).Tag as OperationRoom).Name.ToString();
|
|
}
|
|
}
|
|
|
|
private void btnSave_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
|
|
private void btnDelete_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|