⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mcountunit.~pas

📁 通过输入商品品名
💻 ~PAS
字号:
unit MCountUnit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Spin, StdCtrls;

type
  TMCount = class(TForm)
    LabelName: TLabel;
    LabelPrice: TLabel;
    LabelAmount: TLabel;
    GoodName: TEdit;
    Count: TButton;
    Tariff: TMemo;
    Price: TSpinEdit;
    Amount: TSpinEdit;
    procedure CountClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MCount: TMCount;

implementation

{$R *.dfm}

procedure TMCount.CountClick(Sender: TObject);
begin
if(Price.Value<=0)and(Amount.Value<=0)and(GoodName.Text='') then
showmessage('输入有错误!')
else begin
tariff.Lines.Add('品名:'+GoodName.Text);
tariff.Lines.Add('单价:'+intToStr(Price.Value));
tariff.Lines.Add('数量:'+intToStr(Amount.Value));
tariff.Lines.Add('货款:'+intToStr(Price.Value*Amount.Value));
end;
end;
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -