Ignore:
Timestamp:
Nov 15, 2012, 12:34:33 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Doplněno zobrazení formuláře pro úpravu všech tabulek docházky.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormEdit.pas

    r10 r15  
    4848    ButtonOk: TButton;
    4949    ButtonCancel: TButton;
     50    CalcEdit1: TCalcEdit;
    5051    PanelControls: TPanel;
    5152    procedure FormCreate(Sender: TObject);
     
    244245      NewControl := TDateEdit.Create(Self);
    245246      NewControl.Parent := PanelControls;
    246       TDateEdit(NewControl).Date := MySQLStrToFloat(Values.Values[Name]);
    247       NewControl.SetBounds(Rect.Left * W, Rect.Top * H,
    248        (Rect.Right - Rect.Left) * W - 28, (Rect.Bottom - Rect.Top) * H);
     247      TDateEdit(NewControl).Date := SQLToDateTime(Values.Values[Name]);
     248      NewControl.SetBounds(Rect.Left * W, Rect.Top * H,
     249       (Rect.Right - Rect.Left) * W - TEditButton(NewControl).Button.Width, (Rect.Bottom - Rect.Top) * H);
    249250      NewControl.Show;
    250251    end else
     
    252253      NewControl := TEdit.Create(Self);
    253254      NewControl.Parent := PanelControls;
    254       TEdit(NewControl).Text := TimeToStr(MySQLStrToFloat(Values.Values[Name]));
     255      TEdit(NewControl).Text := TimeToStr(SQLToTime(Values.Values[Name]));
    255256      NewControl.SetBounds(Rect.Left * W, Rect.Top * H,
    256257       (Rect.Right - Rect.Left) * W, (Rect.Bottom - Rect.Top) * H);
     
    258259    end else
    259260    if ControlType = ctReference then begin
    260       NewControl := TEdit.Create(Self);
    261       NewControl.Parent := PanelControls;
    262       TEdit(NewControl).Text := Values.Values[Name];
    263       NewControl.SetBounds(Rect.Left * W, Rect.Top * H,
    264        (Rect.Right - Rect.Left) * W - 28, (Rect.Bottom - Rect.Top) * H);
    265       NewControl.Show;
    266       NewControl := TBitBtn.Create(Self);
    267       NewControl.Parent := PanelControls;
    268       TBitBtn(NewControl).Caption := '';
    269       NewControl.SetBounds(Rect.Right * W - 28, Rect.Top * H, 24, 24);
    270       FormMain.ImageList1.GetBitmap(4, TBitBtn(NewControl).Glyph);
     261      NewControl := TEditButton.Create(Self);
     262      NewControl.Parent := PanelControls;
     263      TEditButton(NewControl).Text := Values.Values[Name];
     264      FormMain.ImageList1.GetBitmap(4, TEditButton(NewControl).Glyph);
     265      NewControl.SetBounds(Rect.Left * W, Rect.Top * H,
     266       (Rect.Right - Rect.Left) * W - TEditButton(NewControl).Button.Width,
     267       (Rect.Bottom - Rect.Top) * H);
    271268      NewControl.Show;
    272269    end;
Note: See TracChangeset for help on using the changeset viewer.