Beispiel #1
0
 private void addOtherExpenseButton_Click(object sender, EventArgs e)
 {
     if (user.getFlat().getIsManager() >= 3)
     {
         ExpenseCard expense = new ExpenseCard();
         otherExpensesList.Controls.Add(expense);
     }
 }
        public ExpenseReceipt(User user, OutgoingTransaction tr, ExpenseCard ex, MainScreen mainView) : this(mainView)
        {
            this.user = user;
            this.expenseTransaction = tr;
            this.expense            = ex;

            if (tr.getExpense().GetExpenseStatus() == ExpenseStatus.Unpaid && user.getFlat().getIsManager() >= 2)
            {
                this.setConfrimFields();
            }

            else
            {
                this.setDetailsField();
            }
        }
Beispiel #3
0
        public void addExpense() // will be called by view
        {
            ExpenseCard expense;

            if (regularActive)
            {
                expense = new ExpenseCard(this.user, ExpenseType.Regular, this.apartment, monthComboBox.SelectedItem.ToString(), Convert.ToInt32(yearComboBox.SelectedItem), this.mainView);
                expensesList.Controls.Add(expense);
            }


            else
            {
                expense = new ExpenseCard(this.user, ExpenseType.Other, this.apartment, monthComboBox.SelectedItem.ToString(), Convert.ToInt32(yearComboBox.SelectedItem), this.mainView);
                otherExpensesList.Controls.Add(expense);
            }

            expense.BringToFront();
            expenses.Add(expense);

            expense.Focus();
            // ExpenseDetails expDetails = new ExpenseDetails(expense,apartment,monthComboBox.SelectedItem.ToString(), Convert.ToInt32(yearComboBox.SelectedItem));
        }