public ExpensesRevenuesForPeriodForm(bool type) { InitializeComponent(); this.type = type; if (type == false) { this.Text = "Витрати за період"; } else { this.Text = "Доходи за період"; } if (type == false) { labelType.Text = "витрат : "; } else { labelType.Text = "доходів : "; } sum = homeBugaltery.applyFiltersForExpensRevenues(type); updateTable(); panelDateFilter.Enabled = checkBoxDate.Checked; }
public void UpdateLabelSum() { DateTime?from; DateTime?to; if (IsIncome) { from = FilterUserControlIncomes.DateFromFilter; to = FilterUserControlIncomes.DateToFilter; } else { from = FilterUserControlOutcomes.DateFromFilter; to = FilterUserControlOutcomes.DateToFilter; } LabelSum.Content = ct + hb.applyFiltersForExpensRevenues(IsIncome, from, to).ToString("G29"); }