/// <summary> /// 修改操作 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnalter_Click(object sender, EventArgs e) { int rownum = dataGridViewEx3.CurrentCell.RowIndex; int bedid = Convert.ToInt32(dataGridViewEx3[Column16.Name, rownum].Value.ToString()); int patlistid = Convert.ToInt32(dataGridViewEx3[Column21.Name, rownum].Value.ToString()); if (jzdoc.Checked == true) { bool jzresult = op_bed.updatejzdoc(bedid, economydoc, patlistid); if (jzresult == true) { MessageBox.Show("主管医生修改成功!", "提示", MessageBoxButtons.OK); queryTextBox2.Text = ""; } else { MessageBox.Show("主管医生修改失败!", "提示", MessageBoxButtons.OK); queryTextBox2.Text = ""; } } else { bool zzresult = op_bed.updatezzdoc(bedid, economydoc); if (zzresult == true) { MessageBox.Show("主治医生修改成功!", "提示", MessageBoxButtons.OK); queryTextBox2.Text = ""; } else { MessageBox.Show("主治医生修改失败!", "提示", MessageBoxButtons.OK); queryTextBox2.Text = ""; } } }
private void btnalter_Click(object sender, EventArgs e) { if (queryTextBox2.Text == "") { MessageBox.Show("您还未录入主管医生,请录入完整后再进行操作", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.queryTextBox2.Focus(); return; } else { economydoc = int.Parse(queryTextBox2.MemberValue.ToString()); } bool jzresult = op_bed.updatejzdoc(bedid, economydoc, patlistid); if (jzresult == true) { MessageBox.Show("主管医生修改成功!", "提示", MessageBoxButtons.OK); queryTextBox2.Text = ""; this.Close(); } else { MessageBox.Show("主管医生修改失败!", "提示", MessageBoxButtons.OK); queryTextBox2.Text = ""; } }