Replace Account class by account structure

This commit is contained in:
2010-07-03 11:32:30 +02:00
parent 77de073d2e
commit 1383d22818
8 changed files with 35 additions and 35 deletions

View File

@@ -102,15 +102,15 @@ void KissCount::SetAccountAmount(int month, int year, wxString accountId, double
_db->SetAccountAmount(month, year, accountId, amount);
}
void KissCount::AddAccount(struct Account ac)
void KissCount::AddAccount(struct account ac)
{
ac.id = _db->AddAccount(_user, ac);
_user->_accounts.push_back(ac);
}
void KissCount::UpdateAccount(struct Account ac)
void KissCount::UpdateAccount(struct account ac)
{
std::vector<Account>::iterator it;
std::vector<struct account>::iterator it;
int i;
_db->UpdateAccount(ac);
@@ -119,9 +119,9 @@ void KissCount::UpdateAccount(struct Account ac)
_user->_accounts[i] = ac;
}
void KissCount::DeleteAccount(struct Account ac)
void KissCount::DeleteAccount(struct account ac)
{
std::vector<Account>::iterator it;
std::vector<struct account>::iterator it;
int i;
_db->DeleteAccount(ac);
@@ -221,7 +221,7 @@ void KissCount::ChangeName(wxString name)
void KissCount::NewUser(wxString name)
{
wxDateTime curDate;
struct Account ac = {wxT(""), wxT("Account 1"), wxT(""), false, true};
struct account ac = {wxT(""), wxT("Account 1"), wxT(""), false, true};
_db->NewUser(name);
if (_user) delete _user;

View File

@@ -33,9 +33,9 @@ class KissCount
double GetAccountAmount(wxString id, int month, int year);
void SetAccountAmount(int month, int year, wxString accountId, double value);
void AddAccount(struct Account ac);
void UpdateAccount(struct Account ac);
void DeleteAccount(struct Account ac);
void AddAccount(struct account ac);
void UpdateAccount(struct account ac);
void DeleteAccount(struct account ac);
wxString AddCategory(struct category category);
void UpdateCategory(struct category category);