📄 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 HMS
{
/// <summary>
/// ClinicPriceConfirm 的摘要说明。
/// </summary>
public class ClinicPriceConfirm : System.Windows.Forms.Form
{
private DataTable newTable;//保存门诊划价中的药品和收费项目信息
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txt5;
private System.Windows.Forms.TextBox txt4;
private System.Windows.Forms.TextBox txt3;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.DataGrid dataGrid3;
private System.Windows.Forms.DataGrid dataGrid2;
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.TextBox txt2;
private System.Windows.Forms.TextBox txt1;
private System.Windows.Forms.ComboBox cmb1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Data.DataView dataView1;
private System.Data.SqlClient.SqlDataAdapter da1;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private System.Data.SqlClient.SqlDataAdapter da2;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand2;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private HMS.DataSet2 dataSet21;
/// <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()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.dataGrid3 = new System.Windows.Forms.DataGrid();
this.dataView1 = new System.Data.DataView();
this.dataSet21 = new HMS.DataSet2();
this.dataGrid2 = new System.Windows.Forms.DataGrid();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.txt5 = new System.Windows.Forms.TextBox();
this.txt4 = new System.Windows.Forms.TextBox();
this.txt3 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.txt2 = new System.Windows.Forms.TextBox();
this.txt1 = new System.Windows.Forms.TextBox();
this.cmb1 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.da1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.da2 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlSelectCommand2 = new System.Data.SqlClient.SqlCommand();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet21)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGrid2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.dataGrid3);
this.groupBox1.Controls.Add(this.dataGrid2);
this.groupBox1.Controls.Add(this.btnCancel);
this.groupBox1.Controls.Add(this.btnOK);
this.groupBox1.Controls.Add(this.txt5);
this.groupBox1.Controls.Add(this.txt4);
this.groupBox1.Controls.Add(this.txt3);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.dataGrid1);
this.groupBox1.Controls.Add(this.txt2);
this.groupBox1.Controls.Add(this.txt1);
this.groupBox1.Controls.Add(this.cmb1);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(0, 8);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(880, 544);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "挂号信息";
//
// 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(64, 280);
this.dataGrid3.Name = "dataGrid3";
this.dataGrid3.ReadOnly = true;
this.dataGrid3.Size = new System.Drawing.Size(592, 128);
this.dataGrid3.TabIndex = 8;
this.dataGrid3.Visible = false;
this.dataGrid3.DoubleClick += new System.EventHandler(this.dataGrid3_DoubleClick);
//
// dataView1
//
this.dataView1.Table = this.dataSet21.v收费项目及药品;
//
// dataSet21
//
this.dataSet21.DataSetName = "DataSet2";
this.dataSet21.Locale = new System.Globalization.CultureInfo("en-US");
//
// 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(64, 112);
this.dataGrid2.Name = "dataGrid2";
this.dataGrid2.ReadOnly = true;
this.dataGrid2.Size = new System.Drawing.Size(592, 152);
this.dataGrid2.TabIndex = 7;
this.dataGrid2.Visible = false;
this.dataGrid2.DoubleClick += new System.EventHandler(this.dataGrid2_DoubleClick);
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(608, 504);
this.btnCancel.Name = "btnCancel";
this.btnCancel.TabIndex = 16;
this.btnCancel.Text = "取消";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(504, 504);
this.btnOK.Name = "btnOK";
this.btnOK.TabIndex = 15;
this.btnOK.Text = "保存";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// txt5
//
this.txt5.Location = new System.Drawing.Point(360, 512);
this.txt5.Name = "txt5";
this.txt5.TabIndex = 14;
this.txt5.Text = "";
//
// txt4
//
this.txt4.Location = new System.Drawing.Point(184, 512);
this.txt4.Name = "txt4";
this.txt4.TabIndex = 13;
this.txt4.Text = "";
//
// txt3
//
this.txt3.Location = new System.Drawing.Point(24, 512);
this.txt3.Name = "txt3";
this.txt3.TabIndex = 12;
this.txt3.Text = "";
//
// label6
//
this.label6.Location = new System.Drawing.Point(360, 480);
this.label6.Name = "label6";
this.label6.TabIndex = 11;
this.label6.Text = "金融会计";
//
// label5
//
this.label5.Location = new System.Drawing.Point(184, 480);
this.label5.Name = "label5";
this.label5.TabIndex = 10;
this.label5.Text = "医生";
//
// label4
//
this.label4.Location = new System.Drawing.Point(24, 480);
this.label4.Name = "label4";
this.label4.TabIndex = 9;
this.label4.Text = "科室";
//
// dataGrid1
//
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(8, 80);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(808, 392);
this.dataGrid1.TabIndex = 6;
//
// txt2
//
this.txt2.Location = new System.Drawing.Point(552, 48);
this.txt2.Name = "txt2";
this.txt2.TabIndex = 5;
this.txt2.Text = "";
//
// txt1
//
this.txt1.Location = new System.Drawing.Point(272, 48);
this.txt1.Name = "txt1";
this.txt1.TabIndex = 4;
this.txt1.Text = "";
//
// cmb1
//
this.cmb1.Location = new System.Drawing.Point(16, 48);
this.cmb1.Name = "cmb1";
this.cmb1.Size = new System.Drawing.Size(121, 20);
this.cmb1.TabIndex = 3;
this.cmb1.DropDown += new System.EventHandler(this.cmb1_DropDown);
//
// label3
//
this.label3.Location = new System.Drawing.Point(552, 24);
this.label3.Name = "label3";
this.label3.TabIndex = 2;
this.label3.Text = "性别";
//
// label2
//
this.label2.Location = new System.Drawing.Point(272, 24);
this.label2.Name = "label2";
this.label2.TabIndex = 1;
this.label2.Text = "姓名";
//
// label1
//
this.label1.Location = new System.Drawing.Point(32, 24);
this.label1.Name = "label1";
this.label1.TabIndex = 0;
this.label1.Text = "门诊号";
//
// 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("是否已划价", "是否已划价")})});
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT 编号, 病人编号, 姓名, 性别, 挂号科室, 费用类型, 挂号类型, 挂号费用, 医生, 时间, 是否已划价 FROM 门诊挂号 WHERE (是" +
"否已划价 = \'否\')";
this.sqlSelectCommand1.Connection = this.sqlConnection1;
//
// sqlConnection1
//
this.sqlConnection1.ConnectionString = "workstation id=BRIGHT;packet size=4096;user id=sa;data source=BRIGHT;persist secu" +
"rity info=False;initial catalog=hospitalms";
//
// da2
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -