📄 clinicpriceconfirm.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace 医院管理系统
{
/// <summary>
/// ClinicPriceConfirm 的摘要说明。
/// </summary>
public class ClinicPriceConfirm : System.Windows.Forms.Form
{
private DataTable newTable;//保存门诊划价中的药品和收费项目信息
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.DataGrid dataGrid3;
private System.Data.SqlClient.SqlDataAdapter da1;
private 医院管理系统.DataSet2 dataSet21;
private System.Data.SqlClient.SqlDataAdapter da2;
private System.Windows.Forms.TextBox txt1;
private System.Windows.Forms.ComboBox cmb1;
private System.Windows.Forms.TextBox txt2;
private System.Windows.Forms.TextBox txt4;
private System.Windows.Forms.TextBox txt3;
private System.Windows.Forms.TextBox txt5;
private System.Windows.Forms.DataGrid dataGrid2;
private System.Data.DataView dataView1;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand2;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public ClinicPriceConfirm()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ClinicPriceConfirm));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txt1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.cmb1 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.txt2 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.dataSet21 = new 医院管理系统.DataSet2();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.btnOK = new System.Windows.Forms.Button();
this.txt4 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txt3 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txt5 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.btnCancel = new System.Windows.Forms.Button();
this.dataGrid3 = new System.Windows.Forms.DataGrid();
this.dataView1 = new System.Data.DataView();
this.da1 = new System.Data.SqlClient.SqlDataAdapter();
this.da2 = new System.Data.SqlClient.SqlDataAdapter();
this.dataGrid2 = new System.Windows.Forms.DataGrid();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlSelectCommand2 = new System.Data.SqlClient.SqlCommand();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataSet21)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGrid2)).BeginInit();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txt1);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.cmb1);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txt2);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(704, 88);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "挂号信息";
//
// txt1
//
this.txt1.Location = new System.Drawing.Point(232, 56);
this.txt1.Name = "txt1";
this.txt1.ReadOnly = true;
this.txt1.Size = new System.Drawing.Size(128, 21);
this.txt1.TabIndex = 2;
this.txt1.Text = "";
//
// label1
//
this.label1.Location = new System.Drawing.Point(56, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(100, 16);
this.label1.TabIndex = 1;
this.label1.Text = "门诊号";
//
// cmb1
//
this.cmb1.Location = new System.Drawing.Point(56, 56);
this.cmb1.Name = "cmb1";
this.cmb1.Size = new System.Drawing.Size(136, 20);
this.cmb1.TabIndex = 0;
this.cmb1.DropDown += new System.EventHandler(this.cmb1_DropDown);
//
// label2
//
this.label2.Location = new System.Drawing.Point(232, 40);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(100, 16);
this.label2.TabIndex = 1;
this.label2.Text = "姓名";
//
// txt2
//
this.txt2.Location = new System.Drawing.Point(416, 56);
this.txt2.Name = "txt2";
this.txt2.ReadOnly = true;
this.txt2.Size = new System.Drawing.Size(128, 21);
this.txt2.TabIndex = 2;
this.txt2.Text = "";
//
// label3
//
this.label3.Location = new System.Drawing.Point(416, 40);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(100, 16);
this.label3.TabIndex = 1;
this.label3.Text = "性别";
//
// dataSet21
//
this.dataSet21.DataSetName = "DataSet2";
this.dataSet21.Locale = new System.Globalization.CultureInfo("zh-CN");
//
// dataGrid1
//
this.dataGrid1.CaptionVisible = false;
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(0, 88);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(712, 328);
this.dataGrid1.TabIndex = 1;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.btnOK);
this.groupBox2.Controls.Add(this.txt4);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.txt3);
this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.txt5);
this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.btnCancel);
this.groupBox2.Location = new System.Drawing.Point(0, 416);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(704, 100);
this.groupBox2.TabIndex = 2;
this.groupBox2.TabStop = false;
//
// btnOK
//
this.btnOK.Image = ((System.Drawing.Image)(resources.GetObject("btnOK.Image")));
this.btnOK.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnOK.Location = new System.Drawing.Point(512, 54);
this.btnOK.Name = "btnOK";
this.btnOK.TabIndex = 3;
this.btnOK.Text = "保存";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// txt4
//
this.txt4.Location = new System.Drawing.Point(200, 56);
this.txt4.Name = "txt4";
this.txt4.ReadOnly = true;
this.txt4.Size = new System.Drawing.Size(128, 21);
this.txt4.TabIndex = 2;
this.txt4.Text = "";
//
// label4
//
this.label4.Location = new System.Drawing.Point(200, 40);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(100, 16);
this.label4.TabIndex = 1;
this.label4.Text = "医生";
//
// txt3
//
this.txt3.Location = new System.Drawing.Point(48, 56);
this.txt3.Name = "txt3";
this.txt3.ReadOnly = true;
this.txt3.Size = new System.Drawing.Size(128, 21);
this.txt3.TabIndex = 2;
this.txt3.Text = "";
//
// label5
//
this.label5.Location = new System.Drawing.Point(48, 40);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(100, 16);
this.label5.TabIndex = 1;
this.label5.Text = "科室";
//
// txt5
//
this.txt5.Location = new System.Drawing.Point(360, 56);
this.txt5.Name = "txt5";
this.txt5.ReadOnly = true;
this.txt5.Size = new System.Drawing.Size(128, 21);
this.txt5.TabIndex = 2;
this.txt5.Text = "";
//
// label6
//
this.label6.Location = new System.Drawing.Point(360, 40);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(100, 16);
this.label6.TabIndex = 1;
this.label6.Text = "金额合计";
//
// btnCancel
//
this.btnCancel.Image = ((System.Drawing.Image)(resources.GetObject("btnCancel.Image")));
this.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnCancel.Location = new System.Drawing.Point(608, 54);
this.btnCancel.Name = "btnCancel";
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "取消";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// dataGrid3
//
this.dataGrid3.CaptionVisible = false;
this.dataGrid3.DataMember = "";
this.dataGrid3.DataSource = this.dataView1;
this.dataGrid3.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid3.Location = new System.Drawing.Point(56, 264);
this.dataGrid3.Name = "dataGrid3";
this.dataGrid3.ReadOnly = true;
this.dataGrid3.Size = new System.Drawing.Size(496, 120);
this.dataGrid3.TabIndex = 4;
this.dataGrid3.Visible = false;
this.dataGrid3.DoubleClick += new System.EventHandler(this.dataGrid3_DoubleClick);
//
// dataView1
//
this.dataView1.Table = this.dataSet21.v收费项目及药品;
//
// da1
//
this.da1.SelectCommand = this.sqlSelectCommand1;
this.da1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "门诊挂号", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("编号", "编号"),
new System.Data.Common.DataColumnMapping("病人编号", "病人编号"),
new System.Data.Common.DataColumnMapping("姓名", "姓名"),
new System.Data.Common.DataColumnMapping("性别", "性别"),
new System.Data.Common.DataColumnMapping("挂号科室", "挂号科室"),
new System.Data.Common.DataColumnMapping("费用类型", "费用类型"),
new System.Data.Common.DataColumnMapping("挂号类型", "挂号类型"),
new System.Data.Common.DataColumnMapping("挂号费用", "挂号费用"),
new System.Data.Common.DataColumnMapping("医生", "医生"),
new System.Data.Common.DataColumnMapping("时间", "时间"),
new System.Data.Common.DataColumnMapping("是否已划价", "是否已划价")})});
//
// da2
//
this.da2.SelectCommand = this.sqlSelectCommand2;
this.da2.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "v收费项目及药品", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("编号", "编号"),
new System.Data.Common.DataColumnMapping("名称", "名称"),
new System.Data.Common.DataColumnMapping("规格", "规格"),
new System.Data.Common.DataColumnMapping("单位", "单位"),
new System.Data.Common.DataColumnMapping("单价", "单价"),
new System.Data.Common.DataColumnMapping("拼音码", "拼音码")})});
//
// dataGrid2
//
this.dataGrid2.CaptionVisible = false;
this.dataGrid2.DataMember = "门诊挂号";
this.dataGrid2.DataSource = this.dataSet21;
this.dataGrid2.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid2.Location = new System.Drawing.Point(56, 96);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -