Ignore:
Timestamp:
Mar 9, 2012, 8:11:13 AM (13 years ago)
Author:
chronos
Message:
  • Added: Remember last password in login dialog.
  • Fixed: Some Add, Edit, View, Select dialog display.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UItemView.pas

    r36 r40  
    5656{$R *.lfm}
    5757
     58resourcestring
     59  SExpectedOneRow = 'Expected one row';
     60
    5861{ TItemViewForm }
    5962
     
    106109  NewItemEditForm: TItemEditForm;
    107110begin
    108   Close;
    109   NewItemEditForm := TItemEditForm.Create(nil);
    110   NewItemEditForm.SelectedObject.Assign(SelectedObject);
    111   NewItemEditForm.SelectedItemId := SelectedItemId;
    112   NewItemEditForm.Caption := NewItemEditForm.Caption + ' ' + SelectedObject.Name;
    113   MainForm.SetMainPanelForm(NewItemEditForm);
     111  try
     112    NewItemEditForm := TItemEditForm.Create(nil);
     113    NewItemEditForm.SelectedObject.Assign(SelectedObject);
     114    NewItemEditForm.SelectedItemId := SelectedItemId;
     115    NewItemEditForm.Caption := NewItemEditForm.Caption + ' ' + SelectedObject.Name;
     116    NewItemEditForm.ShowModal;
     117  finally
     118    NewItemEditForm.Free;
     119  end;
    114120end;
    115121
     
    156162  // Load column names
    157163
    158   if Report.Count = 1 then
     164  if Report.Count > 1 then raise Exception.Create(SExpectedOneRow);
     165  if Report.Count > 0 then
    159166  for I := 0 to Report.Columns.Count - 1 do begin
    160167    DataType := TReportColumn(Report.Columns[I]).CustomType;
Note: See TracChangeset for help on using the changeset viewer.