?? clinicpriceconfirm.cs
字號(hào):
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace 醫(yī)院管理系統(tǒng)
{
/// <summary>
/// ClinicPriceConfirm 的摘要說(shuō)明。
/// </summary>
public class ClinicPriceConfirm : System.Windows.Forms.Form
{
private DataTable newTable;//保存門(mén)診劃價(jià)中的藥品和收費(fèi)項(xiàng)目信息
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 醫(yī)院管理系統(tǒng).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>
/// 必需的設(shè)計(jì)器變量。
/// </summary>
private System.ComponentModel.Container components = null;
public ClinicPriceConfirm()
{
//
// Windows 窗體設(shè)計(jì)器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 調(diào)用后添加任何構(gòu)造函數(shù)代碼
//
}
/// <summary>
/// 清理所有正在使用的資源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗體設(shè)計(jì)器生成的代碼
/// <summary>
/// 設(shè)計(jì)器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內(nèi)容。
/// </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 醫(yī)院管理系統(tǒng).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 = "掛號(hào)信息";
//
// 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 = "門(mén)診號(hào)";
//
// 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 = "醫(yī)生";
//
// 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 = "金額合計(jì)";
//
// 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收費(fèi)項(xiàng)目及藥品;
//
// da1
//
this.da1.SelectCommand = this.sqlSelectCommand1;
this.da1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "門(mén)診掛號(hào)", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("編號(hào)", "編號(hào)"),
new System.Data.Common.DataColumnMapping("病人編號(hào)", "病人編號(hào)"),
new System.Data.Common.DataColumnMapping("姓名", "姓名"),
new System.Data.Common.DataColumnMapping("性別", "性別"),
new System.Data.Common.DataColumnMapping("掛號(hào)科室", "掛號(hào)科室"),
new System.Data.Common.DataColumnMapping("費(fèi)用類(lèi)型", "費(fèi)用類(lèi)型"),
new System.Data.Common.DataColumnMapping("掛號(hào)類(lèi)型", "掛號(hào)類(lèi)型"),
new System.Data.Common.DataColumnMapping("掛號(hào)費(fèi)用", "掛號(hào)費(fèi)用"),
new System.Data.Common.DataColumnMapping("醫(yī)生", "醫(yī)生"),
new System.Data.Common.DataColumnMapping("時(shí)間", "時(shí)間"),
new System.Data.Common.DataColumnMapping("是否已劃價(jià)", "是否已劃價(jià)")})});
//
// da2
//
this.da2.SelectCommand = this.sqlSelectCommand2;
this.da2.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "v收費(fèi)項(xiàng)目及藥品", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("編號(hào)", "編號(hào)"),
new System.Data.Common.DataColumnMapping("名稱", "名稱"),
new System.Data.Common.DataColumnMapping("規(guī)格", "規(guī)格"),
new System.Data.Common.DataColumnMapping("單位", "單位"),
new System.Data.Common.DataColumnMapping("單價(jià)", "單價(jià)"),
new System.Data.Common.DataColumnMapping("拼音碼", "拼音碼")})});
//
// dataGrid2
//
this.dataGrid2.CaptionVisible = false;
this.dataGrid2.DataMember = "門(mén)診掛號(hào)";
this.dataGrid2.DataSource = this.dataSet21;
this.dataGrid2.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid2.Location = new System.Drawing.Point(56, 96);
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -