welcome to brucewuu account assist
project name: brucewuu account assist
project role: leader and main developer
project technique: vs 2005 ,c/c++,MFC
project introduction: this is a little money management tool which I made to help me record all the money I spent ,and it can help me to learn how to save money .
project core code:
#pragma once
#include"jizhang.h"
#include<iostream>
#include<vector>
class AnalyzeDlg;
using namespace std;
class AFX_EXT_CLASS Recorder
{
public:
long m_ID;
CTime m_time;
CStringW m_thing;
CStringW m_kind;
long m_money;
CStringW m_mark;
};
class AFX_EXT_CLASS CubicUnit
{
private:
int m_nPos;
int m_nMoney;
CRect m_nCubeArea;
public:
static int nsMaxMoney;
static int nsMode;
CubicUnit();
~CubicUnit(){}
void SetPos(int nPos){m_nPos=nPos;}
void SetMoney(int money){m_nMoney=money;}
int GetMoney(){return m_nMoney;}
void AddMoney(int money){m_nMoney+=money;}
void SetMode(int nFlag){nsMode=nFlag;}///set mode ,DAY,MONTH,YEAR
void CalculateArea();
void Draw(CDC *pDC,CWnd *pWnd);//draw it
void DrawShape(CDC *pDC);
bool LBHit(CPoint pt);//test whether the mouse is inside of the cubic area
};
class AFX_EXT_CLASS jizhangDatabaseManager
{
public:
jizhangDatabaseManager(void);
bool AddNewRecord(CTime _ctTime ,CString _csThing,CString _csKind,long _lMoney,CString _csMark);
bool UpdateRecord(long _lID,CTime _ctTime ,CString _csThing,CString _csKind,long _lMoney,CString _csMark);
bool DeleteRecord(long _lID);
void QueryRecord(CTime _ctTime );//return the expense of this day
void SeeAllRecords();
void BeginAnalyze();
Cjizhang &GetRecorder(){return myJizhangRecorder; };
vector<Recorder> QueryRecoderOfDates(CTime _ctBeginTime,CTime _ctEndTime);
bool &GetAnalyzeStatus(){return bAnalyze;}
void MakeConclusion(CubicUnit *&pcu,int mode,int year=0,int month=0);
void Update();
public:
~jizhangDatabaseManager(void);
private:
AnalyzeDlg *pAnalyzeDlg ;
Cjizhang myJizhangRecorder;
long nRecorderID;
bool bAnalyze;
};