Thema: Delphi Probleme mit showModal

Einzelnen Beitrag anzeigen

ksh
(Gast)

n/a Beiträge
 
#9

Re: Probleme mit showModal

  Alt 24. Mär 2006, 17:17
Meinst du das??

Delphi-Quellcode:
unit Dialog;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, DB, ADODB, StdCtrls, ObjEin, HiType, HiFunc,
  Buttons;

type
  TEingabe = class(TForm)
    TabelleEinlesen: TButton;
    ADOConnection1: TADOConnection;
    ADOQuery1: TADOQuery;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    OpenDialog1: TOpenDialog;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Bilanztermin: TEdit;
    Rechnungszins: TComboBox;
    PA_Maenner: TComboBox;
    PA_Frauen: TComboBox;
    Rentendynamik: TComboBox;
    ARKZ: TComboBox;
    IRKZ: TComboBox;
    WRKZ: TComboBox;
    RZahlunsweise: TComboBox;
    WRArtKz: TComboBox;
    Beenden: TButton;
    OK: TBitBtn;
    Abbruch: TBitBtn;


    {****************** Beenden bzw. Abbrechen **********************}
    procedure AbbruchClick(Sender: TObject);
    {***************** Einlesen der Eingangstabelle *****************}
    procedure TabelleEinlesenClick(Sender: TObject);
    {********************* Zuweisen der Daten ***********************}
    procedure OKClick(Sender: TObject);
    
    procedure FormCreate(Sender: TObject);


  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Eingabe : TEingabe;
  OKCLicked : boolean;

implementation

{$R *.dfm}

uses Main;
.....

procedure TEingabe.FormCreate(Sender: TObject);

var JJ,MM,TT : word;

function datumtostr(d : datum) : string;

var s : string;
   {t,m,j : integer;}

begin
  s:=inttostr(d.TT)+'.'+inttostr(d.MM)+'.'+inttostr(d.JJ);
  datumtostr:=s;
end;

begin
  {Standard-Werte setzten}
  ARKz.ItemIndex := 2;
  IRKz.ItemIndex := 1;
  WRKz.ItemIndex := 0;
  Rentendynamik.ItemIndex := 0;
  WRArtKz.ItemIndex := 0;
  DecodeDate(Date,JJ,MM,TT);
  Bilanztermin.Text := '31.12.'+inttostr(JJ);
  PA_Maenner.ItemIndex := 5;
  PA_Frauen.ItemIndex := 3;

  with angdaten.eindaten do
    begin
      Eingabe.Bilanztermin.Text := datumtostr(EinBil);
      Eingabe.Rechnungszins.Text := floattostr(EinRechZins);
      Eingabe.ARKz.ItemIndex := EinARKz;
      Eingabe.IRKz.ItemIndex := EinIRKz;
      Eingabe.WRKz.ItemIndex := EinWRKz;
      Eingabe.Rentendynamik.Text := floattostr(EinDynRenWert);
      Eingabe.WRArtKz.ItemIndex := EinWRArtKz;
      Eingabe.PA_Maenner.ItemIndex := EinPensAlter;
      Eingabe.PA_Frauen.ItemIndex := EinPensAlter;
    end;
end;

end.
  Mit Zitat antworten Zitat