private void button1_Click(object sender, EventArgs e) { if (txtRid.Text == "") { PromptingForm pf = new PromptingForm("没有要结账病人信息!"); pf.ShowDialog(); return; } if (textBox6.Text == "") { PromptingForm pm = new PromptingForm("付款金额不足!"); pm.ShowDialog(); return; } if (int.Parse(textBox6.Text) < 0) { PromptingForm pm = new PromptingForm("付款金额不足!"); pm.ShowDialog(); return; } prom_Form p = new prom_Form("确定结账", this); p.ShowDialog(); if (this.Tag + "" == "OK") { new IdCard_BLL().p_kaiyao_update(txtRid.Text); PromptingForm pp = new PromptingForm("结账成功!请到药房取药!"); pp.ShowDialog(); zhuayuantongji zhu = new zhuayuantongji(); zhu.Kid = (txtRid.Text); zhu.Sname = cboroom.Text; zhu.time = DateTime.Now + ""; zhu.ymoney = int.Parse(textBox4.Text); zhu.zmoney = 0; new IdCard_BLL().p_zhuayuantongji_select(zhu); maidanForm_Load(null, null); foreach (Control item in groupBox3.Controls) { if (item is TextBox || item is ComboBox) { item.Text = ""; } } listView2.Items.Clear(); } //************************************************* }
private void button8_Click(object sender, EventArgs e) { if (lvwselect.SelectedItems.Count > 0) { prom_Form p = new prom_Form("确定要删除?", this); p.ShowDialog(); if (this.Tag + "" == "OK") { new IdCard_BLL().p_zhuyuanxiaofei_delete(int.Parse(txtId.Text), lvwselect.SelectedItems[0].Text); lvwselect.Items.RemoveAt(lvwselect.SelectedItems[0].Index); this.Tag = ""; } } }