protected override void OnMouseDoubleClick(MouseEventArgs e) { //base.OnMouseDoubleClick(e); DataInit.boolAgree = false; DataInit.isRightDoc = false; if (e.Button == MouseButtons.Left) { if (inpat.Id != 0) { string action_State = DataInit.GetActionState(inpat.Id.ToString()); if (action_State == "4" || action_State == "3") { tabControl_Patient = (this.Parent.Parent.Parent.Parent.Parent.Parent.Parent) as DevComponents.DotNetBar.TabControl; //验证TabControl是否有重复 if (tabControl_Patient != null) { for (int i = 0; i < tabControl_Patient.Tabs.Count; i++) { if (inpat.Id.ToString() == tabControl_Patient.Tabs[i].Name) { tabControl_Patient.SelectedTabIndex = i; return; } } } ucMain main = (this.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent) as ucMain; main.action_State = action_State; main.currentPatient = inpat; TabControlPanel tabctpnDoc = new TabControlPanel(); tabctpnDoc.AutoScroll = true; TabItem pageDoc = new TabItem(); pageDoc.Name = inpat.Id.ToString(); pageDoc.Text = inpat.Sick_Bed_Name + " " + inpat.Patient_Name; pageDoc.Click += new EventHandler(page_Click); pageDoc.Tag = inpat; ucDoctorOperater fm = new ucDoctorOperater(inpat); fm.Dock = DockStyle.Fill; tabctpnDoc.Controls.Add(fm); tabctpnDoc.Dock = DockStyle.Fill; pageDoc.AttachedControl = tabctpnDoc; tabControl_Patient.Controls.Add(tabctpnDoc); tabControl_Patient.Tabs.Add(pageDoc); tabControl_Patient.Refresh(); tabControl_Patient.SelectedTab = pageDoc; flag = true; } } else { App.Msg("该床是空床!"); } } }
private void UcInhospital_MouseDoubleClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { //if(App.UserAccount.CurrentSelectRole.Sickarea_Id!="") //{ if ((sender as UcInhospital).inpat.Id != 0) { if (DataInit.GetActionState(inpat.Id.ToString()) == "4" || DataInit.GetActionState(inpat.Id.ToString()) == "3") { ucMain main = (this.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent) as ucMain; App.UsControlStyle(main); //main.MdiParent = App.ParentForm; main.currentPatient = null; main.currentPatient = inpat; //if (main.tctlNormolOperate.Tabs[0].Text == "常用操作") //{ // main.tctlNormolOperate.SelectedTabIndex = 1; //} //else //{ // main.tctlNormolOperate.SelectedTabIndex = 0; //} flag = true; } } else { App.Msg("该床是空床!"); } //} } }
void UcInhospital_Paint(object sender, PaintEventArgs e) { //e.Graphics.DrawRectangle(pp, e.ClipRectangle.X, e.ClipRectangle.Y, // e.ClipRectangle.X + e.ClipRectangle.Width - 1, e.ClipRectangle.Y + e.ClipRectangle.Height - 1); //e.Graphics.DrawLines(pp2, new Point[]{ new Point(e.ClipRectangle.X + e.ClipRectangle.Width, e.ClipRectangle.Y), // new Point(e.ClipRectangle.X, e.ClipRectangle.Y), // new Point(e.ClipRectangle.X , e.ClipRectangle.Y+e.ClipRectangle.Height)}); //护理等级 string nurse_Name = DataInit.GetNurse_Leavel_Name(inpat.Nurse_Level); if (inpat.Id != 0) { if (inpat.Gender_Code.Equals("0")) { e.Graphics.DrawImage(global::Base_Function.Resource.card_man, new Point(4, 2)); } else { e.Graphics.DrawImage(global::Base_Function.Resource.card_woman, new Point(4, 2)); } if (inpat.State.Equals("1")) { e.Graphics.DrawString(inpat.Patient_Name + " " + inpat.Age.ToString() + inpat.Age_unit, new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Red, new PointF(4, 52)); } else { e.Graphics.DrawString(inpat.Patient_Name + " " + inpat.Age.ToString() + inpat.Age_unit, new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Blue, new PointF(4, 52)); } e.Graphics.DrawString("住 院 号:" + inpat.PId, new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Black, new PointF(4, 73)); e.Graphics.DrawString("住院日期:" + string.Format("{0:g}", inpat.In_Time), new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Black, new PointF(4, 94)); e.Graphics.DrawString("管床医生:" + inpat.Sick_Doctor_Name, new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Black, new PointF(4, 115)); e.Graphics.DrawString("入院诊断:" + inpat.Patient_Name, new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Black, new PointF(4, 136)); if (DataInit.GetActionState(inpat.Id.ToString()) == "3") { e.Graphics.DrawString(inpat.Sick_Bed_Name, new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Red, new PointF(75, 27)); } else { e.Graphics.DrawString(inpat.Sick_Bed_Name, new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Black, new PointF(75, 27)); } /* *护理等级 */ e.Graphics.DrawString(nurse_Name, new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Red, new PointF(170, 160)); } else { e.Graphics.DrawImage(global::Base_Function.Resource.unbed, new Point(4, 4)); //e.Graphics.DrawString(inpat.Patient_Name+" "+inpat.Age.ToString()+inpat.Age_unit, new Font("宋体", 9F, FontStyle.Regular, // GraphicsUnit.Point, ((byte)(134))), Brushes.Blue, new PointF(4, 52)); e.Graphics.DrawString("住 院 号:", new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Black, new PointF(4, 73)); e.Graphics.DrawString("住院日期:", new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Black, new PointF(4, 94)); e.Graphics.DrawString("管床医生:", new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Black, new PointF(4, 115)); e.Graphics.DrawString("入院诊断:", new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Black, new PointF(4, 136)); e.Graphics.DrawString(inpat.Sick_Bed_Name, new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), Brushes.Black, new PointF(75, 27)); ///* // *护理等级 // */ //e.Graphics.DrawString(nurse_Leavel, new Font("宋体", 9F, FontStyle.Regular, } }