C2_Presentation

Download Report

Transcript C2_Presentation

Programming Language: C++ Part
Main topic
1.
2.
3.
4.
5.
What Library and tool do we choose to
implement C++ & GUI?
The progress of our implement data file
and System Design.
Detail implement of our algorithm.
Show the program which we finished.
The Problem we solve and can not solved.
Programming Language:
C++ Version: 2nd Version.
Type of User-Interface: GUI – Mode. ( Windows base)
Operating System :
Microsoft Windows
Compiling software:
Microsoft Visual C++ 6.0
Related Class:
1.
2.
3.
4.
5.
6.
7.
CHerbsSystemApp
CHerbsSystemDlg
CAboutDlg
CAllPatientTab
CPatientDetailTab
CCaseHistoryTab
CAllMedicineTab
8. CAllNutritionTab
9. CMedicineDetailTab
10. CNutritionDetailTab
11. CUseMedicineTab
12. CHSRecordSetP
13. CHSRecordSetM
14. CHSRecordSetN
Related Data Files: Microsoft Access Database file:
HerbsSystem.mdb
1. What Library and tool do we
choose to implement C++ & GUI?
too hard
1. C++
+
Win API (SDK)
SP6
2. C++
3. C++
+
+
MFC (VC6)
.net
More online
resource
too new
4. C++
+
C++ Builder
fewer online
resource
2. The progress of our implement
data file and System Design.
Three Attempt
MFC
(GUI)
MFC
(GUI)
MFC
(GUI)
+
+
+
Pure C++
(text file)
MFC
(text file)
MFC
(ODBC)
Microsoft
Access file
Many errors
STL?
OK
Difficult to manage
large data
Microsoft VC6
does not support
well
System Design by C++
First Attempt:
Difficult of MFC(GUI) plus Pure C++
+
1. Have include
header file error.
2. Many cin, cout
need to clear.
3. The interface of
the class hard to
call.
Just use text mode?
MFC
(GUI)
+
Pure C++
(text file)
System Design by C++
Second Attempt : Header file
MFC
(GUI)
+
Difficult to manage many data (Patient,
Medicine and nutrition)
MFC
(text file)
System Design by C++
Second Attempt : data file
• PatientRecord.dat
•
•
•
•
[GeneralInfo]
PatientCount=3
Patient1=ID:2
Patient2=ID:3
Patient3=ID:4
[ID:4]
ID=4
ChineseName=病人甲
EnglishName=Patient4
Sex=Male
BornDay=2000/1/1
Contact=123456
LastVisited=2004/1/1
[ID:2]
ID=2
ChineseName=病人乙
EnglishName=Patient2
Sex=Male
BornDay=1998/1/1
Contact=193456
LastVisited=2002/1/10
[ID:3]
ID=3
ChineseName=病人丙
EnglishName=Patient3
Sex=Female
BornDay=1982/1/1
Contact=6693456
LastVisited=2004/3/10
MFC
(GUI)
+
MFC
(text file)
System Design by C++
Third Attempt :
HerbsSystem
ODBC
Microsoft Access File (MDB)
Patient Record Table
Medicine Record Table
MFC
(GUI)
Nutrition Record Table
+
Addition Table
MFC
(ODBC)
Microsoft
Access file
3. Detail implement of our Algorithm.
Use Database do not need Algorithm?
1.We do not use SQL!!
2.We use linear
search!!
ODBC
Microsoft Access File (MDB)
Patient Record Table
CHSRecordSetM
Medicine Record Table
CHSRecordSetN
Nutrition Record Table
Addition
CRecordSet
Addition Table
3.Del, Modify also
base on linear search
RecordSet Pointer
Special Thank you!! Peter suggest
many good idea of the algorithm part
Field Pointer
CHSRecordSetP
4. Show the program
which we finished
4. Show the program which we finished
Welcome Interface
4. Show the program which we finished
Main Program
Show Patient’s Search, Delete, Create, Modify
4. Show the program which we finished
Show Medicine and Particular medicine
4. Show the program which we finished
Show Nutrition and Particular Nutrition
5. The Problem we solve and can not
solved.
Problem we solve:
1.Database(text file , DBMS(microsoft access)
2.How to use MFC?
a. Study well the C++ first !!
b. Where is the main()?
c. How to add a C++ file to MFC?
……………………………
5. The Problem we solve and can not
solved.
1. The Topic too big to finish
in this project
2. Sscanf (How to convert a string to int using
c++ not use c function?)
•
CString strID, int i;
•
strID.Format("%d",i);
•
•
int iID;
sscanf(m_id,"%d",&iID);