Курсовая работа: Разработка базы данных и прикладного программного обеспечения для автобусного парка
begin
ADOCommand.CommandText := 'DELETE FROM stoppoints WHERE id='+DBGridStopPoints.DataSource.DataSet.Fields[0].AsString;;
ADOCommand.Execute;
ADOQueryStopPoints.Requery;
end;
procedure TfmMain.btnBusesDeleteClick(Sender: TObject);
begin
ADOCommand.CommandText := 'DELETE FROM buses WHERE id='+DBGridBuses.DataSource.DataSet.Fields[0].AsString;;
ADOCommand.Execute;
ADOQueryBuses.Requery;
end;
procedure TfmMain.btnRoutesEditClick(Sender: TObject);
begin
Application.CreateForm(TfmRoutes, fmRoutes);
fmRoutes.EditFlag := true;
fmRoutes.ShowModal;
end;
procedure TfmMain.btnStationsAddClick(Sender: TObject);
begin
Application.CreateForm(TfmStations, fmStations);
fmStations.EditFlag := false;
fmStations.ShowModal;
end;
procedure TfmMain.btnStationsEditClick(Sender: TObject);
begin
Application.CreateForm(TfmStations, fmStations);
fmStations.EditFlag := true;
fmStations.ShowModal;
end;