📄 jz_sy_zl.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data;
namespace PDA_test
{
/// <summary>
/// JZ_SY_ZL 的摘要说明。
/// </summary>
public class JZ_SY_ZL : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button_back;
private System.Windows.Forms.Button button_start;
private System.Windows.Forms.TextBox textBox_brjbxx;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Label label1;
public System.Data.SqlClient.SqlConnection JZYW_Sql_conn_str;
public string br_jbxx;//病人基本信息
public string mzh;
public string fil_con;
public DateTime zl_sfrq;
public DataTable lc_ylxm;
public string tilte_string;
public string fil_lx;
private int[] dim_dysj;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Button button7;
private JZ_HSXC mF_Form ;
private System.Windows.Forms.Label label_title;
private System.Data.DataSet sy_dt;
private System.Data.DataView sy_mx;
private int lc_seleid;
private int lc_zh;
private int lc_cfh;
private int lc_sy_index;
private System.Windows.Forms.TextBox textBox_ypxx;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Label label_zxsl;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Label label_yysl;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label4;
private int lc_row_total;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.Button button10;
private DataView lc_view1;
private string lc_ok_exec;
private string list_click;
public string Sql_string;
public string log_name;
private System.Windows.Forms.Button button_syqr;
private int cfh_sy;
public JZ_SY_ZL(JZ_HSXC myform)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.mF_Form = myform ;
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.button_back = new System.Windows.Forms.Button();
this.button_start = new System.Windows.Forms.Button();
this.textBox_brjbxx = new System.Windows.Forms.TextBox();
this.listBox1 = new System.Windows.Forms.ListBox();
this.label_title = new System.Windows.Forms.Label();
this.button8 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.textBox_ypxx = new System.Windows.Forms.TextBox();
this.panel1 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.label_zxsl = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.label_yysl = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.button10 = new System.Windows.Forms.Button();
this.button9 = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label();
this.button_syqr = new System.Windows.Forms.Button();
//
// label1
//
this.label1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold);
this.label1.ForeColor = System.Drawing.Color.Red;
this.label1.Location = new System.Drawing.Point(90, 260);
this.label1.Size = new System.Drawing.Size(56, 22);
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// button_back
//
this.button_back.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular);
this.button_back.Location = new System.Drawing.Point(164, 258);
this.button_back.Size = new System.Drawing.Size(72, 30);
this.button_back.Text = "返回";
this.button_back.Click += new System.EventHandler(this.button_back_Click);
//
// button_start
//
this.button_start.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular);
this.button_start.Location = new System.Drawing.Point(4, 258);
this.button_start.Size = new System.Drawing.Size(72, 30);
this.button_start.Text = "执行";
this.button_start.Visible = false;
this.button_start.Click += new System.EventHandler(this.button_start_Click);
//
// textBox_brjbxx
//
this.textBox_brjbxx.Location = new System.Drawing.Point(0, 1);
this.textBox_brjbxx.Size = new System.Drawing.Size(240, 21);
this.textBox_brjbxx.Text = "";
//
// listBox1
//
this.listBox1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular);
this.listBox1.Location = new System.Drawing.Point(0, 140);
this.listBox1.Size = new System.Drawing.Size(240, 114);
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
//
// label_title
//
this.label_title.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular);
this.label_title.Location = new System.Drawing.Point(34, 22);
this.label_title.Size = new System.Drawing.Size(174, 20);
this.label_title.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.label_title.Visible = false;
//
// button8
//
this.button8.Location = new System.Drawing.Point(208, 22);
this.button8.Size = new System.Drawing.Size(32, 20);
this.button8.Text = ">";
this.button8.Click += new System.EventHandler(this.button8_Click);
//
// button7
//
this.button7.Location = new System.Drawing.Point(0, 22);
this.button7.Size = new System.Drawing.Size(32, 20);
this.button7.Text = "<";
this.button7.Click += new System.EventHandler(this.button7_Click);
//
// textBox_ypxx
//
this.textBox_ypxx.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular);
this.textBox_ypxx.Location = new System.Drawing.Point(2, 44);
this.textBox_ypxx.Multiline = true;
this.textBox_ypxx.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox_ypxx.Size = new System.Drawing.Size(238, 98);
this.textBox_ypxx.Text = "textBox1";
//
// panel1
//
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.button3);
this.panel1.Controls.Add(this.button4);
this.panel1.Controls.Add(this.label_zxsl);
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.button2);
this.panel1.Controls.Add(this.button5);
this.panel1.Controls.Add(this.button6);
this.panel1.Controls.Add(this.label_yysl);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.label2);
this.panel1.Location = new System.Drawing.Point(232, 66);
this.panel1.Size = new System.Drawing.Size(240, 214);
this.panel1.Visible = false;
//
// label4
//
this.label4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular);
this.label4.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.label4.Location = new System.Drawing.Point(18, 92);
this.label4.Size = new System.Drawing.Size(48, 20);
this.label4.Visible = false;
//
// button3
//
this.button3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
this.button3.Location = new System.Drawing.Point(176, 80);
this.button3.Size = new System.Drawing.Size(32, 24);
this.button3.Text = ">>";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
this.button4.Location = new System.Drawing.Point(104, 80);
this.button4.Size = new System.Drawing.Size(32, 24);
this.button4.Text = "<<";
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// label_zxsl
//
this.label_zxsl.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
this.label_zxsl.ForeColor = System.Drawing.Color.Red;
this.label_zxsl.Location = new System.Drawing.Point(136, 72);
this.label_zxsl.Size = new System.Drawing.Size(38, 16);
this.label_zxsl.Text = "1";
this.label_zxsl.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// button1
//
this.button1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
this.button1.Location = new System.Drawing.Point(176, 56);
this.button1.Size = new System.Drawing.Size(32, 24);
this.button1.Text = "+";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
this.button2.Location = new System.Drawing.Point(104, 56);
this.button2.Size = new System.Drawing.Size(32, 24);
this.button2.Text = "-";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button5
//
this.button5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular);
this.button5.Location = new System.Drawing.Point(128, 128);
this.button5.Size = new System.Drawing.Size(72, 40);
this.button5.Text = "放弃";
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// button6
//
this.button6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular);
this.button6.Location = new System.Drawing.Point(40, 128);
this.button6.Size = new System.Drawing.Size(72, 40);
this.button6.Text = "确定";
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// label_yysl
//
this.label_yysl.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular);
this.label_yysl.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.label_yysl.Location = new System.Drawing.Point(32, 56);
this.label_yysl.Size = new System.Drawing.Size(48, 20);
//
// label3
//
this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular);
this.label3.ForeColor = System.Drawing.Color.Red;
this.label3.Location = new System.Drawing.Point(128, 24);
this.label3.Size = new System.Drawing.Size(72, 20);
this.label3.Text = "本次执行";
//
// label2
//
this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular);
this.label2.Location = new System.Drawing.Point(16, 24);
this.label2.Size = new System.Drawing.Size(72, 20);
this.label2.Text = "原有数量";
//
// panel2
//
this.panel2.Controls.Add(this.button10);
this.panel2.Controls.Add(this.button9);
this.panel2.Controls.Add(this.label5);
this.panel2.Location = new System.Drawing.Point(238, 122);
this.panel2.Size = new System.Drawing.Size(188, 80);
this.panel2.Visible = false;
//
// button10
//
this.button10.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular);
this.button10.Location = new System.Drawing.Point(104, 40);
this.button10.Size = new System.Drawing.Size(72, 30);
this.button10.Text = "No";
this.button10.Click += new System.EventHandler(this.button10_Click);
//
// button9
//
this.button9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular);
this.button9.Location = new System.Drawing.Point(12, 40);
this.button9.Size = new System.Drawing.Size(72, 30);
this.button9.Text = "OK";
this.button9.Click += new System.EventHandler(this.button9_Click);
//
// label5
//
this.label5.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold);
this.label5.ForeColor = System.Drawing.Color.Red;
this.label5.Location = new System.Drawing.Point(-4, 10);
this.label5.Size = new System.Drawing.Size(196, 20);
this.label5.Text = "确定执行了上述医嘱?";
//
// button_syqr
//
this.button_syqr.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular);
this.button_syqr.Location = new System.Drawing.Point(36, 22);
this.button_syqr.Size = new System.Drawing.Size(168, 20);
this.button_syqr.Click += new System.EventHandler(this.button_syqr_Click);
//
// JZ_SY_ZL
//
this.Controls.Add(this.button_syqr);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.textBox_ypxx);
this.Controls.Add(this.label_title);
this.Controls.Add(this.button8);
this.Controls.Add(this.button7);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.button_back);
this.Controls.Add(this.button_start);
this.Controls.Add(this.textBox_brjbxx);
this.Controls.Add(this.label1);
this.Text = "急诊巡查-";
this.Load += new System.EventHandler(this.JZ_SY_ZL_Load);
}
#endregion
private void JZ_SY_ZL_Load(object sender, System.EventArgs e)
{
cfh_sy=0;
list_click="None";
this.lc_sy_index=0;
this.sy_dt=new DataSet();
this.sy_mx=new DataView();
//string sql_conn=this.JZYW_Sql_conn_str.ConnectionString.ToString().Trim();
this.JZYW_Sql_conn_str=new SqlConnection(this.Sql_string);
//DataView lc_view=new DataView(lc_ylxm,"","收费日期",DataViewRowState.CurrentRows);
this.form_refresh();
this.Text=this.Text.ToString().Trim()+tilte_string.ToString().Trim();
this.textBox_brjbxx.Text=this.br_jbxx.ToString();
//访问数据库 ,得到所有有效的输液明细
this.JZYW_Sql_conn_str.Open();
string lc_sy_cmd="exec pda_sy_info '"+this.mzh.ToString().Trim()+ "','"+fil_lx.ToString().Trim()+"'";
// MessageBox.Show (lc_sy_cmd.ToString());
SqlDataAdapter sql_da =new SqlDataAdapter(lc_sy_cmd, JZYW_Sql_conn_str);
SqlCommandBuilder sql_cb =new SqlCommandBuilder( sql_da );
sql_da.Fill(this.sy_dt);
this.JZYW_Sql_conn_str.Close();
this.syinfo_refresh(0);
}
private void get_syxx()
{
this.JZYW_Sql_conn_str.Open();
this.sy_dt=new DataSet();
string lc_sy_cmd="exec pda_sy_info '"+this.mzh.ToString().Trim()+ "','"+fil_lx.ToString().Trim()+"'";
// MessageBox.Show (lc_sy_cmd.ToString());
SqlDataAdapter sql_da =new SqlDataAdapter(lc_sy_cmd, JZYW_Sql_conn_str);
SqlCommandBuilder sql_cb =new SqlCommandBuilder( sql_da );
sql_da.Fill(this.sy_dt);
this.JZYW_Sql_conn_str.Close();
this.lc_sy_index=0;
this.syinfo_refresh(0);
}
private void form_refresh()
{
string lcnr="";
DataView lc_view=new DataView(lc_ylxm,fil_con,"收费日期",DataViewRowState.CurrentRows);
DateTime lc_sfrq;
string lc_lx;
int lc_zh;
string lc_nr1="";
int str_len=0;
int lc_rowcount=lc_view.Count;
this.dim_dysj=new int[lc_rowcount];
//dim_dysj[0]=0;
int lc_jsq=0;
string lc_zt="0";
int lc_sysl=0;
string lc_bzbz="";
this.listBox1.Items.Clear();
foreach (DataRowView tmp_DR in lc_view)
{
// lc_zt=tmp_DR["状态"].ToString().Trim();
// lc_zh=(int) tmp_DR["组号"];
// lc_sfrq=(DateTime) tmp_DR["收费日期"];
// lcnr="";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -