public void LoadZYFeePat(DateTime beginDate, DateTime endDate, string docCode, string deptCode)
 {
     try
     {
         _patFeeDt = ZY_Loader.LoadZYPatFee(beginDate, endDate, docCode, deptCode);
         _frmzyfeequery.RefreshPatFee(_patFeeDt);
     }
     catch (Exception error)
     {
         throw error;
     }
 }
 public void LoadZYPatFee()
 {
     try
     {
         decimal patTotalFee  = 0;
         decimal patPrePayFee = 0;
         if (_currentPat != null)
         {
             _currentPatHSItemFee.Rows.Clear();
             _currentPatBigItemFee.Rows.Clear();
             _currentPatItemFee   = ZY_Loader.LoadZYPatFee(_currentPat._zyPatient);
             _currentPatPrePayFee = ZY_Loader.LoadZYPrePayFee(_currentPat._zyPatient);
             for (int index = 0; index < _currentPatPrePayFee.Rows.Count; index++)
             {
                 DataRow prePayFeeRow = _currentPatPrePayFee.Rows[index];
                 patPrePayFee += Convert.ToDecimal(prePayFeeRow["TOTAL_FEE"]);
             }
             for (int index = 0; index < _currentPatItemFee.Rows.Count; index++)
             {
                 DataRow currentRow  = _currentPatItemFee.Rows[index];
                 string  bigItemCode = currentRow["BIGITEMTYPE"].ToString();
                 string  hsCode      = currentRow["HSCODE"].ToString();
                 patTotalFee += Convert.ToDecimal(currentRow["TOTAL_FEE"]);
                 DataRow findBigItemRow = _currentPatBigItemFee.Rows.Find(bigItemCode);
                 if (findBigItemRow != null)
                 {
                     findBigItemRow["PRJFEE"] = Convert.ToDecimal(findBigItemRow["PRJFEE"])
                                                + Convert.ToDecimal(currentRow["TOTAL_FEE"]);
                 }
                 else
                 {
                     DataRow newRow = _currentPatBigItemFee.NewRow();
                     newRow["PRJCODE"] = currentRow["BIGITEMTYPE"].ToString();
                     newRow["PRJNAME"] = currentRow["BIGITEMNAME"].ToString();
                     newRow["PRJFEE"]  = Convert.ToDecimal(currentRow["TOTAL_FEE"]);
                     _currentPatBigItemFee.Rows.Add(newRow);
                 }
                 DataRow findHSItemRow = _currentPatHSItemFee.Rows.Find(hsCode);
                 if (findHSItemRow != null)
                 {
                     findHSItemRow["PRJFEE"] = Convert.ToDecimal(findHSItemRow["PRJFEE"])
                                               + Convert.ToDecimal(currentRow["TOTAL_FEE"]);
                 }
                 else
                 {
                     DataRow newRow = _currentPatHSItemFee.NewRow();
                     newRow["PRJCODE"] = currentRow["HSCODE"].ToString();
                     newRow["PRJNAME"] = currentRow["HSNAME"].ToString();
                     newRow["PRJFEE"]  = Convert.ToDecimal(currentRow["TOTAL_FEE"]);
                     _currentPatHSItemFee.Rows.Add(newRow);
                 }
             }
             _currentPat.TotalFee  = patTotalFee;
             _currentPat.PrePayFee = patPrePayFee;
             _formInterface.RefreshPatInfo(_currentPat);
         }
         _formInterface.RefreshPatFee(_currentPatItemFee,
                                      _currentPatBigItemFee, _currentPatHSItemFee);
     }
     catch (Exception error)
     {
         throw error;
     }
 }