Курсовая работа: Разработка базы данных и прикладного программного обеспечения для автобусного парка
ppmnRoutesDelete.Enabled := false;
ppmnStationsDelete.Enabled := false;
ppmnStopPointsDelete.Enabled := false;
end;
procedure TfmMain.btnRoutesAddClick(Sender: TObject);
begin
Application.CreateForm(TfmRoutes, fmRoutes);
fmRoutes.EditFlag := false;
fmRoutes.ShowModal;
end;
procedure TfmMain.dtsrcRoutesDataChange(Sender: TObject; Field: TField);
begin
btnRoutesEdit.Enabled := ADOTableRoutes.RecordCount <> 0;
btnRoutesDelete.Enabled := ADOTableRoutes.RecordCount <> 0;
ppmnRoutesEdit.Enabled := ADOTableRoutes.RecordCount <> 0;
ppmnRoutesDelete.Enabled := ADOTableRoutes.RecordCount <> 0;
end;
procedure TfmMain.dtsrcStationsDataChange(Sender: TObject; Field: TField);
begin
btnStationsEdit.Enabled := ADOQueryStations.RecordCount <> 0;
btnStationsDelete.Enabled := ADOQueryStations.RecordCount <> 0;
ppmnStationsEdit.Enabled := ADOQueryStations.RecordCount <> 0;
ppmnStationsDelete.Enabled := ADOQueryStations.RecordCount <> 0;
end;
procedure TfmMain.dtsrcStopPointsDataChange(Sender: TObject; Field: TField);
begin
btnStopPointsEdit.Enabled := ADOQueryStopPoints.RecordCount <> 0;
btnStopPointsDelete.Enabled := ADOQueryStopPoints.RecordCount <> 0;
ppmnStopPointsEdit.Enabled := ADOQueryStopPoints.RecordCount <> 0;