ImportExcelHintFrm.pas 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. unit ImportExcelHintFrm;
  2. interface
  3. uses
  4. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5. Dialogs, StdCtrls;
  6. type
  7. TImportExcelHintForm = class(TForm)
  8. lblHint: TLabel;
  9. cbWithoutGclBills: TCheckBox;
  10. btnOk: TButton;
  11. btnCancel: TButton;
  12. cbWithoutLevelCode: TCheckBox;
  13. procedure cbWithoutLevelCodeClick(Sender: TObject);
  14. private
  15. { Private declarations }
  16. public
  17. { Public declarations }
  18. end;
  19. function HintAndImportTypeSelect(var AWithLevelCode, AWithoutGclBills: Boolean): Boolean;
  20. implementation
  21. function HintAndImportTypeSelect(var AWithLevelCode, AWithoutGclBills: Boolean): Boolean;
  22. var
  23. HintForm: TImportExcelHintForm;
  24. begin
  25. HintForm := TImportExcelHintForm.Create(nil);
  26. try
  27. if HintForm.ShowModal = mrOk then
  28. begin
  29. Result := True;
  30. AWithLevelCode := not HintForm.cbWithoutLevelCode.Checked;
  31. AWithoutGclBills := HintForm.cbWithoutGclBills.Checked;
  32. end;
  33. finally
  34. HintForm.Free;
  35. end;
  36. end;
  37. {$R *.dfm}
  38. procedure TImportExcelHintForm.cbWithoutLevelCodeClick(Sender: TObject);
  39. begin
  40. cbWithoutGclBills.Enabled := cbWithoutLevelCode.Checked;
  41. if not cbWithoutLevelCode.Checked then
  42. cbWithoutGclBills.Checked := False;
  43. end;
  44. end.