private void button1_Click(object sender, EventArgs e) { if (sss.Count < 3 || (sss.Count == 3 && sss.Contains(comboBox1.Text.Trim()))) { if (textBox1.Text != "") { adims_MODEL.mzqt mz1 = new adims_MODEL.mzqt(); mz1.Qtname = comboBox1.Text.Trim(); mz1.Yl = Convert.ToDouble(textBox1.Text); mz1.Dw = comboBox2.Text; mz1.Sysj = DateTime.Now; mz1.Bz = 1; mzqt.Add(mz1); int m = bll.addqt(mzjldid, mz1); if (m > 0) { BindQtList(); } } else { MessageBox.Show("用量不能为空"); } } else { MessageBox.Show("气体数量超标!"); } }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text != "") { adims_MODEL.mzqt mz1 = new adims_MODEL.mzqt(); mz1.Qtname = comboBox1.Text; mz1.Yl = Convert.ToDouble(textBox1.Text); mz1.Dw = comboBox2.Text; mz1.Sysj = dtStart; mz1.Bz = 1; int m = bll.addqtPACU(mzjldid, mz1); if (m > 0) { BindQtList(); } else { MessageBox.Show("添加失败"); } } else { MessageBox.Show("用量不能为空"); } }
/// <summary> /// 添加PACU气体药 /// </summary> /// <param name="mzjldid"></param> /// <param name="qt"></param> /// <returns></returns> public int InsertPACU_qt(int mzjldid, adims_MODEL.mzqt qt) { return(dBConn.ExecuteNonQuery("INSERT INTO Adims_PACU_qtUse(mzjldid,qtname,yl,dw,sytime,flags) " + "values('" + mzjldid + "','" + qt.Qtname + "','" + qt.Yl + "','" + qt.Dw + "','" + qt.Sysj + "',1)")); }