Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (sss.Count < 3 || (sss.Count == 3 && sss.Contains(cmbName.Text.Trim())))
     {
         if (cmbName.Text != "" && tbYL.Text.Trim() != "")
         {
             adims_MODEL.Yongyao mz1 = new adims_MODEL.Yongyao();
             mz1.Name   = cmbName.Text.Trim();
             mz1.Yl     = Convert.ToDouble(tbYL.Text);
             mz1.Dw     = cmbDW.Text;
             mz1.KsTime = DateTime.Now;
             mz1.Bz     = 1;
             mz1.YpType = 1;
             int m = bll.addYongyaoList1(mzjldid, mz1);
             if (m > 0)
             {
                 BindQtList();
             }
         }
         else
         {
             MessageBox.Show("用量和药名不能为空");
         }
     }
     else
     {
         MessageBox.Show("气体数量超标!");
     }
 }
Ejemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (sss.Count < 2 || (sss.Count == 2 && sss.Contains(tbName.Text.Trim())))
     {
         if (tbName.Text.Trim() != "" && tbJL.Text.Trim() != "")
         {
             adims_MODEL.Yongyao jmy = new adims_MODEL.Yongyao();
             jmy.Bz     = 1;
             jmy.YpType = 3;
             jmy.Name   = tbName.Text.Trim();
             jmy.Yl     = Convert.ToDouble(tbJL.Text.Trim());
             jmy.Cxyy   = cbCXYY.Checked;
             jmy.Dw     = cmbDW.Text;
             jmy.Yyfs   = cmbZRFS.Text;
             jmy.KsTime = DateTime.Now;
             int q = bll.addYongyaoList2(mzjldid, jmy);
             if (q > 0)
             {
                 BindJMYList();
             }
         }
         else
         {
             MessageBox.Show("药名,剂量不能为空");
         }
     }
     else
     {
         MessageBox.Show("局麻药数量超标");
     }
 }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (sss.Count < 20 || (sss.Count == 20 && sss.Contains(tbName.Text.Trim())))
            {
                if (string.IsNullOrEmpty(tbName.Text.Trim()))
                {
                    MessageBox.Show("药名称不能为空!");
                    tbName.Focus();
                    return;
                }
                else if (string.IsNullOrEmpty(tbYL.Text.Trim()))
                {
                    MessageBox.Show("用量不能为空!");
                    tbYL.Focus();
                    return;
                }
                else
                {
                    int m = 0;
                    adims_MODEL.Yongyao ydy = new adims_MODEL.Yongyao();
                    ydy.YpType = 2;
                    ydy.Name   = tbName.Text.Trim();
                    ydy.Yl     = Convert.ToDouble(tbYL.Text.Trim());
                    ydy.Dw     = cmbDW.Text.Trim();
                    ydy.Yyfs   = cmbYYFS.Text.Trim();
                    ydy.Cxyy   = cbCXYY.Checked;
                    ydy.KsTime = DateTime.Now;
                    if (cbCXYY.Checked)
                    {
                        ydy.Bz = 1;
                        m      = bll.addYongyaoList1(mzjldID, ydy);
                    }
                    else
                    {
                        ydy.Bz = 2; ydy.JsTime = ydy.KsTime;
                        m      = bll.addYongyaoList2(mzjldID, ydy);
                    }

                    if (m > 0)
                    {
                        tbName.Text = "";
                        BindYdyList();
                    }
                    else
                    {
                        MessageBox.Show(ydy.Name + "—添加失败请重试!");
                    }
                }
            }
            else
            {
                MessageBox.Show("全麻药区域标记数超标,请添加到其他用药。");
            }
        }
Ejemplo n.º 4
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (syList.Count < 4 || (syList.Count == 4 && syList.Contains(cmbName.Text.Trim())))
     {
         if (tbYL.Text != "" && cmbName.Text.Trim() != "")
         {
             adims_MODEL.Yongyao sx1 = new adims_MODEL.Yongyao();
             sx1.Bz       = 1;
             sx1.YpType   = 5;
             sx1.Name     = cmbName.Text;
             sx1.Yl       = Convert.ToDouble(tbYL.Text);
             sx1.Dw       = cmbDW.Text;
             sx1.Yyfs     = cmbZRFS.Text;
             sx1.Cxyy     = cbCXYY.Checked;
             sx1.KsTime   = ksTime;
             sx1.Hxb      = txthxb.Text;
             sx1.Xuejiang = txtxuejiang.Text;
             sx1.Quanxue  = txtquanxue.Text;
             int m = 0;
             if (cbCXYY.Checked)
             {
                 sx1.Bz = 1;
                 m      = bll.addYongyaoList1(mzjldID, sx1);
             }
             else
             {
                 sx1.Bz = 2; sx1.JsTime = sx1.KsTime;
                 m      = bll.addYongyaoList2(mzjldID, sx1);
             }
             if (m > 0)
             {
                 BindShuxueList();
             }
             else
             {
                 MessageBox.Show(sx1.Name + "—添加失败请重试!");
             }
         }
         else
         {
             MessageBox.Show("剂量、输血名不能为空");
         }
     }
     else
     {
         MessageBox.Show("输血标记超标,请到其他用药处添加。");
     }
 }
Ejemplo n.º 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (syList.Count < 7 || (syList.Count == 7 && syList.Contains(cmbName.Text.Trim())))
            {
                if (tbYL.Text != "" && cmbName.Text.Trim() != "")
                {
                    adims_MODEL.Yongyao sy1 = new adims_MODEL.Yongyao();
                    sy1.Bz     = 1;
                    sy1.YpType = 4;
                    sy1.Name   = cmbName.Text;
                    sy1.Yl     = Convert.ToDouble(tbYL.Text);
                    sy1.Dw     = cmbDW.Text;
                    sy1.Yyfs   = cmbZRFS.Text;
                    sy1.Cxyy   = cbCXYY.Checked;
                    sy1.KsTime = ksTime;
                    int m = 0;
                    if (cbCXYY.Checked)
                    {
                        sy1.Bz = 1;
                        m      = bll.addYongyaoList1(mzjldID, sy1);
                    }
                    else
                    {
                        sy1.Bz = 2; sy1.JsTime = sy1.KsTime;
                        m      = bll.addYongyaoList2(mzjldID, sy1);
                    }

                    if (m > 0)
                    {
                        BindShuyeList();
                    }
                    else
                    {
                        MessageBox.Show(sy1.Name + "—添加失败请重试!");
                    }
                }
                else
                {
                    MessageBox.Show("剂量、液体名不能为空");
                }
            }
            else
            {
                MessageBox.Show("输液用量超标,请到其他用药出添加");
            }
        }
Ejemplo n.º 6
0
        private void btnBagUse_Click(object sender, EventArgs e)
        {
            DataTable dt = _YaopinDal.GetYaoPinBagByBagName(this.cmbBagName.Text.Trim());

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (sss.Count < 20 || (sss.Count == 20 && sss.Contains(dt.Rows[i]["ypname"].ToString())))
                {
                    int m = 0;
                    adims_MODEL.Yongyao ydy = new adims_MODEL.Yongyao();
                    ydy.YpType = 2;
                    ydy.Name   = dt.Rows[i]["ypname"].ToString();
                    ydy.Yl     = Convert.ToDouble(dt.Rows[i]["yl"]);
                    ydy.Dw     = Convert.ToString(dt.Rows[i]["dw"]);
                    ydy.Yyfs   = Convert.ToString(dt.Rows[i]["zrff"]);
                    int cxyy = Convert.ToInt32(dt.Rows[i]["cxyy"]);
                    ydy.KsTime = DateTime.Now;
                    if (cxyy == 1)
                    {
                        ydy.Cxyy = true;
                        ydy.Bz   = 1;
                        m        = bll.addYongyaoList1(mzjldID, ydy);
                    }
                    else
                    {
                        ydy.Cxyy   = false;
                        ydy.Bz     = 2;
                        ydy.JsTime = ydy.KsTime;
                        m          = bll.addYongyaoList2(mzjldID, ydy);
                    }
                    if (m > 0 && !sss.Contains(ydy.Name))
                    {
                        sss.Add(ydy.Name);
                    }
                }
                else
                {
                    MessageBox.Show("全麻药区域标记数超标," + dt.Rows[i]["ypname"].ToString() + " 未添加成功!");
                }
            }
            BindYdyList();
        }
Ejemplo n.º 7
0
 private void button1_Click(object sender, EventArgs e)//添加
 {
     if (tbName.Text.Trim() != "" && tbYl.Text.Trim() != "")
     {
         adims_MODEL.Yongyao ts = new adims_MODEL.Yongyao();
         ts.YpType = 6;
         ts.KsTime = DateTime.Now;
         ts.JsTime = ts.KsTime;
         ts.Name   = tbName.Text.Trim();
         ts.Yl     = Convert.ToDouble(tbYl.Text.Trim());
         ts.Dw     = cmbDW1.Text.Trim();
         ts.Yyfs   = cmbYYFS1.Text.Trim();
         ts.Y_zb   = 370;
         int m = bll.addYongyaoList2(mzjldid, ts);
         if (m > 0)
         {
             datagridBind();
         }
     }
     else
     {
         MessageBox.Show("药品名和用量不能为空!");
     }
 }