职业史问诊页面调整,症状值可双击行调整或者直接调整并保存所有项目

dhzzyy
luoxingjian 6 months ago
parent 5f294ba85a
commit 597d33c131
  1. 5
      PEIS/Entity/ExamCareerHisInq.cs
  2. 27
      PEIS/Model/Exam/CareerHisInqModel.cs
  3. 188
      PEIS/View/Exam/CareerHisInqForm.Designer.cs
  4. 81
      PEIS/View/Exam/CareerHisInqForm.cs
  5. 3
      PEIS/View/Exam/CareerHisInqForm.resx
  6. 100
      PEIS/View/Exam/CareerHisInqStmForm.Designer.cs
  7. 97
      PEIS/View/Exam/CareerHisInqStmForm.cs

@ -145,5 +145,10 @@ namespace PEIS.Entity
/// </summary>
public string SMValue { get; set; }
/// <summary>
/// 顺序
/// </summary>
public int DispOrder { get; set; }
}
}

@ -26,13 +26,36 @@ namespace PEIS.Model.Exam
}
public List<BaseSymptom> GetBaseSymptom()
{
var list = DAOHelp.GetDataBySQL<BaseSymptom>($@"Select * From Dict_Symptom a where a.Enable=1 ");
var list = DAOHelp.GetDataBySQL<BaseSymptom>($@"Select * From Dict_Symptom a where a.Enable=1 ORDER BY a.DispOrder");
return list;
}
public List<ExamCareerHisInqSymptom> GetCareerHisInqSymptom(Int64 eID)
{
var list = DAOHelp.GetDataBySQL<ExamCareerHisInqSymptom>($@"Select * From Exam_CareerHisInqSymptom a where a.PID={eID} ");
var list = DAOHelp.GetDataBySQL<ExamCareerHisInqSymptom>($@"Select * From Exam_CareerHisInqSymptom a where a.PID={eID} ORDER BY a.DispOrder ");
return list;
}
public bool DelByPID(Int64 eID)
{
var list = DAOHelp.ExecuteSql($@"DELETE From Exam_CareerHisInqSymptom where PID={eID}");
return list>0?true:false ;
}
public bool BatSave(List<ExamCareerHisInqSymptom> inqSymptoms)
{
if (inqSymptoms == null || inqSymptoms.Count == 0) return false;
string strSql = "insert into Exam_CareerHisInqSymptom (PID,SID,SMName,SMValue,DispOrder) values";
for (int i = 0; i < inqSymptoms.Count; i++)
{
strSql += $@" ({inqSymptoms[i].PID},{inqSymptoms[i].SID},'{inqSymptoms[i].SMName}','{inqSymptoms[i].SMValue}',{inqSymptoms[i].DispOrder})";
if (i == inqSymptoms.Count - 1)
{
strSql += ";";
}
else {
strSql += ",";
}
}
var list = DAOHelp.ExecuteSql(strSql);
return list > 0 ? true : false;
}
}
}

@ -156,6 +156,7 @@
//
// panel1
//
this.panel1.AutoScroll = true;
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.textBox12);
this.panel1.Controls.Add(this.label12);
@ -183,12 +184,13 @@
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1126, 117);
this.panel1.Size = new System.Drawing.Size(1126, 85);
this.panel1.TabIndex = 0;
//
// textBox12
//
this.textBox12.Location = new System.Drawing.Point(779, 83);
this.textBox12.Enabled = false;
this.textBox12.Location = new System.Drawing.Point(779, 56);
this.textBox12.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.textBox12.Name = "textBox12";
this.textBox12.Size = new System.Drawing.Size(77, 23);
@ -197,7 +199,7 @@
// label12
//
this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.Location = new System.Drawing.Point(715, 81);
this.label12.Location = new System.Drawing.Point(715, 56);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(58, 24);
this.label12.TabIndex = 22;
@ -206,7 +208,8 @@
//
// textBox11
//
this.textBox11.Location = new System.Drawing.Point(600, 85);
this.textBox11.Enabled = false;
this.textBox11.Location = new System.Drawing.Point(600, 56);
this.textBox11.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.textBox11.Name = "textBox11";
this.textBox11.Size = new System.Drawing.Size(82, 23);
@ -215,7 +218,7 @@
// label11
//
this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.Location = new System.Drawing.Point(533, 84);
this.label11.Location = new System.Drawing.Point(533, 56);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(58, 24);
this.label11.TabIndex = 20;
@ -224,7 +227,8 @@
//
// textBox10
//
this.textBox10.Location = new System.Drawing.Point(336, 82);
this.textBox10.Enabled = false;
this.textBox10.Location = new System.Drawing.Point(336, 56);
this.textBox10.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.textBox10.Name = "textBox10";
this.textBox10.Size = new System.Drawing.Size(134, 23);
@ -233,7 +237,7 @@
// label10
//
this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.Location = new System.Drawing.Point(267, 81);
this.label10.Location = new System.Drawing.Point(267, 56);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(63, 24);
this.label10.TabIndex = 18;
@ -242,7 +246,8 @@
//
// textBox9
//
this.textBox9.Location = new System.Drawing.Point(107, 84);
this.textBox9.Enabled = false;
this.textBox9.Location = new System.Drawing.Point(107, 56);
this.textBox9.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.textBox9.Name = "textBox9";
this.textBox9.Size = new System.Drawing.Size(134, 23);
@ -251,7 +256,7 @@
// label9
//
this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.Location = new System.Drawing.Point(43, 84);
this.label9.Location = new System.Drawing.Point(43, 56);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(58, 24);
this.label9.TabIndex = 16;
@ -260,7 +265,8 @@
//
// textBox8
//
this.textBox8.Location = new System.Drawing.Point(779, 51);
this.textBox8.Enabled = false;
this.textBox8.Location = new System.Drawing.Point(779, 30);
this.textBox8.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(279, 23);
@ -269,7 +275,7 @@
// label8
//
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(715, 50);
this.label8.Location = new System.Drawing.Point(715, 30);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(58, 24);
this.label8.TabIndex = 14;
@ -278,7 +284,8 @@
//
// textBox7
//
this.textBox7.Location = new System.Drawing.Point(336, 51);
this.textBox7.Enabled = false;
this.textBox7.Location = new System.Drawing.Point(336, 30);
this.textBox7.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(341, 23);
@ -287,7 +294,7 @@
// label7
//
this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(272, 50);
this.label7.Location = new System.Drawing.Point(272, 30);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(58, 24);
this.label7.TabIndex = 12;
@ -296,7 +303,8 @@
//
// textBox6
//
this.textBox6.Location = new System.Drawing.Point(107, 53);
this.textBox6.Enabled = false;
this.textBox6.Location = new System.Drawing.Point(107, 30);
this.textBox6.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(134, 23);
@ -305,7 +313,7 @@
// label6
//
this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.Location = new System.Drawing.Point(43, 53);
this.label6.Location = new System.Drawing.Point(43, 30);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(58, 24);
this.label6.TabIndex = 10;
@ -314,7 +322,8 @@
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(779, 19);
this.textBox5.Enabled = false;
this.textBox5.Location = new System.Drawing.Point(779, 5);
this.textBox5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(77, 23);
@ -323,7 +332,7 @@
// label5
//
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.Location = new System.Drawing.Point(715, 20);
this.label5.Location = new System.Drawing.Point(715, 5);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(58, 24);
this.label5.TabIndex = 8;
@ -332,7 +341,8 @@
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(600, 19);
this.textBox4.Enabled = false;
this.textBox4.Location = new System.Drawing.Point(600, 5);
this.textBox4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(77, 23);
@ -341,7 +351,7 @@
// label4
//
this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.Location = new System.Drawing.Point(533, 19);
this.label4.Location = new System.Drawing.Point(533, 5);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(58, 24);
this.label4.TabIndex = 6;
@ -350,7 +360,8 @@
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(336, 20);
this.textBox3.Enabled = false;
this.textBox3.Location = new System.Drawing.Point(336, 5);
this.textBox3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(134, 23);
@ -359,7 +370,7 @@
// label3
//
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(272, 18);
this.label3.Location = new System.Drawing.Point(272, 5);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(58, 24);
this.label3.TabIndex = 4;
@ -368,7 +379,8 @@
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(107, 21);
this.textBox2.Enabled = false;
this.textBox2.Location = new System.Drawing.Point(107, 5);
this.textBox2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(134, 23);
@ -377,7 +389,7 @@
// label2
//
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(43, 20);
this.label2.Location = new System.Drawing.Point(43, 5);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(58, 24);
this.label2.TabIndex = 2;
@ -405,7 +417,7 @@
this.panelMain.Location = new System.Drawing.Point(0, 0);
this.panelMain.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panelMain.Name = "panelMain";
this.panelMain.Size = new System.Drawing.Size(1126, 892);
this.panelMain.Size = new System.Drawing.Size(1126, 706);
this.panelMain.TabIndex = 2;
//
// groupBox1
@ -472,18 +484,18 @@
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(0, 271);
this.groupBox1.Location = new System.Drawing.Point(0, 239);
this.groupBox1.Margin = new System.Windows.Forms.Padding(19, 4, 3, 4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(19, 4, 3, 4);
this.groupBox1.Size = new System.Drawing.Size(1126, 621);
this.groupBox1.Size = new System.Drawing.Size(1126, 467);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "问诊";
//
// btnSymptom
//
this.btnSymptom.Location = new System.Drawing.Point(975, 565);
this.btnSymptom.Location = new System.Drawing.Point(975, 433);
this.btnSymptom.Name = "btnSymptom";
this.btnSymptom.Size = new System.Drawing.Size(75, 26);
this.btnSymptom.TabIndex = 94;
@ -495,7 +507,7 @@
this.panelDrink.Controls.Add(this.DrinkState_1);
this.panelDrink.Controls.Add(this.DrinkState_2);
this.panelDrink.Controls.Add(this.DrinkState_3);
this.panelDrink.Location = new System.Drawing.Point(134, 425);
this.panelDrink.Location = new System.Drawing.Point(134, 325);
this.panelDrink.Name = "panelDrink";
this.panelDrink.Size = new System.Drawing.Size(220, 40);
this.panelDrink.TabIndex = 79;
@ -540,7 +552,7 @@
this.panelSmoke.Controls.Add(this.SmokeState_1);
this.panelSmoke.Controls.Add(this.SmokeState_2);
this.panelSmoke.Controls.Add(this.SmokeState_3);
this.panelSmoke.Location = new System.Drawing.Point(134, 384);
this.panelSmoke.Location = new System.Drawing.Point(134, 284);
this.panelSmoke.Name = "panelSmoke";
this.panelSmoke.Size = new System.Drawing.Size(220, 40);
this.panelSmoke.TabIndex = 73;
@ -582,7 +594,7 @@
//
// Symptom
//
this.Symptom.Location = new System.Drawing.Point(134, 567);
this.Symptom.Location = new System.Drawing.Point(134, 435);
this.Symptom.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Symptom.Name = "Symptom";
this.Symptom.Size = new System.Drawing.Size(840, 23);
@ -591,7 +603,7 @@
// label44
//
this.label44.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label44.Location = new System.Drawing.Point(22, 566);
this.label44.Location = new System.Drawing.Point(22, 435);
this.label44.Name = "label44";
this.label44.Size = new System.Drawing.Size(105, 24);
this.label44.TabIndex = 92;
@ -600,7 +612,7 @@
//
// Other
//
this.Other.Location = new System.Drawing.Point(134, 529);
this.Other.Location = new System.Drawing.Point(134, 405);
this.Other.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Other.Name = "Other";
this.Other.Size = new System.Drawing.Size(916, 23);
@ -609,7 +621,7 @@
// label43
//
this.label43.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label43.Location = new System.Drawing.Point(22, 529);
this.label43.Location = new System.Drawing.Point(22, 405);
this.label43.Name = "label43";
this.label43.Size = new System.Drawing.Size(105, 24);
this.label43.TabIndex = 90;
@ -618,7 +630,7 @@
//
// SleepCondition
//
this.SleepCondition.Location = new System.Drawing.Point(134, 488);
this.SleepCondition.Location = new System.Drawing.Point(134, 375);
this.SleepCondition.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.SleepCondition.Name = "SleepCondition";
this.SleepCondition.Size = new System.Drawing.Size(916, 23);
@ -628,7 +640,7 @@
// label42
//
this.label42.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label42.Location = new System.Drawing.Point(22, 487);
this.label42.Location = new System.Drawing.Point(22, 375);
this.label42.Name = "label42";
this.label42.Size = new System.Drawing.Size(105, 24);
this.label42.TabIndex = 88;
@ -638,7 +650,7 @@
// label41
//
this.label41.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label41.Location = new System.Drawing.Point(571, 433);
this.label41.Location = new System.Drawing.Point(571, 333);
this.label41.Name = "label41";
this.label41.Size = new System.Drawing.Size(20, 24);
this.label41.TabIndex = 87;
@ -647,7 +659,7 @@
//
// DrinkYears
//
this.DrinkYears.Location = new System.Drawing.Point(505, 433);
this.DrinkYears.Location = new System.Drawing.Point(505, 333);
this.DrinkYears.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.DrinkYears.Name = "DrinkYears";
this.DrinkYears.Size = new System.Drawing.Size(65, 23);
@ -656,7 +668,7 @@
// label40
//
this.label40.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label40.Location = new System.Drawing.Point(440, 433);
this.label40.Location = new System.Drawing.Point(440, 333);
this.label40.Name = "label40";
this.label40.Size = new System.Drawing.Size(70, 24);
this.label40.TabIndex = 85;
@ -665,7 +677,7 @@
//
// DrinkQuantity
//
this.DrinkQuantity.Location = new System.Drawing.Point(372, 433);
this.DrinkQuantity.Location = new System.Drawing.Point(372, 333);
this.DrinkQuantity.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.DrinkQuantity.Name = "DrinkQuantity";
this.DrinkQuantity.Size = new System.Drawing.Size(65, 23);
@ -674,7 +686,7 @@
// label39
//
this.label39.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label39.Location = new System.Drawing.Point(662, 390);
this.label39.Location = new System.Drawing.Point(662, 290);
this.label39.Name = "label39";
this.label39.Size = new System.Drawing.Size(20, 24);
this.label39.TabIndex = 78;
@ -683,7 +695,7 @@
//
// SmokeMonths
//
this.SmokeMonths.Location = new System.Drawing.Point(595, 392);
this.SmokeMonths.Location = new System.Drawing.Point(595, 292);
this.SmokeMonths.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.SmokeMonths.Name = "SmokeMonths";
this.SmokeMonths.Size = new System.Drawing.Size(65, 23);
@ -692,7 +704,7 @@
// label38
//
this.label38.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label38.Location = new System.Drawing.Point(571, 391);
this.label38.Location = new System.Drawing.Point(571, 291);
this.label38.Name = "label38";
this.label38.Size = new System.Drawing.Size(20, 24);
this.label38.TabIndex = 76;
@ -701,7 +713,7 @@
//
// SmokeYears
//
this.SmokeYears.Location = new System.Drawing.Point(505, 392);
this.SmokeYears.Location = new System.Drawing.Point(505, 292);
this.SmokeYears.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.SmokeYears.Name = "SmokeYears";
this.SmokeYears.Size = new System.Drawing.Size(65, 23);
@ -710,7 +722,7 @@
// label37
//
this.label37.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label37.Location = new System.Drawing.Point(440, 392);
this.label37.Location = new System.Drawing.Point(440, 292);
this.label37.Name = "label37";
this.label37.Size = new System.Drawing.Size(65, 24);
this.label37.TabIndex = 74;
@ -719,7 +731,7 @@
//
// SmokeQuantity
//
this.SmokeQuantity.Location = new System.Drawing.Point(372, 393);
this.SmokeQuantity.Location = new System.Drawing.Point(372, 293);
this.SmokeQuantity.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.SmokeQuantity.Name = "SmokeQuantity";
this.SmokeQuantity.Size = new System.Drawing.Size(65, 23);
@ -728,7 +740,7 @@
// label36
//
this.label36.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label36.Location = new System.Drawing.Point(22, 410);
this.label36.Location = new System.Drawing.Point(22, 310);
this.label36.Name = "label36";
this.label36.Size = new System.Drawing.Size(105, 24);
this.label36.TabIndex = 66;
@ -737,7 +749,7 @@
//
// PrematureDelivery
//
this.PrematureDelivery.Location = new System.Drawing.Point(470, 339);
this.PrematureDelivery.Location = new System.Drawing.Point(470, 259);
this.PrematureDelivery.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.PrematureDelivery.Name = "PrematureDelivery";
this.PrematureDelivery.Size = new System.Drawing.Size(65, 23);
@ -746,7 +758,7 @@
// label35
//
this.label35.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label35.Location = new System.Drawing.Point(410, 340);
this.label35.Location = new System.Drawing.Point(410, 260);
this.label35.Name = "label35";
this.label35.Size = new System.Drawing.Size(60, 24);
this.label35.TabIndex = 64;
@ -756,7 +768,7 @@
// label34
//
this.label34.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label34.Location = new System.Drawing.Point(810, 340);
this.label34.Location = new System.Drawing.Point(810, 260);
this.label34.Name = "label34";
this.label34.Size = new System.Drawing.Size(20, 24);
this.label34.TabIndex = 63;
@ -765,7 +777,7 @@
//
// AbnormalFetus
//
this.AbnormalFetus.Location = new System.Drawing.Point(740, 339);
this.AbnormalFetus.Location = new System.Drawing.Point(740, 259);
this.AbnormalFetus.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.AbnormalFetus.Name = "AbnormalFetus";
this.AbnormalFetus.Size = new System.Drawing.Size(65, 23);
@ -774,7 +786,7 @@
// label33
//
this.label33.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label33.Location = new System.Drawing.Point(670, 340);
this.label33.Location = new System.Drawing.Point(670, 260);
this.label33.Name = "label33";
this.label33.Size = new System.Drawing.Size(70, 24);
this.label33.TabIndex = 61;
@ -783,7 +795,7 @@
//
// Stillbirth
//
this.Stillbirth.Location = new System.Drawing.Point(600, 339);
this.Stillbirth.Location = new System.Drawing.Point(600, 259);
this.Stillbirth.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Stillbirth.Name = "Stillbirth";
this.Stillbirth.Size = new System.Drawing.Size(65, 23);
@ -792,7 +804,7 @@
// label32
//
this.label32.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label32.Location = new System.Drawing.Point(540, 340);
this.label32.Location = new System.Drawing.Point(540, 260);
this.label32.Name = "label32";
this.label32.Size = new System.Drawing.Size(60, 24);
this.label32.TabIndex = 59;
@ -801,7 +813,7 @@
//
// Abortion
//
this.Abortion.Location = new System.Drawing.Point(340, 339);
this.Abortion.Location = new System.Drawing.Point(340, 259);
this.Abortion.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Abortion.Name = "Abortion";
this.Abortion.Size = new System.Drawing.Size(65, 23);
@ -810,7 +822,7 @@
// label31
//
this.label31.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label31.Location = new System.Drawing.Point(282, 340);
this.label31.Location = new System.Drawing.Point(282, 260);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(60, 24);
this.label31.TabIndex = 57;
@ -819,7 +831,7 @@
//
// ExistingChildren
//
this.ExistingChildren.Location = new System.Drawing.Point(215, 339);
this.ExistingChildren.Location = new System.Drawing.Point(215, 259);
this.ExistingChildren.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.ExistingChildren.Name = "ExistingChildren";
this.ExistingChildren.Size = new System.Drawing.Size(65, 23);
@ -828,7 +840,7 @@
// label30
//
this.label30.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label30.Location = new System.Drawing.Point(134, 340);
this.label30.Location = new System.Drawing.Point(134, 260);
this.label30.Name = "label30";
this.label30.Size = new System.Drawing.Size(82, 24);
this.label30.TabIndex = 55;
@ -838,7 +850,7 @@
// label29
//
this.label29.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label29.Location = new System.Drawing.Point(22, 343);
this.label29.Location = new System.Drawing.Point(22, 259);
this.label29.Name = "label29";
this.label29.Size = new System.Drawing.Size(105, 24);
this.label29.TabIndex = 54;
@ -848,7 +860,7 @@
// label28
//
this.label28.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label28.Location = new System.Drawing.Point(845, 290);
this.label28.Location = new System.Drawing.Point(845, 215);
this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(26, 24);
this.label28.TabIndex = 53;
@ -857,7 +869,7 @@
//
// LastMenstrualPod
//
this.LastMenstrualPod.Location = new System.Drawing.Point(684, 290);
this.LastMenstrualPod.Location = new System.Drawing.Point(684, 215);
this.LastMenstrualPod.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.LastMenstrualPod.Name = "LastMenstrualPod";
this.LastMenstrualPod.Size = new System.Drawing.Size(160, 23);
@ -866,7 +878,7 @@
// label27
//
this.label27.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label27.Location = new System.Drawing.Point(548, 290);
this.label27.Location = new System.Drawing.Point(548, 215);
this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(146, 24);
this.label27.TabIndex = 51;
@ -876,7 +888,7 @@
// label26
//
this.label26.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label26.Location = new System.Drawing.Point(498, 302);
this.label26.Location = new System.Drawing.Point(498, 225);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(26, 24);
this.label26.TabIndex = 50;
@ -885,7 +897,7 @@
//
// MenarcheCycle
//
this.MenarcheCycle.Location = new System.Drawing.Point(432, 300);
this.MenarcheCycle.Location = new System.Drawing.Point(432, 225);
this.MenarcheCycle.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MenarcheCycle.Name = "MenarcheCycle";
this.MenarcheCycle.Size = new System.Drawing.Size(65, 23);
@ -894,7 +906,7 @@
// label25
//
this.label25.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label25.Location = new System.Drawing.Point(382, 302);
this.label25.Location = new System.Drawing.Point(382, 225);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(51, 24);
this.label25.TabIndex = 48;
@ -904,7 +916,7 @@
// label24
//
this.label24.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label24.Location = new System.Drawing.Point(498, 270);
this.label24.Location = new System.Drawing.Point(498, 195);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(26, 24);
this.label24.TabIndex = 47;
@ -913,7 +925,7 @@
//
// MenarchePeriod
//
this.MenarchePeriod.Location = new System.Drawing.Point(432, 268);
this.MenarchePeriod.Location = new System.Drawing.Point(432, 195);
this.MenarchePeriod.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MenarchePeriod.Name = "MenarchePeriod";
this.MenarchePeriod.Size = new System.Drawing.Size(65, 23);
@ -922,7 +934,7 @@
// label23
//
this.label23.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label23.Location = new System.Drawing.Point(382, 270);
this.label23.Location = new System.Drawing.Point(382, 195);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(51, 24);
this.label23.TabIndex = 45;
@ -931,7 +943,7 @@
//
// Menarche
//
this.Menarche.Location = new System.Drawing.Point(173, 290);
this.Menarche.Location = new System.Drawing.Point(173, 215);
this.Menarche.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Menarche.Name = "Menarche";
this.Menarche.Size = new System.Drawing.Size(160, 23);
@ -940,7 +952,7 @@
// label22
//
this.label22.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label22.Location = new System.Drawing.Point(134, 290);
this.label22.Location = new System.Drawing.Point(134, 215);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(45, 24);
this.label22.TabIndex = 43;
@ -950,7 +962,7 @@
// label21
//
this.label21.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label21.Location = new System.Drawing.Point(22, 290);
this.label21.Location = new System.Drawing.Point(22, 215);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(105, 24);
this.label21.TabIndex = 42;
@ -959,7 +971,7 @@
//
// SpouseOctionhealth
//
this.SpouseOctionhealth.Location = new System.Drawing.Point(280, 229);
this.SpouseOctionhealth.Location = new System.Drawing.Point(280, 165);
this.SpouseOctionhealth.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.SpouseOctionhealth.Name = "SpouseOctionhealth";
this.SpouseOctionhealth.Size = new System.Drawing.Size(770, 23);
@ -968,7 +980,7 @@
// label20
//
this.label20.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label20.Location = new System.Drawing.Point(134, 229);
this.label20.Location = new System.Drawing.Point(134, 165);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(149, 24);
this.label20.TabIndex = 40;
@ -977,7 +989,7 @@
//
// SpouseRadiationHis
//
this.SpouseRadiationHis.Location = new System.Drawing.Point(573, 188);
this.SpouseRadiationHis.Location = new System.Drawing.Point(573, 135);
this.SpouseRadiationHis.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.SpouseRadiationHis.Name = "SpouseRadiationHis";
this.SpouseRadiationHis.Size = new System.Drawing.Size(478, 23);
@ -986,7 +998,7 @@
// label19
//
this.label19.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label19.Location = new System.Drawing.Point(449, 188);
this.label19.Location = new System.Drawing.Point(449, 135);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(117, 24);
this.label19.TabIndex = 38;
@ -995,7 +1007,7 @@
//
// MarriageDate
//
this.MarriageDate.Location = new System.Drawing.Point(215, 188);
this.MarriageDate.Location = new System.Drawing.Point(215, 135);
this.MarriageDate.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MarriageDate.Name = "MarriageDate";
this.MarriageDate.Size = new System.Drawing.Size(160, 23);
@ -1004,7 +1016,7 @@
// label18
//
this.label18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label18.Location = new System.Drawing.Point(134, 192);
this.label18.Location = new System.Drawing.Point(134, 135);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(82, 24);
this.label18.TabIndex = 36;
@ -1014,7 +1026,7 @@
// label17
//
this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label17.Location = new System.Drawing.Point(22, 214);
this.label17.Location = new System.Drawing.Point(22, 150);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(105, 24);
this.label17.TabIndex = 35;
@ -1023,7 +1035,7 @@
//
// SurgicalHistory
//
this.SurgicalHistory.Location = new System.Drawing.Point(134, 144);
this.SurgicalHistory.Location = new System.Drawing.Point(134, 105);
this.SurgicalHistory.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.SurgicalHistory.Name = "SurgicalHistory";
this.SurgicalHistory.Size = new System.Drawing.Size(916, 23);
@ -1033,7 +1045,7 @@
// label16
//
this.label16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label16.Location = new System.Drawing.Point(22, 144);
this.label16.Location = new System.Drawing.Point(22, 105);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(105, 24);
this.label16.TabIndex = 32;
@ -1042,7 +1054,7 @@
//
// FamilyHistory
//
this.FamilyHistory.Location = new System.Drawing.Point(134, 108);
this.FamilyHistory.Location = new System.Drawing.Point(134, 75);
this.FamilyHistory.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.FamilyHistory.Name = "FamilyHistory";
this.FamilyHistory.Size = new System.Drawing.Size(916, 23);
@ -1052,7 +1064,7 @@
// label15
//
this.label15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label15.Location = new System.Drawing.Point(22, 105);
this.label15.Location = new System.Drawing.Point(22, 72);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(105, 24);
this.label15.TabIndex = 29;
@ -1061,7 +1073,7 @@
//
// PreHisIllness
//
this.PreHisIllness.Location = new System.Drawing.Point(134, 72);
this.PreHisIllness.Location = new System.Drawing.Point(134, 45);
this.PreHisIllness.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.PreHisIllness.Name = "PreHisIllness";
this.PreHisIllness.Size = new System.Drawing.Size(916, 23);
@ -1071,7 +1083,7 @@
// label14
//
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.Location = new System.Drawing.Point(23, 72);
this.label14.Location = new System.Drawing.Point(23, 45);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(105, 24);
this.label14.TabIndex = 26;
@ -1080,7 +1092,7 @@
//
// PastHistory
//
this.PastHistory.Location = new System.Drawing.Point(134, 38);
this.PastHistory.Location = new System.Drawing.Point(134, 16);
this.PastHistory.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.PastHistory.Name = "PastHistory";
this.PastHistory.Size = new System.Drawing.Size(916, 23);
@ -1090,7 +1102,7 @@
// label13
//
this.label13.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label13.Location = new System.Drawing.Point(22, 36);
this.label13.Location = new System.Drawing.Point(22, 16);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(105, 24);
this.label13.TabIndex = 1;
@ -1102,7 +1114,7 @@
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Top;
this.tabControl1.Location = new System.Drawing.Point(0, 117);
this.tabControl1.Location = new System.Drawing.Point(0, 85);
this.tabControl1.Margin = new System.Windows.Forms.Padding(7, 4, 3, 4);
this.tabControl1.Name = "tabControl1";
this.tabControl1.Padding = new System.Drawing.Point(16, 3);
@ -1304,7 +1316,7 @@
this.panelButtom.Controls.Add(this.CancelBtn);
this.panelButtom.Controls.Add(this.ConfirmBtn);
this.panelButtom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panelButtom.Location = new System.Drawing.Point(0, 892);
this.panelButtom.Location = new System.Drawing.Point(0, 706);
this.panelButtom.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panelButtom.Name = "panelButtom";
this.panelButtom.Size = new System.Drawing.Size(1126, 43);
@ -1363,7 +1375,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1126, 935);
this.ClientSize = new System.Drawing.Size(1126, 749);
this.Controls.Add(this.panelMain);
this.Controls.Add(this.panelButtom);
this.Controls.Add(this.advPropertyGrid1);

@ -51,12 +51,29 @@ namespace PEIS.View.Exam
public void ShowBaseSymptom(List<BaseSymptom> symptom)
{
Symptoms = symptom==null?new List<BaseSymptom>(): symptom;
}
//职业史问诊患者症状记录
public event EventHandler<Args<ExamCareerHisInqSymptom>> GetCareerHisInqSymptom;
public void ShowCareerHisInqSymptom(List<ExamCareerHisInqSymptom> hisInqSymptoms)
{
AlreadyCareerHisInqSymptom = hisInqSymptoms==null?new List<ExamCareerHisInqSymptom>(): hisInqSymptoms;
if (AlreadyCareerHisInqSymptom.Count==0)
{
//无论有没有选择症状都需要将所有的保存一遍
CareerHisInqSymptom = new List<ExamCareerHisInqSymptom>();
foreach (var item in Symptoms)
{
var symptomItem = new ExamCareerHisInqSymptom();
symptomItem.PID = EID;
symptomItem.SID = item.ID;
symptomItem.SMName = item.Name;
symptomItem.SMValue = item.Value;
symptomItem.DispOrder = item.DispOrder;
CareerHisInqSymptom.Add(symptomItem);
}
isSymptomChage = true;
}
}
public void LoadBaseSymptom()
{
@ -66,40 +83,44 @@ namespace PEIS.View.Exam
private void BtnSymptom_Click(object sender, EventArgs e)
{
CareerHisInqStmForm careerHisInqStm = new CareerHisInqStmForm();
careerHisInqStm.symptoms = Symptoms;
var alreadySymptomSID= AlreadyCareerHisInqSymptom.Select(o => o.SID).ToList();
var alreadySymptom= Symptoms.Where(p => alreadySymptomSID.Contains(p.ID)).ToList();
if (alreadySymptom.Count > 0) { careerHisInqStm.selectedItems = alreadySymptom; }
else{
var symptomSID = CareerHisInqSymptom.Select(o => o.SID).ToList();
var symptom = Symptoms.Where(p => symptomSID.Contains(p.ID)).ToList();
careerHisInqStm.selectedItems = symptom;
}
var alreadySymptom = AlreadyCareerHisInqSymptom.Select(p => new BaseSymptom
{
ID = p.SID,
Name = p.SMName,
Value = "-",
DispOrder = p.DispOrder,
}).ToList();
Symptoms.ForEach(item => item.Value = "-");
careerHisInqStm.symptoms = alreadySymptom.Count == 0 ? Symptoms : alreadySymptom;
var dialogResult=careerHisInqStm.ShowDialog();
if (dialogResult==DialogResult.OK)
{
CareerHisInqSymptom = new List<ExamCareerHisInqSymptom>();
foreach (var item in careerHisInqStm.selectedItems)
foreach (var item in careerHisInqStm.saveItems)
{
var symptomItem = new ExamCareerHisInqSymptom();
symptomItem.PID = EID;
symptomItem.SID = item.ID;
symptomItem.SMName = item.Name;
symptomItem.SMValue = item.Value;
symptomItem.DispOrder = item.DispOrder;
CareerHisInqSymptom.Add(symptomItem);
}
if (CareerHisInqSymptom.Count == 0)
{
Invoke(new Action(() =>
Invoke(new Action(() =>
{
Symptom.Text = null;
var changeItem = careerHisInqStm.saveItems.Where(p => p.Value != "-").ToList();
if (changeItem!=null &&changeItem.Count() > 0)
{
foreach (var item in changeItem)
{
Symptom.Text += item.Name+ item.Value+" " ;
}
}
else {
Symptom.Text = "无";
}
}));
}
else {
var b = CareerHisInqSymptom.Select(p => p.SMName).ToList();
Symptom.Text = string.Join("、", b);
}
isSymptomChage = true;
}
}
@ -144,10 +165,10 @@ namespace PEIS.View.Exam
}));
ThreadPool.QueueUserWorkItem(state =>
{
LoadBaseSymptom();
LoadPatients(EID);
LoadEmploymentHis(EID);
LoadExamCareerHisInq(EID);
LoadBaseSymptom();
});
}
@ -299,17 +320,21 @@ namespace PEIS.View.Exam
}
if (isSymptomChage)
{
Model.Exam.CareerHisInqModel hisInqModel = new Model.Exam.CareerHisInqModel();
if (AlreadyCareerHisInqSymptom.Count > 0)
{
foreach (var item in AlreadyCareerHisInqSymptom)
{
item.Delete();
}
}
foreach (var item in CareerHisInqSymptom)
{
item.Save();
hisInqModel.DelByPID(EID);
//foreach (var item in AlreadyCareerHisInqSymptom)
//{
// item.Delete();
//}
}
hisInqModel.BatSave(CareerHisInqSymptom);
//foreach (var item in CareerHisInqSymptom)
//{
// item.Save();
//}
isSymptomChage = false;
}
Close();

@ -120,6 +120,9 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>175, 17</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>175, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="CancelBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

@ -32,34 +32,38 @@ namespace PEIS.View.Exam
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CareerHisInqStmForm));
this.gridControl1 = new DevExpress.XtraGrid.GridControl();
this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
this.check = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemCheckEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
this.ID = new DevExpress.XtraGrid.Columns.GridColumn();
this.Name1 = new DevExpress.XtraGrid.Columns.GridColumn();
this.Value = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemCheckEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
this.repositoryItemCheckedComboBoxEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemCheckedComboBoxEdit();
this.panel2 = new System.Windows.Forms.Panel();
this.CancelBtn = new System.Windows.Forms.Button();
this.ConfirmBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemCheckEdit1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemCheckedComboBoxEdit1)).BeginInit();
this.panel2.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// gridControl1
//
this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridControl1.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.gridControl1.Location = new System.Drawing.Point(0, 0);
this.gridControl1.Location = new System.Drawing.Point(0, 35);
this.gridControl1.MainView = this.gridView1;
this.gridControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.gridControl1.Name = "gridControl1";
this.gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.repositoryItemCheckEdit1,
this.repositoryItemCheckedComboBoxEdit1});
this.gridControl1.Size = new System.Drawing.Size(558, 312);
this.gridControl1.Size = new System.Drawing.Size(558, 390);
this.gridControl1.TabIndex = 0;
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
@ -67,43 +71,17 @@ namespace PEIS.View.Exam
// gridView1
//
this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.check,
this.ID,
this.Name1,
this.Value});
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";
this.gridView1.OptionsSelection.MultiSelect = true;
this.gridView1.OptionsSelection.ShowCheckBoxSelectorInColumnHeader = DevExpress.Utils.DefaultBoolean.False;
this.gridView1.OptionsSelection.ShowCheckBoxSelectorInGroupRow = DevExpress.Utils.DefaultBoolean.False;
this.gridView1.OptionsSelection.ShowCheckBoxSelectorInPrintExport = DevExpress.Utils.DefaultBoolean.False;
this.gridView1.OptionsView.ShowGroupPanel = false;
this.gridView1.OptionsView.ShowIndicator = false;
//
// check
//
this.check.AppearanceCell.Options.UseTextOptions = true;
this.check.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.check.AppearanceCell.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.check.AppearanceHeader.Options.UseTextOptions = true;
this.check.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.check.AppearanceHeader.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.check.Caption = "选择";
this.check.ColumnEdit = this.repositoryItemCheckEdit1;
this.check.FieldName = "check";
this.check.Name = "check";
this.check.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
this.check.OptionsFilter.AllowAutoFilter = false;
this.check.OptionsFilter.AllowFilter = false;
this.check.Visible = true;
this.check.VisibleIndex = 0;
this.check.Width = 60;
//
// repositoryItemCheckEdit1
//
this.repositoryItemCheckEdit1.AutoHeight = false;
this.repositoryItemCheckEdit1.Name = "repositoryItemCheckEdit1";
//
// ID
//
this.ID.Caption = "主键";
@ -117,7 +95,7 @@ namespace PEIS.View.Exam
//
// Name1
//
this.Name1.Caption = "名字";
this.Name1.Caption = "项目";
this.Name1.FieldName = "Name";
this.Name1.Name = "Name1";
this.Name1.OptionsColumn.AllowEdit = false;
@ -126,7 +104,7 @@ namespace PEIS.View.Exam
this.Name1.OptionsFilter.AllowAutoFilter = false;
this.Name1.OptionsFilter.AllowFilter = false;
this.Name1.Visible = true;
this.Name1.VisibleIndex = 1;
this.Name1.VisibleIndex = 0;
this.Name1.Width = 372;
//
// Value
@ -134,15 +112,18 @@ namespace PEIS.View.Exam
this.Value.Caption = "值";
this.Value.FieldName = "Value";
this.Value.Name = "Value";
this.Value.OptionsColumn.AllowEdit = false;
this.Value.OptionsColumn.AllowFocus = false;
this.Value.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
this.Value.OptionsFilter.AllowAutoFilter = false;
this.Value.OptionsFilter.AllowFilter = false;
this.Value.Visible = true;
this.Value.VisibleIndex = 2;
this.Value.VisibleIndex = 1;
this.Value.Width = 373;
//
// repositoryItemCheckEdit1
//
this.repositoryItemCheckEdit1.AutoHeight = false;
this.repositoryItemCheckEdit1.Name = "repositoryItemCheckEdit1";
//
// repositoryItemCheckedComboBoxEdit1
//
this.repositoryItemCheckedComboBoxEdit1.AutoHeight = false;
@ -156,7 +137,7 @@ namespace PEIS.View.Exam
this.panel2.Controls.Add(this.CancelBtn);
this.panel2.Controls.Add(this.ConfirmBtn);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel2.Location = new System.Drawing.Point(0, 312);
this.panel2.Location = new System.Drawing.Point(0, 425);
this.panel2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(558, 38);
@ -188,13 +169,51 @@ namespace PEIS.View.Exam
this.ConfirmBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.ConfirmBtn.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.Location = new System.Drawing.Point(3, 7);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(57, 22);
this.label1.TabIndex = 12;
this.label1.Text = "模糊查询";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// panel1
//
this.panel1.Controls.Add(this.textBox1);
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(558, 35);
this.panel1.TabIndex = 13;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(67, 7);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(131, 23);
this.textBox1.TabIndex = 13;
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.label2.Location = new System.Drawing.Point(0, 403);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(558, 22);
this.label2.TabIndex = 14;
this.label2.Text = "有上述症状用“± + ++ +++“表示,无症状用”-“表示 双击相应项目可以切换";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// CareerHisInqStmForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(558, 350);
this.ClientSize = new System.Drawing.Size(558, 463);
this.Controls.Add(this.label2);
this.Controls.Add(this.gridControl1);
this.Controls.Add(this.panel1);
this.Controls.Add(this.panel2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
@ -206,6 +225,8 @@ namespace PEIS.View.Exam
((System.ComponentModel.ISupportInitialize)(this.repositoryItemCheckEdit1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemCheckedComboBoxEdit1)).EndInit();
this.panel2.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
@ -220,8 +241,11 @@ namespace PEIS.View.Exam
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button CancelBtn;
private System.Windows.Forms.Button ConfirmBtn;
private DevExpress.XtraGrid.Columns.GridColumn check;
private DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit repositoryItemCheckEdit1;
private DevExpress.XtraEditors.Repository.RepositoryItemCheckedComboBoxEdit repositoryItemCheckedComboBoxEdit1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label2;
}
}

@ -1,4 +1,5 @@
using PEIS.Base;
using DevExpress.XtraGrid.Views.Grid;
using PEIS.Base;
using PEIS.Entity;
using System;
using System.Collections.Generic;
@ -18,18 +19,72 @@ namespace PEIS.View.Exam
public partial class CareerHisInqStmForm : ViewBase
{
public List<BaseSymptom> symptoms = new List<BaseSymptom>();
public List<BaseSymptom> selectedItems = new List<BaseSymptom>();
public List<BaseSymptom> saveItems = new List<BaseSymptom>();
public CareerHisInqStmForm()
{
InitializeComponent();
CancelBtn.Click += CancelBtn_Click;
ConfirmBtn.Click += ConfirmBtn_Click;
gridView1.RowCellStyle += GridView1_RowCellStyle;
gridView1.DoubleClick += GridView1_DoubleClick;
textBox1.TextChanged += TextBox1_TextChanged;
Shown += CareerHisInqStmForm_Shown;
}
private BaseSymptom dCCurrbaseSymptom;
private List<string> valueList = new List<string> { "-", "±", "+", "++", "+++" };
private int indexCurr = 0;
private void GridView1_DoubleClick(object sender, EventArgs e)
{
int currentIndex = gridView1.FocusedRowHandle;
var currentRow = gridView1.GetRow(currentIndex) as BaseSymptom;
if (currentRow!=null)
{
if (dCCurrbaseSymptom==null|| dCCurrbaseSymptom.ID!=currentRow.ID)
{
indexCurr = 1;
dCCurrbaseSymptom = currentRow;
}
var data = gridControl1.DataSource as List<BaseSymptom>;
if (data != null && data.Count > currentIndex)
{
var indexcrt=data.IndexOf(currentRow);
data[indexcrt].Value = valueList[indexCurr];
gridView1.RefreshData();
if (indexCurr < valueList.Count-1) indexCurr++;
else indexCurr = 0;
}
}
}
private void TextBox1_TextChanged(object sender, EventArgs e)
{
var textValue = (sender as System.Windows.Forms.TextBox).Text;
if (!string.IsNullOrEmpty(textValue))
{
gridView1.ApplyFindFilter(textValue);
}
else
{
gridView1.ApplyFindFilter("");
}
}
private void GridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e)
{
RowCellStyleEventArgs de = e as RowCellStyleEventArgs;
var currentRow = (BaseSymptom)gridView1.GetRow(de.RowHandle);
if (currentRow!=null&&e.Column.FieldName== "Value"&&!currentRow.Value.Equals("-"))
{
e.Appearance.BackColor = Color.Red;
}
}
private void ConfirmBtn_Click(object sender, EventArgs e)
{
GetSelectedItems();
DialogResult = DialogResult.OK;
Close();
}
@ -41,42 +96,20 @@ namespace PEIS.View.Exam
private void CareerHisInqStmForm_Shown(object sender, EventArgs e)
{
List<BaseSymptomInfo> baseSymptom = new List<BaseSymptomInfo>();
foreach (var item in symptoms)
if (symptoms.Count>0)
{
BaseSymptomInfo symptomInfo = new BaseSymptomInfo();
symptomInfo.ID = item.ID;
symptomInfo.Name = item.Name;
symptomInfo.Value = item.Value;
symptomInfo.DispOrder = item.DispOrder;
symptomInfo.Enable = item.Enable;
var selected=selectedItems.Where(p => p.ID == item.ID).FirstOrDefault();
symptomInfo.check = selected == null ? false : true;
baseSymptom.Add(symptomInfo);
Invoke(new Action(() => gridControl1.DataSource = null));
Invoke(new Action(() => gridControl1.DataSource = symptoms));
}
Invoke(new Action(() => gridControl1.DataSource = null));
Invoke(new Action(() => gridControl1.DataSource = baseSymptom));
}
private void GetSelectedItems()
{
selectedItems = new List<BaseSymptom>();
var dataSource = gridControl1.DataSource as List<BaseSymptomInfo>;
var selectedList = dataSource.Where(p => p.check == true).ToList();
foreach (var item in selectedList)
{
BaseSymptom symptom = new BaseSymptom();
symptom.ID = item.ID;
symptom.Name = item.Name;
symptom.Value = item.Value;
symptom.DispOrder = item.DispOrder;
symptom.Enable = item.Enable;
selectedItems.Add(symptom);
}
}
public class BaseSymptomInfo : BaseSymptom
{
public bool check { get; set; } = false;
gridView1.CloseEditor();
gridView1.UpdateCurrentRow();
var dataSource = gridControl1.DataSource as List<BaseSymptom>;
saveItems = dataSource;
}
protected override object CreatePresenter()
{
return null;

Loading…
Cancel
Save