Курсовая работа: База данных продуктового магазина
char d1[50];
char e1[50];
if ((this->f = fopen("salon.txt","rb")) != NULL)
{
f = fopen("salon.txt","rb");
while(!(feof(this->f)))
{
fread(a1,sizeof(char),50,this->f);
fread(b1,sizeof(char),50,this->f);
fread(c1,sizeof(char),50,this->f);
fread(d1,sizeof(char),50,this->f);
fread(e1,sizeof(char),50,this->f);
this->Naimenovanie = a1;
this->Date1 = b1;
this->Kod = c1;
this->Price = d1;
this->Quantity = e1;
if (!(feof(this->f)))
{
row++;
Form1->DataGrid1->RowCount = row;
Form1->DataGrid1->Cells[0][row - 1] = this->Naimenovanie;
Form1->DataGrid1->Cells[1][row - 1] = this->Date1;
Form1->DataGrid1->Cells[2][row - 1] = this->Kod;
Form1->DataGrid1->Cells[3][row - 1] = this->Price;
Form1->DataGrid1->Cells[4][row - 1] = this->Quantity;
}
}
}