⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 searchprintdoc.cs

📁 不错的一个做的医院管理系统源码
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Printing;
using Youzi.Model;

namespace Youzi.GuaHaoView
{
    public class SearchPrintDoc : PrintDocument
    {
        Font font = null;
        private string RegisterID;        //门诊号
        private string PatientName;     //病人姓名
        private string CureType;        //诊疗类型
        private string OfficeName;      //就诊科室
        private string CureCost;        //诊疗费
        private string DoctorName;       //医师姓名
        private string RegisterTypeName;  //挂号类型
        private string RegisterCost;      //挂号费

        public SearchPrintDoc(RegisterInfo entity)
        {
            this.RegisterID = entity.RegisterID;
            this.PatientName = entity.PatientInfo.PatientName;
            this.CureType = entity.CureType;
            this.OfficeName = entity.OfficeInfo.OfficeName;
            this.CureCost = entity.OfficeInfo.CureCost;
            this.DoctorName = entity.DoctorInfo.DoctorName;
            this.RegisterTypeName = entity.RegisterTypeInfo.RegisterTypeName;
            this.RegisterCost = entity.RegisterTypeInfo.RegisterTypeCost;
        }

        protected override void OnBeginPrint(PrintEventArgs e)
        {
            font = new Font("宋体", 15);
        }

        protected override void OnPrintPage(PrintPageEventArgs e)
        {
            e.Graphics.DrawString("挂号信息",font, Brushes.Black, 300, 60);
            e.Graphics.DrawString("门诊号", font, Brushes.Black, 20, 100);
            e.Graphics.DrawString("病人姓名", font, Brushes.Black, 120, 100);
            e.Graphics.DrawString("诊疗类型", font, Brushes.Black, 220, 100);
            e.Graphics.DrawString("就诊科室", font, Brushes.Black, 320, 100);
            e.Graphics.DrawString("诊疗费", font, Brushes.Black, 420, 100);
            e.Graphics.DrawString("医师姓名", font, Brushes.Black, 520, 100);
            e.Graphics.DrawString("挂号类型", font, Brushes.Black, 620, 100);
            e.Graphics.DrawString("挂号费", font, Brushes.Black, 720, 100);
        }

        protected override void OnEndPrint(PrintEventArgs e)
        {
            font = null;
        }

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -