private void bt_save_Click(object sender, EventArgs e) { //tj_mrfz_all(); //return; if (str_dwbh == "") { return; //没有选择节点 } if (txt_fzmc.Text.Trim() == "") { MessageBox.Show("请填写分组名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); this.ActiveControl = txt_fzmc; return; } //if (lv_tjxm.Items.Count <= 0) //{ // MessageBox.Show("请选择体检项目或套餐后再保存!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); // return; //} if (str_fzbh == "")//获取分组编号 { str_fzbh = tjglbiz.Get_proc_get_tjdwfzbh(str_dwbh); txt_fzbh.Text = str_fzbh; } tjdjBiz tjblbiz1 = new tjdjBiz(); tjblbiz1.str_Delete_TJ_DWFZ_HD(str_fzbh, str_dwbh); tjblbiz1.str_Insert_TJ_DWFZ_HD(str_fzbh, str_dwbh, txt_fzmc.Text.Trim(), cmb_xb.SelectedValue.ToString().Trim(), txt_zw.Text.Trim(), txt_zc.Text.Trim()); foreach (ListViewItem item in lv_tjxm.Items) { string aa = item.Tag.ToString().Trim(); string bb = item.Text.ToString().Trim(); tjblbiz1.str_Insert_TJ_DWFZ_DT(str_fzbh, str_dwbh, aa); } tjblbiz1.Exec_ArryList(); MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); DataBind(); tv_tjdw.ExpandAll(); }