示例#1
0
        private void btntransbed_Click(object sender, EventArgs e)
        {
            string       bedno = cmbnobed.SelectedValue.ToString();
            string       str   = "您确定将病人" + patname + "从【" + sourcebedno + "】号床转到【" + bedno + "】号床吗?";
            DialogResult dr    = MessageBox.Show(str, "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dr == DialogResult.Yes)
            {
                bool transresult = op_bed.setTransbed(bedid, bedno, deptid, patlistid);
                if (transresult == true)
                {
                    MessageBox.Show("科内转床成功!", "提示", MessageBoxButtons.OK);
                }
                else
                {
                    MessageBox.Show("科内转床失败,该床位可能已被占用,请退出重试!", "提示", MessageBoxButtons.OK);
                }
                cmbnobed.DataSource = op_bed.getBedNotAssign(Convert.ToInt32(deptid));
                this.Close();
            }
            else
            {
                return;
            }
        }
示例#2
0
        /// <summary>
        /// 转床操作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btntransbed_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());
            string       patname   = dataGridViewEx3[Column14.Name, rownum].Value.ToString();
            string       currbedno = dataGridViewEx3[Column13.Name, rownum].Value.ToString();
            string       bedno     = cmbnobed.SelectedValue.ToString();
            string       str       = "您确定将病人" + patname + "从【" + currbedno + "】号床转到【" + bedno + "】号床吗?";
            DialogResult dr        = MessageBox.Show(str, "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dr == DialogResult.Yes)
            {
                bool transresult = op_bed.setTransbed(bedid, bedno, _currentDept.DeptID, patlistid);
                if (transresult == true)
                {
                    MessageBox.Show("科内转床成功!", "提示", MessageBoxButtons.OK);
                }
                else
                {
                    MessageBox.Show("科内转床失败,该床位可能已被占用,请退出重试!", "提示", MessageBoxButtons.OK);
                }
                dataGridViewEx1.DataSource = op_bed.getPatNotAssignBed(Convert.ToInt32(currentDept.DeptID));
                dataGridViewEx2.DataSource = op_bed.getBedNotAssign(Convert.ToInt32(currentDept.DeptID));
                dataGridViewEx3.DataSource = op_bed.getBedAssignInfo(Convert.ToInt32(currentDept.DeptID));
                cmbnobed.DataSource        = op_bed.getBedNotAssign(Convert.ToInt32(currentDept.DeptID));
            }
            else
            {
                return;
            }
        }