Курсовая работа: Об’єктно-орієнтована програма обліку продуктового магазину
#pragma hdrstop
#include "Main.h"
#include "My_date.h"
#include "Date.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TMainForm *MainForm;
__fastcall TMainForm::TMainForm(TComponent* Owner)
: TForm(Owner)
{
}
//------------------------------------------------------------------------void __fastcall TMainForm::Add(TObject *Sender)
{
Ptr p = list.record();
p->d = StrToInt(NewInt->Text);
p->day = StrToInt(Day->Text);
p->year = StrToInt(Year->Text);
p->month = StrToInt(Month->Text);
//p->x = StrToFloat(NewDouble->Text);
p->str = String->Text;
p->str1 = FirmaString->Text;
p->str2 = WidString->Text;
redraw();
}
void TMainForm::redraw()
{ List->Clear();
StrList->Clear();
for(Ptr p = list.first();p.valid();++p)
{