//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit4.h"
#include "Time.h"
#include "stdio.h"

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm4 *Form4;
//---------------------------------------------------------------------------
__fastcall TForm4::TForm4(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm4::Button2Click(TObject *Sender)
{
Form4->Close();
}
//---------------------------------------------------------------------------

void __fastcall TForm4::Button1Click(TObject *Sender)
{


int i,j, ii;
i=StrToInt(Edit1->Text)-1;
j=StrToInt(Edit2->Text);
Table1->First();
for (ii=0;ii<i;ii++) Table1->Next();
if (Table1->FieldByName("otdal")->AsString!="/n")
{
Table1->Edit();
Table1->FieldByName("user's number")->AsString=j;
Table1->FieldByName("vsal")->AsString=Edit3->Text;
Table1->FieldByName("otdal")->AsString="";
Table1->Post();
Label6->Caption="СТАТУС: Книга успешно взята";
} else
{
Label6->Caption="СТАТУС: Книга отсутствует";

}

}
//---------------------------------------------------------------------------


void __fastcall TForm4::FormShow(TObject *Sender)
{
Table1->Refresh();
Table2->Refresh();

char str[256];

SYSTEMTIME systime;

GetLocalTime(&systime);

sprintf(str, "%02d.%02d.%d", systime.wDay, systime.wMonth, systime.wYear);
Edit3->Text=str;

}
//---------------------------------------------------------------------------


Соседние файлы в папке Информационная система БИБЛИОТЕКА для автоматизации работы библиотеки
  • #
    01.05.2014340.57 Кб44Unit3.obj
  • #
    01.05.20141.39 Кб44Unit3.~cpp
  • #
    01.05.201451 б45Unit3.~ddp
  • #
    01.05.20141.92 Кб44Unit3.~dfm
  • #
    01.05.20141.19 Кб44Unit3.~h
  • #
    01.05.20141.69 Кб44Unit4.cpp
  • #
    01.05.201451 б44Unit4.ddp
  • #
    01.05.20142.9 Кб44Unit4.dfm
  • #
    01.05.20141.4 Кб44Unit4.h
  • #
    01.05.2014321.71 Кб44Unit4.obj
  • #
    01.05.20141.69 Кб44Unit4.~cpp