public ChartsSheetService(BudgetDto budget, ILogger log)
        {
            _budget = budget ?? throw new ArgumentNullException(nameof(budget));
            _log    = log;

            int rowsNumber = 5 + _budget.Categories.Count + 54;
            int colsNumber = 7;

            _googleSheetService = new GoogleSheetService("Charts", 2, rowsNumber, colsNumber, 0, 0, true, GetSheetsColor());
            _googleSheetService.SetRowHeight(0, 50);
            _googleSheetService.AddProtectedRanges(0, 2, 1, 3 + _budget.Categories.Count);
        }
Пример #2
0
        public DashboardSheetService(BudgetDto budget)
        {
            _budget = budget ?? throw new ArgumentNullException(nameof(budget));

            int rowsNumber = 3 + (_budget.Categories.Count * 2) + _budget.Subcategories.Count;
            int colsNumber = 4;

            _googleSheetService = new GoogleSheetService("Dashboard", 0, rowsNumber, colsNumber, 0, 2, true, GetSheetsColor());
            _subcategoryRows    = new List <Model.DTOs.GoogleSpreadsheet.DashboardSubcategoryRowDto>();
            _googleSheetService.SetRowHeight(0, 50);
            _googleSheetService.AddProtectedRanges(0, 4, 1, rowsNumber);
        }