Ejemplo n.º 1
0
        /// <summary>
        /// Refresh the Employer group from Excel file
        /// </summary>
        /// <returns></returns>
        public ExceptionTypes StartEGHPExcelProcess()
        {
            ExceptionTypes result       = ExceptionTypes.Success;
            DataTable      dataTable    = new DataTable();
            string         fileName     = CacheUtility.GetConfigrationValueByConfigName(ConstantTexts.EGHPExclusionFileName);
            string         errorMessage = string.Empty;

            try
            {
                ReadAsDataTable(fileName, out dataTable, out errorMessage);
                if (dataTable != null && dataTable.Rows.Count > 0)
                {
                    result = _BLCommon.EGHPExcelProcess(dataTable, out errorMessage);
                }
                else
                {
                    BLCommon.LogError(_lCurrentMasterUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPFDRSubmission, (long)ExceptionTypes.Uncategorized, "Error in EGHP File", errorMessage);
                }
                if (result != ExceptionTypes.Success)
                {
                    BLCommon.LogError(_lCurrentMasterUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPFDRSubmission, (long)ExceptionTypes.Uncategorized, errorMessage, errorMessage);
                }
            }
            catch (Exception ex)
            {
                BLCommon.LogError(_lCurrentMasterUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPFDRSubmission, (long)ExceptionTypes.Uncategorized, "Exception EGHP Exclusion Excel", ex.StackTrace.ToString());
            }

            return(result);
        }