Exemple #1
0
 /// <summary>
 /// 将符合条件的未归档病人病历归档
 /// </summary>
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2012-12-23</date>
 /// <param name="noofinpat"></param>
 public static void SetRecordsRebacked(int noofinpat)
 {
     try
     {
         DataTable dt = DS_SqlService.GetAllRecordsByNoofinpat(noofinpat);
         if (null == dt || dt.Rows.Count == 0)
         {
             DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("该病人没有病历,无法归档。");
             return;
         }
         if (DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("您是否要归档该病历?", "归档病历", DrectSoft.Common.Ctrs.DLG.MyMessageBoxButtons.YesNo) == DialogResult.No)
         {
             return;
         }
         if (CheckRecordRebacked(noofinpat.ToString()))
         {
             int num = DS_SqlService.SetRecordsRebacked(noofinpat.ToString());
             if (num > 0)
             {
                 DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("归档成功");
                 return;
             }
         }
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("该病人已归档。");
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
 //归档
 private void btn_reback_Click(object sender, EventArgs e)
 {
     try
     {
         int fouceRowIndex = dbGridView.FocusedRowHandle;
         if (fouceRowIndex < 0)
         {
             dbGrid.Focus();
             SqlUtil.App.CustomMessageBox.MessageShow("请选择一条病人记录");
             return;
         }
         DataRow foucesRow = dbGridView.GetDataRow(fouceRowIndex);
         if (null == foucesRow || null == foucesRow["NOOFINPAT"])
         {
             return;
         }
         int    noofinpat  = int.Parse(foucesRow["NOOFINPAT"].ToString().Trim());
         string statusname = foucesRow["GDZT"].ToString().Trim();
         if (!(statusname == "已提交" || statusname == "补写提交" || statusname == "撤销归档"))
         {
             DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("该状态病历不能直接归档");
             return;
         }
         #region 注释验证是否有病例
         //DataTable dt = DS_SqlService.GetRecordsByNoofinpat(noofinpat);
         //if (null == dt || dt.Rows.Count == 0)
         //{
         //    Common.Ctrs.DLG.MessageBox.Show(foucesRow["NAME"] + " 没有病历,无法归档。");
         //    return;
         //}
         #endregion
         if (DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("您确定要归档 " + foucesRow["NAME"] + " 的病历吗?", "归档病历", DrectSoft.Common.Ctrs.DLG.MyMessageBoxButtons.YesNo) == DialogResult.No)
         {
             return;
         }
         // DS_BaseService.CheckRecordRebacked(noofinpat.ToString())
         if (foucesRow["islock"].ToString() != "4701")
         {
             int num = DS_SqlService.SetRecordsRebacked(noofinpat.ToString());
             if (num > 0)
             {
                 DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("归档成功");
                 dbGridView.DeleteRow(dbGridView.FocusedRowHandle);
                 return;
             }
         }
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("该病人已归档。");
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
Exemple #3
0
        /// <summary>
        /// 病历归档事件
        /// <auth>Yanqiao.Cai</auth>
        /// <date>2011-11-05</date>
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_reback_Click(object sender, EventArgs e)
        {
            try
            {
                int fouceRowIndex = gridviewRecordNoOnFile.FocusedRowHandle;
                if (fouceRowIndex < 0)
                {
                    gridControlRecordNoOnFile.Focus();
                    SqlUtil.App.CustomMessageBox.MessageShow("请选择一条病人记录");
                    return;
                }
                DataRow foucesRow = gridviewRecordNoOnFile.GetDataRow(fouceRowIndex);
                if (null == foucesRow || null == foucesRow["NOOFINPAT"])
                {
                    return;
                }
                int noofinpat = int.Parse(foucesRow["NOOFINPAT"].ToString().Trim());

                DataTable dt = DS_SqlService.GetRecordsByNoofinpat(noofinpat);
                if (null == dt || dt.Rows.Count == 0)
                {
                    DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(foucesRow["NAME"] + " 没有病历,无法归档。");
                    return;
                }
                if (DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("您确定要归档 " + foucesRow["NAME"] + " 的病历吗?", "归档病历", DrectSoft.Common.Ctrs.DLG.MyMessageBoxButtons.YesNo) == DialogResult.No)
                {
                    return;
                }
                if (DS_BaseService.CheckRecordRebacked(noofinpat.ToString()))
                {
                    int num = DS_SqlService.SetRecordsRebacked(noofinpat.ToString());
                    if (num > 0)
                    {
                        DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("归档成功");
                        gridviewRecordNoOnFile.DeleteRow(gridviewRecordNoOnFile.FocusedRowHandle);
                        return;
                    }
                }
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("该病人已归档。");
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
            }
        }
Exemple #4
0
 /// <summary>
 /// 归档
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_reback_Click(object sender, EventArgs e)
 {
     try
     {
         int fouceRowIndex = gvInpatient.FocusedRowHandle;
         if (fouceRowIndex < 0)
         {
             gcInpatient.Focus();
             SqlUtil.App.CustomMessageBox.MessageShow("请选择一条病人记录");
             return;
         }
         DataRow foucesRow = gvInpatient.GetDataRow(fouceRowIndex);
         if (null == foucesRow || null == foucesRow["NOOFINPAT"])
         {
             return;
         }
         int noofinpat = int.Parse(foucesRow["NOOFINPAT"].ToString().Trim());
         if (DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("您确定要归档 " + foucesRow["NAME"] + " 的病历吗?", "归档病历", DrectSoft.Common.Ctrs.DLG.MyMessageBoxButtons.YesNo) == DialogResult.No)
         {
             return;
         }
         // DS_BaseService.CheckRecordRebacked(noofinpat.ToString())
         if (foucesRow["islock"].ToString() != "4701")
         {
             int num = DS_SqlService.SetRecordsRebacked(noofinpat.ToString());
             if (num > 0)
             {
                 DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("归档成功");
                 gvInpatient.DeleteRow(gvInpatient.FocusedRowHandle);
                 return;
             }
         }
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("该病人已归档。");
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("归档操作失败" + ex.Message);
         return;
     }
 }