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

📄 unitsellhistory.pas

📁 一般的进销存软件不过界面还可以
💻 PAS
字号:
unit UnitSellHistory;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 
  Dialogs, DB, ADODB, Grids, DBGrids, ExtCtrls, jpeg;

type
  TFrameSellHistory = class(TFrame)
    Image1: TImage;
    DBGrid1: TDBGrid;
    ADOQuery1: TADOQuery;
    DataSource1: TDataSource;
    Image2: TImage;
    Image3: TImage;
    procedure Image3Click(Sender: TObject);
    procedure Image2Click(Sender: TObject);
    procedure Show();

  private
    { Private declarations }
    LangSysmsgTitle: string;
    LangBesure: string;
  public
    { Public declarations }
  end;

implementation

uses UnitLogin;

{$R *.dfm}

procedure TFrameSellHistory.Image3Click(Sender: TObject);
begin
  ADOQuery1.Delete;
end;

procedure TFrameSellHistory.Image2Click(Sender: TObject);
var
  i: integer;
begin
  if messagebox(handle,pChar(LangBesure),pChar(LangSysmsgTitle),mb_iconinformation+mb_yesno)=IDNo then exit;
  for i:=1 to ADOQuery1.RecordCount do
    ADOQuery1.Delete;
end;

procedure TFrameSellHistory.Show();
begin
  if (Lang='cn') then {中文界面}
    begin
      Image2.Picture.LoadFromFile(ExeRootPath+'/images/btn_empty.jpg');
      Image3.Picture.LoadFromFile(ExeRootPath+'/images/btn_del.jpg');
      DBGrid1.Columns[0].Title.Caption := '商品编号';
      DBGrid1.Columns[1].Title.Caption := '商品名称';
      DBGrid1.Columns[2].Title.Caption := '商品单价';
      DBGrid1.Columns[3].Title.Caption := '销售数量';
      DBGrid1.Columns[4].Title.Caption := '销售时间';
      LangSysmsgTitle := '系统提示';
      LangBesure := '历史记录删除后不能被恢复,销售数据将被置空!是否清除?';
    end
    else  {英文界面}
    begin
      Image2.Picture.LoadFromFile(ExeRootPath+'/images/btn_empty_en.jpg');
      Image3.Picture.LoadFromFile(ExeRootPath+'/images/btn_del_en.jpg');
      DBGrid1.Columns[0].Title.Caption := 'ID';
      DBGrid1.Columns[1].Title.Caption := 'Name';
      DBGrid1.Columns[2].Title.Caption := 'Price';
      DBGrid1.Columns[3].Title.Caption := 'Number';
      DBGrid1.Columns[4].Title.Caption := 'Time';
      LangSysmsgTitle := 'System Message';
      LangBesure := 'Can not restore if you empty ths history, be sure?';
    end;
end;

end.

⌨️ 快捷键说明

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