Exemplo n.º 1
0
        /// <summary>
        /// Are all relevant columns in this row blank?
        /// </summary>
        /// <param name="dr"></param>
        /// <returns></returns>
        public static bool RowIsBlank(DataRow dr)
        {
            var columnsToCheck  = FbmsBudgetStageImportPayrecV3UnexpendedBalances.GetBudgetColumnLetterToColumnNameDictionary().Keys.ToList();
            var allColumnsBlank = columnsToCheck.All(col => String.IsNullOrWhiteSpace(dr[col].ToString()));

            return(allColumnsBlank);
        }
Exemplo n.º 2
0
        public FbmsBudgetStageImportPayrecV3UnexpendedBalance(KeyValuePair <int, DataRow> keyValuePair)
        {
            var rowIndex = keyValuePair.Key;
            var dr       = keyValuePair.Value;
            var columnNameToLetterDict = FbmsBudgetStageImportPayrecV3UnexpendedBalances.GetBudgetColumnNameToColumnLetterDictionary();

            // Column - Business Area Key
            BusinessArea = ExcelColumnHelper.GetStringDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.BusinessAreaKey);

            // Column - FA Budget Activity Key
            FABudgetActivity = ExcelColumnHelper.GetStringDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.FaBudgetActivityKey);

            // Column - Functional Area Text
            FunctionalArea = ExcelColumnHelper.GetStringDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.FunctionalAreaText);

            // Column - Obligation Number Key
            ObligationNumber = ExcelColumnHelper.GetStringDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.ObligationNumberKey);

            // Column - Obligation Item Key
            ObligationItem = ExcelColumnHelper.GetStringDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.ObligationItemKey);

            // Column - Fund Key
            Fund = ExcelColumnHelper.GetStringDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.FundKey);

            // Column - WBS Element Key
            WbsElement = ExcelColumnHelper.GetStringDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.WbsElementKey);

            // Column - Funded Program (Really an alternate name for the Name of the WBS element. It's named this because of reporting engine limitations on Dorothy's side.)
            WbsElementDescription = ExcelColumnHelper.GetStringDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.FundedProgramKey);

            // Column - Budget Object Class Key
            BudgetObjectClass = ExcelColumnHelper.GetStringDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.BudgetObjectClassKey);

            // Column - Vendor Key
            Vendor = ExcelColumnHelper.GetStringDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.VendorKey);

            // Column - Vendor Key
            VendorName = ExcelColumnHelper.GetStringDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.VendorNameText);

            // Column - Posting Date (Per SPL) - Key
            PostingDatePerSpl = ExcelColumnHelper.GetDateTimeDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.PostingDatePerSplKey, ExcelColumnHelper.ExcelDateTimeCellType.SerialDateTimeValue);

            // Column - Unexpended Balance
            UnexpendedBalance = ExcelColumnHelper.GetDoubleDataValueForColumnName(dr, rowIndex, columnNameToLetterDict, FbmsBudgetStageImportPayrecV3UnexpendedBalances.UnexpendedBalanceValue);
        }