private void button1_Click(object sender, EventArgs e) { if (tbYl.Text.Trim() != "" && tbYpName.Text.Trim() != "") { //DataTable dt = bll.GetsqyyUse(mzjldid); //if (dt.Rows.Count>0) //{ SqyyUse yy = new SqyyUse(); yy.MzjldId = mzjldid; yy.YpName = tbYpName.Text.Trim(); yy.Yyfs = cmbYyfs.Text.Trim(); yy.Yl = tbYl.Text.Trim(); yy.Dw = cmbDw.Text.Trim(); yy.UseTime = dtUseTime.Value; int m = bll.InsertIntoSQYY(yy); if (m > 0) { DataBind(); } //} } else { MessageBox.Show("药品名字和药品剂量不能为空"); } }
private void button4_Click(object sender, EventArgs e) { SqyyUse yy = new SqyyUse(); yy.MzjldId = mzjldid; yy.YpName = "鲁米那"; yy.Yyfs = "肌注"; yy.Yl = "0.1"; yy.Dw = "g"; yy.UseTime = DateTime.Now; SqyyUse yy2 = new SqyyUse(); yy2.MzjldId = mzjldid; yy2.YpName = "鲁米那"; yy2.Yyfs = "肌注"; yy2.Yl = "0.1"; yy2.Dw = "g"; yy2.UseTime = DateTime.Now; int m = bll.InsertIntoSQYY(yy); int n = bll.InsertIntoSQYY(yy2); if (m > 0 || n > 0) { DataBind(); } }