Пример #1
0
        public ItemWindow()
        {
            InitializeComponent();

            CategoryManager catMan = new CategoryManager();
            incomes = catMan.GetAllIncomes();
            outgoes = catMan.GetAllOutgoes();

            categComboBox.DataSource = incomes;
            btnOk.DialogResult = DialogResult.None;

            rbtnIncome.Text = TypeEnum.Income.ToString();
            rbtnOutgo.Text = TypeEnum.Outgo.ToString();

            datePicker.MaxDate = DateTime.Now;
        }
Пример #2
0
        public FilterWindow()
        {
            InitializeComponent();

            tmp = new Category();
            tmp.Name = "...";

            CategoryManager catMan = new CategoryManager();
            incomes = catMan.GetAllIncomes();
            incomes.Add(tmp);
            outgoes = catMan.GetAllOutgoes();
            outgoes.Add(tmp);
            all = catMan.GetAllIncomes();
            all.AddRange(catMan.GetAllOutgoes());
            all.Add(tmp);

            categComboBox.DataSource = all;
            categComboBox.SelectedItem = tmp;

            pickerTo.MaxDate = DateTime.Now.Date;
        }