Esempio n. 1
0
 /// <summary>
 /// 取消分床
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnCancelBedAssgin_Click(object sender, EventArgs e)
 {
     if (type == null)
     {
         MessageBox.Show("请您选择一个在床病人后再进行相应的操作!", "提示", MessageBoxButtons.OK);
         return;
     }
     if (type == typeof(ZY_PatList))
     {
         HIS.ZY_BLL.ObjectModel.CostManager.IcostManager IcM = HIS.ZY_BLL.ObjectModel.ObjectFactory.GetObject <HIS.ZY_BLL.ObjectModel.CostManager.IcostManager>(typeof(HIS.ZY_BLL.DataModel.ZY_CostMaster));
         IcM.PatListID = Convert.ToInt32(patlistid);
         decimal costfee = IcM.GetPatFee().costFee;
         if (costfee == Convert.ToDecimal(0))
         {
             bool cancelResult = op_bed.cancelAssign(patlistid);
             if (cancelResult == true)
             {
                 MessageBox.Show("取消分配成功", "提示", MessageBoxButtons.OK);
                 //op_bed.updateBedFlag(Convert.ToInt32(patlistid));
                 listView1.Clear();
                 CreateBedView();
                 type = null;
             }
             else
             {
                 MessageBox.Show("取消分配床位失败,该病人已存在医嘱,不允许取消分床", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
         }
         else
         {
             MessageBox.Show("取消分配床位失败,该病人已产生记账费用,不允许取消分床", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
     else
     {
         MessageBox.Show("您选择的是空床,请选择一个有病人的床进行操作!", "提示", MessageBoxButtons.OK);
         return;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 病人床位分配取消
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CancelAssign_Click(object sender, EventArgs e)
 {
     if (dataGridViewEx3.Rows.Count > 0)
     {
         int  rownum    = dataGridViewEx3.CurrentCell.RowIndex;
         long bedid     = Convert.ToInt64(dataGridViewEx3[Column16.Name, rownum].Value.ToString());
         long patlistid = Convert.ToInt64(dataGridViewEx3[Column21.Name, rownum].Value.ToString());
         HIS.ZY_BLL.ObjectModel.CostManager.IcostManager IcM = HIS.ZY_BLL.ObjectModel.ObjectFactory.GetObject <HIS.ZY_BLL.ObjectModel.CostManager.IcostManager>(typeof(HIS.ZY_BLL.DataModel.ZY_CostMaster));
         IcM.PatListID = Convert.ToInt32(patlistid);
         decimal costfee = IcM.GetPatFee().costFee;
         if (costfee == Convert.ToDecimal(0))
         {
             bool cancelResult = op_bed.cancelAssign(patlistid);
             if (cancelResult == true)
             {
                 MessageBox.Show("取消分配成功", "提示", MessageBoxButtons.OK);
                 op_bed.updateBedFlag(Convert.ToInt32(patlistid));
                 cmbnobed.DisplayMember     = "bed_no";
                 cmbnobed.ValueMember       = "bed_no";
                 cmbnobed.DataSource        = op_bed.getBedNotAssign(Convert.ToInt32(currentDept.DeptID));
                 dataGridViewEx3.DataSource = op_bed.getBedAssignInfo(Convert.ToInt32(currentDept.DeptID));
             }
             else
             {
                 MessageBox.Show("取消分配床位失败,该病人已存在医嘱,不允许取消分床", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
         }
         else
         {
             MessageBox.Show("取消分配床位失败,该病人已产生记账费用,不允许取消分床", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
     else
     {
         MessageBox.Show("床位分配表已为空,床位取消操作即将退出!", "提示", MessageBoxButtons.OK);
         return;
     }
 }