CheckPosForm.pas 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. unit CheckPosForm;
  2. interface
  3. uses
  4. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5. Dialogs, StdCtrls, ExtCtrls, ImgList, dximctrl;
  6. type
  7. TCheckPosFrm = class(TForm)
  8. btnOK: TButton;
  9. btnCancel: TButton;
  10. rgSelectPos: TRadioGroup;
  11. GroupBox1: TGroupBox;
  12. cbBillsQty: TCheckBox;
  13. cbDQQty: TCheckBox;
  14. procedure btnCancelClick(Sender: TObject);
  15. private
  16. { Private declarations }
  17. public
  18. { Public declarations }
  19. end;
  20. function CheckBillsPastePosition(var ABillsQty, ADQQty: Boolean; aPasteText: Boolean = False): Integer;
  21. implementation
  22. {$R *.dfm}
  23. uses ConstVarUnit;
  24. procedure TCheckPosFrm.btnCancelClick(Sender: TObject);
  25. begin
  26. Close;
  27. end;
  28. function CheckBillsPastePosition(var ABillsQty, ADQQty: Boolean; aPasteText: Boolean): Integer;
  29. var
  30. checkPosForm: TCheckPosFrm;
  31. begin
  32. Result := -1;
  33. checkPosForm := TCheckPosFrm.Create(nil);
  34. if not aPasteText then
  35. checkPosForm.rgSelectPos.Items.Delete(3)
  36. else
  37. checkPosForm.cbDQQty.Enabled := False;
  38. if checkPosForm.ShowModal = mrOK then
  39. begin
  40. Result := checkPosForm.rgSelectPos.ItemIndex;
  41. ABillsQty := checkPosForm.cbBillsQty.Checked;
  42. ADQQty := checkPosForm.cbDQQty.Checked;
  43. end;
  44. checkPosForm.Free;
  45. Application.ProcessMessages;
  46. end;
  47. end.