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

📄 jz_hsxc.cs

📁 windows mobile 2005 上可以运行的资产管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
					this.frm_zl.tilte_string=exec_type.ToString().Trim();
					this.frm_zl.Sql_string=this.Sql_string.ToString();
					this.frm_zl.log_name=this.log_name.ToString();
					this.frm_zl.Show();
					this.Hide();
					break;

				case "输液"  :
					//MessageBox.Show(fil_con.ToString());
					//this.Sql_conn_str=new SqlConnection(sql_conn);
					this.Sql_conn_str.Open();
					string lc_st="";
					lc_sy_table=new DataTable();
					foreach (DataRow tmp_DR in this.ds_rwjl.Tables[2].Rows )
					{
						lc_lx_sy=tmp_DR["类型"].ToString().Trim();
						if (lc_lx_sy=="输液")
						{
							try
							{
								lc_sy_cmd="exec pyd_to_lscf '"+this.mzh.ToString().Trim()+"','"+tmp_DR["发票编号"].ToString().Trim()+
									"','"+lc_gh.ToString().Trim()+"','"+lc_name_sy.ToString().Trim()+"','"+lc_age_sy.ToString().Trim()+"','"+
									exec_type.ToString().Trim()+"'";
								sql_da =new SqlDataAdapter(lc_sy_cmd, Sql_conn_str);
								sql_cb =new SqlCommandBuilder( sql_da );
								sql_da.Fill(lc_sy_table);	
								//MessageBox.Show(lc_sy_table.Rows[0]["返回值"].ToString())
								lc_ret_sy=int.Parse(lc_sy_table.Rows[0]["返回值"].ToString());
								//							if (lc_ret_sy>0)
								//							{
								//								MessageBox.Show("SP执行成功!"+tmp_DR["发票编号"].ToString().Trim());
								//							}
								//							else
								//							{
								//								MessageBox.Show("SP执行失败!"+tmp_DR["发票编号"].ToString().Trim()+",,,"+lc_ret_sy.ToString());
								//
								//							}
							}
							catch
							{
								lc_st="wrong";
							}
						}
					}
					this.Sql_conn_str.Close();
					if (lc_st=="wrong")
					{
						MessageBox.Show("输液项目有错误发生!");
					}
					else
					{
						this.frm_sy=new JZ_SY_ZL(this);
						this.frm_sy.lc_ylxm=this.ds_rwjl.Tables[2];
						this.frm_sy.zl_sfrq=lc_fprq;
						this.frm_sy.mzh=this.mzh.ToString().Trim();
						this.frm_sy.fil_con=fil_con.ToString().Trim();
						this.frm_sy.br_jbxx=br_jbxx.ToString().Trim();
						this.frm_sy.fil_lx=exec_type.ToString().Trim();
						this.frm_sy.JZYW_Sql_conn_str=this.Sql_conn_str;
						this.frm_sy.tilte_string=exec_type.ToString().Trim();
						this.frm_sy.Sql_string=this.Sql_string.ToString();
						this.frm_sy.log_name=this.log_name.ToString();
						this.frm_sy.Show();

					}
					break;

			

				case "注射"  :
					this.Sql_conn_str.Open();
					lc_sy_table=new DataTable();
					foreach (DataRow tmp_DR in this.ds_rwjl.Tables[2].Rows )
					{
						lc_lx_sy=tmp_DR["类型"].ToString().Trim();
						if (lc_lx_sy=="注射")
						{
							lc_sy_cmd="exec pyd_to_lscf '"+this.mzh.ToString().Trim()+"','"+tmp_DR["发票编号"].ToString().Trim()+
								"','"+lc_gh.ToString().Trim()+"','"+lc_name_sy.ToString().Trim()+"','"+lc_age_sy.ToString().Trim()+"','"+
								exec_type.ToString().Trim()+"'";
							sql_da =new SqlDataAdapter(lc_sy_cmd, Sql_conn_str);
							sql_cb =new SqlCommandBuilder( sql_da );
							sql_da.Fill(lc_sy_table);	
							lc_ret_sy=int.Parse(lc_sy_table.Rows[0]["返回值"].ToString());
				
						}
					}
					this.Sql_conn_str.Close();

					this.frm_sy=new JZ_SY_ZL(this);
					this.frm_sy.lc_ylxm=this.ds_rwjl.Tables[2];
					this.frm_sy.zl_sfrq=lc_fprq;
					this.frm_sy.mzh=this.mzh.ToString().Trim();
					this.frm_sy.fil_con=fil_con.ToString().Trim();
					this.frm_sy.br_jbxx=br_jbxx.ToString().Trim();
					this.frm_sy.fil_lx=exec_type.ToString().Trim();
					this.frm_sy.JZYW_Sql_conn_str=this.Sql_conn_str;
					this.frm_sy.tilte_string=exec_type.ToString().Trim();
					this.frm_sy.Sql_string=this.Sql_string.ToString();
					this.frm_sy.log_name=this.log_name.ToString();
					this.frm_sy.Show();
					break;

			}
		
		}
		private void cls_items()
		{
			//清楚按钮信息及附加数组
			dim_cfh= new string[6];
			dim_lx=new string[6];
			dim_zh=new int[6];
			this.button1.Visible=false;
			this.button2.Visible=false;
			this.button3.Visible=false;
			this.button4.Visible=false;
			this.button5.Visible=false;
			this.button6.Visible=false;
		}
		private void show_items(int rq_wz )
		{
			//显示按钮信息,并对附加数组进行赋值
			//判断是否有数据
			if (this.ds_rwjl.Tables[0].Rows.Count>0)
			{
				DateTime show_time;
				DateTime check_time;
				//int rq_wz=0;
				int wh_cl=0;
				string lc_bttext="";
				string lc_show="";
				int lc_zh=0;
				int table0num=0;

				show_time=(DateTime) ds_rwjl.Tables[0].Rows[rq_wz]["收费日期"];
				lc_fprq=show_time;
				lc_bttext=show_time.ToLongDateString().Trim();
				//控制日期选择按钮
				table0num=ds_rwjl.Tables[0].Rows.Count;
				if (table0num>1)
				{
					if (rq_wz==0)
					{
						this.button7.Visible=true;
						this.button8.Visible=false;
					}
					else
					{
					
					
						if (rq_wz==(table0num-1))
						{
							this.button7.Visible=false;
							this.button8.Visible=true;
						}
						else
						{
							this.button7.Visible=true;
							this.button8.Visible=true;
						}
					}
				}
				else
				{
					this.button7.Visible=false;
					this.button8.Visible=false;
				}
				//结束

				this.label1.Text=lc_bttext.ToString().Trim();


			
				if (ds_rwjl.Tables[1].Rows.Count>0)
				{
					foreach (DataRow tmp_DR in ds_rwjl.Tables[1].Rows)
					{
						lc_show="";
						check_time=(DateTime) tmp_DR["收费日期"];
						if (show_time==check_time)
						{
							lc_zh=(int) tmp_DR["组号"];	
							if (lc_zh==0)
								lc_show=tmp_DR["类型"].ToString();
							else
								lc_show=tmp_DR["名称"].ToString();

							wh_cl=0;
							while (wh_cl<1)
							{
								if (this.button1.Visible==false)
								{
									this.button1.Text=lc_show.ToString().Trim();
									wh_cl=1;
									this.button1.Visible=true;
								
								}
								if (this.button2.Visible==false & wh_cl<1 )  
								{
									this.button2.Text=lc_show.ToString().Trim();
									wh_cl=2;
									this.button2.Visible=true;
								
								}
								if (this.button3.Visible==false  & wh_cl<1) 
								{
									this.button3.Text=lc_show.ToString().Trim();
									wh_cl=3;
									this.button3.Visible=true;
								
								}
								if (this.button4.Visible==false  & wh_cl<1)
								{
									this.button4.Text=lc_show.ToString().Trim();
									wh_cl=4;
									this.button4.Visible=true;
								
								}
								if (this.button5.Visible==false  & wh_cl<1)
								{
									this.button5.Text=lc_show.ToString().Trim();
									wh_cl=5;
									this.button5.Visible=true;
								
								}
								if (this.button6.Visible==false  & wh_cl<1)
								{
									this.button6.Text=lc_show.ToString().Trim();
									wh_cl=6;
									this.button6.Visible=true;
								
								}
								if (wh_cl>0)
								{
									this.dim_cfh[wh_cl-1]="组号="+tmp_DR["组号"].ToString();
									//+" & 类型='"+tmp_DR["类型"].ToString().Trim()+"'";
									this.dim_lx[wh_cl-1]=tmp_DR["类型"].ToString().Trim();
									//MessageBox.Show(this.dim_cfh[wh_cl-1].ToString());
									//MessageBox.Show(this.dim_lx[wh_cl-1].ToString());
								}
								else
									wh_cl=9;
							}

						}

				
					}
				}
				else
					MessageBox.Show("没有需要进行处理的医嘱!!");
			}

		}

		private void button7_Click(object sender, System.EventArgs e)
		{
			this.cls_items();
			this.lc_rqnum=this.lc_rqnum+1;
			this.show_items(lc_rqnum);
		}

		private void button8_Click(object sender, System.EventArgs e)
		{
			
			this.cls_items();
			this.lc_rqnum=this.lc_rqnum-1;
			this.show_items(lc_rqnum);
		}

		private void button_back_Click(object sender, System.EventArgs e)
		{
			ds_rwjl.Clear();
			this.mF_Form.Show();
			this.Close();

		}

		private void button1_Click(object sender, System.EventArgs e)
		{
			string lc_exectype=this.dim_lx[0].ToString().Trim();
			string lc_filcon=this.dim_cfh[0].ToString().Trim();
			this.excute_frm(lc_exectype,lc_filcon);
			
		}

		private void button2_Click(object sender, System.EventArgs e)
		{
			string lc_exectype=this.dim_lx[1].ToString().Trim();
			string lc_filcon=this.dim_cfh[1].ToString().Trim();
			this.excute_frm(lc_exectype,lc_filcon);
		}

		private void button3_Click(object sender, System.EventArgs e)
		{
			string lc_exectype=this.dim_lx[2].ToString().Trim();
			string lc_filcon=this.dim_cfh[2].ToString().Trim();
			this.excute_frm(lc_exectype,lc_filcon);
		}

		private void button4_Click(object sender, System.EventArgs e)
		{
			string lc_exectype=this.dim_lx[3].ToString().Trim();
			string lc_filcon=this.dim_cfh[3].ToString().Trim();
			this.excute_frm(lc_exectype,lc_filcon);
		}

		private void button5_Click(object sender, System.EventArgs e)
		{
			string lc_exectype=this.dim_lx[4].ToString().Trim();
			string lc_filcon=this.dim_cfh[4].ToString().Trim();
			this.excute_frm(lc_exectype,lc_filcon);
		}

		private void button6_Click(object sender, System.EventArgs e)
		{
			string lc_exectype=this.dim_lx[5].ToString().Trim();
			string lc_filcon=this.dim_cfh[5].ToString().Trim();
			this.excute_frm(lc_exectype,lc_filcon);
		}
		}
	}

⌨️ 快捷键说明

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