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

📄 dtype.pas

📁 星光药店进销存管理系统源代码
💻 PAS
字号:
unit DType;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, StdCtrls, Grids, DBGrids, dbisamct;

type
  TForm2 = class(TForm)
    DBISAMDBGrid1: TDBISAMDBGrid;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    search: TEdit;
    SpeedButton1: TSpeedButton;
    Label2: TLabel;
    SpeedButton2: TSpeedButton;
    ComboBox1: TComboBox;
    SpeedButton3: TSpeedButton;
    procedure SpeedButton1Click(Sender: TObject);
    procedure SpeedButton2Click(Sender: TObject);
    procedure SpeedButton3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation
Uses DMType, DMCG, DMXS;
{$R *.dfm}

procedure TForm2.SpeedButton1Click(Sender: TObject);
begin
  if DMDrugs.DrugsTable1.locate(ComboBox1.Text,search.Text,[])=false then
    begin
      Application.MessageBox('数据库,不存在此记录!','错误',MB_OK+Mb_iconerror);
    end;
  search.Text:='';
end;

procedure TForm2.SpeedButton2Click(Sender: TObject);
begin
  DMC.CGTable1.Fieldbyname('编号').Asstring:=DMDrugs.DrugsTable1.FieldByName('编号').Asstring;
  DMC.CGTable1.Fieldbyname('品名').Asstring:=DMDrugs.DrugsTable1.FieldByName('品名').Asstring;
  Close;
end;

procedure TForm2.SpeedButton3Click(Sender: TObject);
begin
  DMX.XSTable1.Fieldbyname('编号').Asstring:=DMDrugs.DrugsTable1.FieldByName('编号').Asstring;
  DMX.XSTable1.Fieldbyname('品名').Asstring:=DMDrugs.DrugsTable1.FieldByName('品名').Asstring;
  Close;
end;

end.

⌨️ 快捷键说明

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