Exemple #1
0
        private void CheckPreID(string PreID)
        {
            StringBuilder str = new StringBuilder();

            str.Append(" select PrescriptionID  from Prescription where PrescriptionID= '" + PreID + "' ");
            str.Append(" select PrescriptionID from IVRecord where LabelNo='" + PreID + "'");
            DataTable dt  = DB.GetPIVAsDB(str.ToString()).Tables[0];
            DataTable dt1 = DB.GetPIVAsDB(str.ToString()).Tables[1];

            if (dt.Rows.Count == 0 || dt == null)
            {
                if (dt1.Rows.Count == 0 || dt1 == null)
                {
                    MessageBox.Show("不存在此瓶签号/医嘱号");
                    textBox1.Controls.Clear();
                }
                else
                {
                    splitContainer1.Panel2.Controls.Clear();
                    PreInformation p = new PreInformation(dt1.Rows[0][0].ToString(), PreID);
                    splitContainer1.Panel2.Controls.Add(p);
                    p.Dock = System.Windows.Forms.DockStyle.Fill;
                }
            }
            else
            {
                splitContainer1.Panel2.Controls.Clear();
                PreInformation p = new PreInformation(dt.Rows[0][0].ToString());
                splitContainer1.Panel2.Controls.Add(p);
                p.Dock = System.Windows.Forms.DockStyle.Fill;
            }
        }
Exemple #2
0
 private void textBox1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyValue == 13)
     {
         if (textBox1.Text == "")
         {
             PreInformation p1 = new PreInformation();
             splitContainer1.Panel2.Controls.Add(p1);
         }
         else
         {
             CheckPreID(textBox1.Text);
         }
     }
 }
Exemple #3
0
        private void ErrorAdd_Load(object sender, EventArgs e)
        {
            LordTapAdd();
            //ErrorCode();
            PreInformation p1 = new PreInformation();

            p1.Dock = System.Windows.Forms.DockStyle.Fill;
            splitContainer1.Panel2.Controls.Add(p1);
            //tag2_Lord();\
            if (UserID != string.Empty)
            {
                string  str = "select DEmployeeName from DEmployee where DEmployeeID= '" + UserID + "'";
                DataSet ds  = DB.GetPIVAsDB(str);
                textErrorName.Text = ds.Tables[0].Rows[0][0].ToString();
            }
        }