AIMS/AIMS/OremrUserControl/PrescriptionDocument.cs
2023-02-19 14:06:27 +08:00

82 lines
2.7 KiB
C#

using AIMSBLL;
using AIMSExtension;
using AIMSModel;
using DCSoftDotfuscate;
using DrawGraph;
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
namespace AIMS.OperationAanesthesia
{
public partial class PrescriptionDocument : UserControl
{
public string type;
public Drugs Drug;
public OperationRecord _operationRecord;
public DataGridViewRow CurrentRow;
public int DrugCount;
public PrescriptionDocument(OperationRecord operationRecord, DataGridViewRow _CurrentRow)
{
InitializeComponent();
_operationRecord = operationRecord;
CurrentRow = _CurrentRow;
Drug = BDrugs.SelectSingle(int.Parse(CurrentRow.Cells[2].Tag.ToString()));
InitializeData();
}
/// <summary>
/// 赋值
/// </summary>
private void InitializeData()
{
labID.Text = _operationRecord.Id.ToString();
if (_operationRecord.PatientType == "门诊")
labMzh.Text = _operationRecord.InHospitalNo;
else
label8.Text = _operationRecord.MedicalHistoryNo;
labPatientName.Text = _operationRecord.Name;
string birth = _operationRecord.Age.ToString();
labAge.Text = birth;
labSex.Text = _operationRecord.Sex;
try
{
labPatientDesa.Text = DBManage.GetDictionaryValuesById(_operationRecord.Operation, "手术");
labDepartName.Text = _operationRecord.ApplyDepartmentName;
label19.Text = _operationRecord.Identity;
//uText5.Text = _operationRecord.Remark;// 地址
labDate.Text = DateTime.Now.ToString("yyyy年MM月dd日");
labDoctorName.Text = PublicMethod.OperatorName;
this.labDoctorOrderName.Text = Drug.Name;
this.utxtCount.Text = Drug.Stand;
this.uTextUse.Text = "术中";
this.labWay.Text = CurrentRow.Cells[5].EditedFormattedValue.ToString();
this.labSpecifications1.Text += Drug.DosageUnit.Trim();
}
catch (Exception ex)
{
PublicMethod.WriteLog(ex);
}
}
private void flowLayoutPanel1_Paint(object sender, PaintEventArgs e)
{
Pen pen = new Pen(Color.Black);
PointF rowPt1 = new PointF(310, 75);
PointF rowPt2 = new PointF(150, 150);
e.Graphics.DrawLine(pen, rowPt1, rowPt2);
}
private void labDate_DoubleClick(object sender, EventArgs e)
{
labDate.Text = DateTime.Now.ToString("yyyy年MM月dd日");
}
}
}