Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != "" && textBox2.Text != "")
     {
         adims_MODEL.tsyy ts = new adims_MODEL.tsyy();
         ts.D    = DateTime.Now;
         ts.Name = textBox1.Text;
         ts.Yl   = Convert.ToInt32(textBox2.Text);
         ts.Dw   = comboBox1.Text;
         ts.Yyfs = comboBox2.Text;
         tsyyList.Add(ts);
         int m = apro.addPACUyy(mzjldid, ts);
         if (m != 1)
         {
             MessageBox.Show("错误");
         }
         datagridBind();
         this.Close();
     }
 }
Ejemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)//添加
 {
     if (tbName.Text.Trim() != "" && tbYl.Text.Trim() != "")
     {
         adims_MODEL.tsyy ts = new adims_MODEL.tsyy();
         ts.D    = DateTime.Now;
         ts.Name = tbName.Text.Trim();
         ts.Yl   = Convert.ToDouble(tbYl.Text.Trim());
         ts.Dw   = cmbDW1.Text.Trim();
         ts.Yyfs = cmbYYFS1.Text.Trim();
         int m = bll.addtsyy(mzjldid, ts);
         if (m > 0)
         {
             datagridBind();
         }
     }
     else
     {
         MessageBox.Show("药品名和用量不能为空!");
     }
 }
Ejemplo n.º 3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (tbName1.Text == "")
     {
         MessageBox.Show("药名不能为空。");
         return;
     }
     if (tbYl1.Text == "")
     {
         MessageBox.Show("用量不能为空。");
         return;
     }
     else
     {
         adims_MODEL.tsyy ts = new adims_MODEL.tsyy();
         ts.D = DateTime.Now;
         if (tbName2.Text.Trim() != "" && tbYl2.Text != "")
         {
             ts.Name = tbName2.Text.Trim() + " " + tbYl2.Text.Trim()
                       + cmbDW2.Text.Trim() + "+" + tbName1.Text.Trim();
         }
         else
         {
             ts.Name = tbName1.Text.Trim();
         }
         ts.Yl   = float.Parse(tbYl1.Text);
         ts.Dw   = cmbDW1.Text;
         ts.Yyfs = comboBox2.Text;
         // tsyyList.Add(ts);
         int m = apro.addPACUyy(mzjldid, ts);
         if (m != 1)
         {
             MessageBox.Show("错误");
         }
         datagridBind();
     }
 }
Ejemplo n.º 4
0
 private void button1_Click(object sender, EventArgs e)//添加
 {
     if (tbName1.Text == "")
     {
         MessageBox.Show("药名不能为空。");
         return;
     }
     if (tbYl1.Text == "")
     {
         MessageBox.Show("用量不能为空。");
         return;
     }
     else
     {
         adims_MODEL.tsyy ts = new adims_MODEL.tsyy();
         ts.D = DateTime.Now;
         if (tbName2.Text.Trim() != "" && tbYl2.Text != "")
         {
             ts.Name = tbName2.Text.Trim() + " " + tbYl2.Text.Trim()
                       + cmbDW2.Text.Trim() + "+" + tbName1.Text.Trim();
         }
         else
         {
             ts.Name = tbName1.Text.Trim();
         }
         ts.Yl   = float.Parse(tbYl1.Text.Trim());
         ts.Dw   = cmbDW1.Text.Trim();
         ts.Yyfs = cmbYYFS1.Text.Trim();
         tsyy.Add(ts);
         int m = bll.addtsyy(mzjldid, ts);
         if (m > 0)
         {
             datagridBind();
         }
     }
 }
Ejemplo n.º 5
0
 public int addPACUyy(int mzjldid, adims_MODEL.tsyy ts)
 {
     return(dBConn.ExecuteNonQuery("INSERT INTO Adims_PACU_yyUse(mzjldid,yyname,yl,dw,yyfs,yytime) "
                                   + "values('" + mzjldid + "','" + ts.Name + "','" + ts.Yl + "','" + ts.Dw + "','" + ts.Yyfs + "','" + ts.D + "')"));
 }