加注释与细节调整

dhzzyy
luoxingjian 6 months ago
parent 6e87226f0a
commit 7486ceee55
  1. 45
      PEIS/View/Exam/CareerHisInqForm.cs
  2. 3
      PEIS/View/Exam/EmploymentHisForm.cs

@ -10,16 +10,20 @@ using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading;
using System.Windows.Forms; using System.Windows.Forms;
namespace PEIS.View.Exam namespace PEIS.View.Exam
{ {
/// <summary>
/// 职业史问诊
/// </summary>
public partial class CareerHisInqForm : ViewBase, ICareerHisInqView public partial class CareerHisInqForm : ViewBase, ICareerHisInqView
{ {
private Int64 EID; private Int64 EID;
private Int64? ID; private Int64? ID;
/// <summary> /// <summary>
/// /// 职业史问诊
/// </summary> /// </summary>
/// <param name="pID">体检患者表id</param> /// <param name="pID">体检患者表id</param>
public CareerHisInqForm(Int64 eID) public CareerHisInqForm(Int64 eID)
@ -36,9 +40,12 @@ namespace PEIS.View.Exam
private void CareerHisInqForm_Shown(object sender, EventArgs e) private void CareerHisInqForm_Shown(object sender, EventArgs e)
{ {
LoadPatients(EID); ThreadPool.QueueUserWorkItem(state =>
LoadEmploymentHis(EID); {
LoadExamCareerHisInq(EID); LoadPatients(EID);
LoadEmploymentHis(EID);
LoadExamCareerHisInq(EID);
});
} }
private void ToolMenuItem_Add_Click(object sender, EventArgs e) private void ToolMenuItem_Add_Click(object sender, EventArgs e)
@ -85,18 +92,18 @@ namespace PEIS.View.Exam
{ {
if (patient!=null) if (patient!=null)
{ {
textBox1.Text = patient.ID.ToString(); Invoke(new Action(() => textBox1.Text = patient.ID.ToString()));
textBox2.Text= patient.ID.ToString(); Invoke(new Action(() => textBox2.Text= patient.ID.ToString()));
textBox3.Text = patient.Name; Invoke(new Action(() => textBox3.Text = patient.Name));
textBox4.Text = patient.Sex == "1" ? "男" : "女"; Invoke(new Action(() => textBox4.Text = patient.Sex == "1" ? "男" : "女"));
textBox5.Text = patient.Age.ToString(); Invoke(new Action(() => textBox5.Text = patient.Age.ToString()));
//textBox9.Text = patient. //Invoke(new Action(() =>textBox9.Text = patient)).
//textBox7.Text = patient.HazardFactors; //Invoke(new Action(() =>textBox7.Text = patient.HazardFactors));
//textBox8.Text= patient //Invoke(new Action(() =>textBox8.Text= patient))
//textBox9.Text= patient.JobTypes //Invoke(new Action(() =>textBox9.Text= patient.JobTypes))
//textBox10.Text = //Invoke(new Action(() =>textBox10.Text = ))
//textBox11.Text = patient.WorkYears //Invoke(new Action(() =>textBox11.Text = patient.WorkYears))
//textBox12.Text = //Invoke(new Action(() =>textBox12.Text = ))
} }
} }
@ -180,7 +187,7 @@ namespace PEIS.View.Exam
if (textbox != null) if (textbox != null)
{ {
var propert = properties.Where(p => p.Name == textbox.Name).FirstOrDefault(); var propert = properties.Where(p => p.Name == textbox.Name).FirstOrDefault();
if (propert!=null) textbox.Text = propert.GetValue(examCareerHis, null)?.ToString(); if (propert!=null) Invoke(new Action(()=>textbox.Text = propert.GetValue(examCareerHis, null)?.ToString()));
} }
if (panel != null) if (panel != null)
@ -196,8 +203,8 @@ namespace PEIS.View.Exam
{ {
var value = propert.GetValue(examCareerHis, null)?.ToString(); var value = propert.GetValue(examCareerHis, null)?.ToString();
var radioName = pName + "_" + value; var radioName = pName + "_" + value;
if (radioButName == radioName) radioButton.Checked = true; if (radioButName == radioName) Invoke(new Action(() => radioButton.Checked = true));
else radioButton.Checked = false; else Invoke(new Action(() => radioButton.Checked = false));
} }
} }
} }

@ -11,6 +11,9 @@ using System.Windows.Forms;
namespace PEIS.View.Exam namespace PEIS.View.Exam
{ {
/// <summary>
/// 职业史
/// </summary>
public partial class EmploymentHisForm : Form public partial class EmploymentHisForm : Form
{ {
private Int64 PID; private Int64 PID;

Loading…
Cancel
Save