• 大小: 648KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-03
  • 语言: C#
  • 标签: C#  医院  医疗  处方  

资源简介

可以自动生成处方,C#版,有需要的朋友可以研究一下

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;

namespace medic
{
    public partial class add_medic_Form : Form
    {
        string type;
        string connection = medic.Properties.Settings.Default.medicConnectionString;

        public add_medic_Form(string tree string treeid)
        {
            InitializeComponent();
            muluming.Text = tree;
            type = treeid;
        }

        private void add_Click(object sender EventArgs e)
        {
            if (textBox1.Text == ““ || textBox2.Text==““ || textBox3.Text==““)
            {
                MessageBox.Show(“药名或者剂量或者方法为空“);
            }
            else
            {
                if (textBox2.Text.Contains(“X“) == true)
                {
                    OleDbConnection cn = new OleDbConnection(connection);
                    cn.Open();
                    string oledbsql;
                    oledbsql = “select id from medic where name=‘“;
                    oledbsql += textBox1.Text;
                    oledbsql += “‘ and jiliang=‘“;
                    oledbsql += textBox2.Text;
                    oledbsql += “‘ and fangfa=‘“;
                    oledbsql += textBox3.Text;
                    oledbsql += “‘“;
                    OleDbCommand cmd = new OleDbCommand(oledbsql cn);
                    OleDbDataReader dr = cmd.ExecuteReader();
                    if (dr.HasRows)
                    {
                        dr.Close();
                        cn.Close();
                        MessageBox.Show(“药方已经存在,请重新输入“);
                    }
                    else
                    {
                        dr.Close();
                        cn.Close();

                        OleDbConnection cnb = new OleDbConnection(connection);
                        cnb.Open();
                        string sql;
                        sql = “insert into medic(namejiliangfangfashuliangtype_id) values(‘“;
                        sql += textBox1.Text;
                        sql += “‘‘“;
                        sql += textBox2.Text;
                        sql += “‘‘“;
                        sql += textBox3.Text;
                        sql += “‘“;
                        sql += “0“;
                        sql += type;
                        sql += “)“;
                        OleDbCommand cmdb = new OleDbCommand(sql cnb);
                        cmdb.ExecuteNonQuery();
                        cnb.Close();


                        this.DialogResult = DialogResult.OK;
                    }
                }
                else
                {
                    MessageBox.Show(“剂量里没有包含“X”字符“);
                }
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2956  2008-02-21 20:14  medic\medic\add_medic_Form.cs

     文件       8518  2008-02-21 20:13  medic\medic\add_medic_Form.Designer.cs

     文件     145684  2008-02-21 20:13  medic\medic\add_medic_Form.resx

     文件       2051  2008-02-20 21:39  medic\medic\add_mulu_Form.cs

     文件       5378  2008-02-20 21:36  medic\medic\add_mulu_Form.Designer.cs

     文件     145684  2008-02-20 21:36  medic\medic\add_mulu_Form.resx

     文件        405  2008-02-16 23:20  medic\medic\app.config

     文件        352  2008-02-15 22:14  medic\medic\delete_mulu_Form.cs

     文件       1173  2008-02-15 22:14  medic\medic\delete_mulu_Form.Designer.cs

     文件      93046  2008-02-15 10:46  medic\medic\icn.ico

     文件       6272  2008-02-19 13:22  medic\medic\medic.csproj

     文件        535  2008-02-19 10:52  medic\medic\medic.csproj.user

     文件    4427776  2008-02-21 20:18  medic\medic\medic.mdb

     文件     141116  2008-02-24 15:53  medic\medic\medic_main.cs

     文件     120904  2008-02-21 09:30  medic\medic\medic_main.Designer.cs

     文件     512119  2008-02-21 09:30  medic\medic\medic_main.resx

     文件       1660  2008-02-19 10:48  medic\medic\medic_TemporaryKey.pfx

     文件        598  2008-02-24 15:54  medic\medic\obj\medic.csproj.FileList.txt

     文件        469  2008-02-15 13:23  medic\medic\Program.cs

     文件       1158  2008-02-15 13:21  medic\medic\Properties\AssemblyInfo.cs

     文件       2865  2008-02-15 13:22  medic\medic\Properties\Resources.Designer.cs

     文件       5350  2008-02-15 13:22  medic\medic\Properties\Resources.resx

     文件       1814  2008-02-16 23:20  medic\medic\Properties\Settings.Designer.cs

     文件       1022  2008-02-16 23:20  medic\medic\Properties\Settings.settings

     文件       3167  2008-02-21 20:13  medic\medic\update_medic_Form.cs

     文件       8068  2008-02-21 20:13  medic\medic\update_medic_Form.Designer.cs

     文件     145684  2008-02-21 20:13  medic\medic\update_medic_Form.resx

     文件        352  2008-02-15 22:15  medic\medic\update_muluForm1.cs

     文件       1173  2008-02-15 22:15  medic\medic\update_muluForm1.Designer.cs

     文件       1872  2008-02-17 09:24  medic\medic\update_mulu_Form.cs

............此处省略17个文件信息

评论

共有 条评论