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

📄 ssend.pas

📁 飞恒进销存(超市批发)管理系统V5.1(含源程序) 语言:Delphi 6/7 相关控件:FastReport 2.4以上, Ehlib 3.4以上 1.数据库为fhe2db_V51.da
💻 PAS
字号:
unit SSend;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Unitmb, StdCtrls, Grids, DBGridEh, Buttons, ComCtrls, ExtCtrls,
  ToolWin, ImgList, Menus;

type
  TSSendForm = class(TmbForm)
    procedure cmdSaveClick(Sender: TObject);
    procedure cbIdExit(Sender: TObject);
    procedure cmdPriorClick(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure cmdPrintClick(Sender: TObject);
    procedure cmdNextClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  SSendForm: TSSendForm;

implementation

uses datamodule1, report2;

{$R *.dfm}

procedure TSSendForm.cmdSaveClick(Sender: TObject);
begin
  inherited;
  with  datamodule2  do
  begin
    setDetail.updatebatch;
    InsertSsend(nBillid,edtBillDate.date,'Comp','sUsrName','mktUsr','wUsr','sWhid');
  end;

end;

procedure TSSendForm.cbIdExit(Sender: TObject);
begin
  inherited;
  with datamodule2 do
  begin
    nBillId:=GetBillId('NEW');
    if setDetail.active then setdetail.close;
    setDetail.commandtext:='select o.*,s.name,s.units from S_sendD o,store s  where o.billid= :billid and o.barcode=s.barcode';
    setdetail.parameters[0].value:=nBillId;
    setDetail.open;

    nId:=1;
  end;

end;

procedure TSSendForm.cmdPriorClick(Sender: TObject);
begin
  inherited;
  with datamodule2 do
   if GetPrior('S_Send',nBillId) then
   begin
    nBillId:=adoquery1.fieldbyname('billId').asinteger;
    if setDetail.active then setdetail.close;
    setDetail.commandtext:='select o.*,s.name,s.units from S_SendD o,store s  where o.billid= :billid and o.barcode=s.barcode';
    setdetail.parameters[0].value:=nBillId;
    setDetail.open;
   end;


end;

procedure TSSendForm.FormShow(Sender: TObject);
begin
  inherited;
  with datamodule2 do
  begin
    nBillId:=8888888;
    if setDetail.active then setdetail.close;
  end;

end;

procedure TSSendForm.cmdPrintClick(Sender: TObject);
begin
  inherited;
    tablename:='S_sendD';
    sName:='销售发货单';
    FormRpt1.Printporder(false);
end;

procedure TSSendForm.cmdNextClick(Sender: TObject);
begin
  inherited;
   with datamodule2 do
   if GetNext('S_send',nBillId) then
   begin
    nBillId:=adoquery1.fieldbyname('billId').asinteger;
    if setDetail.active then setdetail.close;
    setDetail.commandtext:='select o.*,s.name,s.units from S_sendD o,store s  where o.billid= :billid and o.barcode=s.barcode';
    setdetail.parameters[0].value:=nBillId;
    setDetail.open;
   end;

end;

end.

⌨️ 快捷键说明

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