unit mutipleChoice_Vorlage;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, DBCtrls, Grids, DBGrids, ExtCtrls;
type
TFMC_Vorlage =
class(TForm)
DBGrid1: TDBGrid;
GroupBox1: TGroupBox;
DBRichEdit1: TDBRichEdit;
pannel: TPanel;
BPNeu: TButton;
BPEdit: TButton;
BPSuche: TButton;
BPClear: TButton;
procedure BPNeuClick(Sender: TObject);
procedure BPEditClick(Sender: TObject);
procedure BPClearClick(Sender: TObject);
procedure DBGrid1DblClick(Sender: TObject);
procedure DBGrid1KeyUp(Sender: TObject;
var Key: Word;
Shift: TShiftState);
private
{ Private-Deklarationen}
public
{ Public-Deklarationen}
end;
var
FMC_Vorlage: TFMC_Vorlage;
implementation
uses eingabe_MC_Gruppe, mutipleChoice_V_Fragen, UMain, UDM;
{$R *.DFM}
procedure TFMC_Vorlage.BPNeuClick(Sender: TObject);
begin
DM.TMCG.append;
FEingabe_MCG.showmodal;
end;
procedure TFMC_Vorlage.BPEditClick(Sender: TObject);
begin
if DM.TMCG.eof
and DM.TMCG.bof
then exit;
DM.TMCG.edit;
FEingabe_MCG.showmodal;
end;
procedure TFMC_Vorlage.BPClearClick(Sender: TObject);
begin
if DM.TMCG.RecordCount>0
then
if messagedlg('
Wollen Sie wirklich diese Gruppe löschen ?',mtwarning,[mbyes,mbno],0)=mryes
then
begin
DM.TMCF.first;
while not DM.TMCF.Eof
do
begin
DM.TMCA.First;
while not DM.TMCA.Eof
do DM.TMCA.delete;
DM.TMCF.delete;
end;
DM.TMCG.delete;
end;
end;
procedure TFMC_Vorlage.DBGrid1DblClick(Sender: TObject);
begin
FMCVorlageFragen.showmodal;
end;
procedure TFMC_Vorlage.DBGrid1KeyUp(Sender: TObject;
var Key: Word;
Shift: TShiftState);
begin
if (Key=13)
and (Shift=[])
then FMCVorlageFragen.showmodal;
end;
end.