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

📄 unit5.~pas

📁 正配置数据才能运行 1.如果你没有配置数据库,那会提示你没有配置,强出一个框,你按确定后,进入登陆窗口,在最下面有一个新键配置方案,单击此处,然后弹出一个配置框,相信编写数据的朋友们应该知道怎么做了吧
💻 ~PAS
📖 第 1 页 / 共 3 页
字号:
    exit ;
  end;
    Application.MessageBox(PChar('对不起,没有此发票  !'), PChar('提示'),MB_ICONINFORMATION);
end;
{查找转让不动产发票}
procedure TForm5.JzyFP();
Var
  {定义一个查询的条件Where}
  Tj, Tj1 : String ;
begin
try
   with CustomerData do
   begin
     //客户编码
     if Radiobutton1.Checked then
     begin
        //Tj := 'Where 日期>= '+'"'+edit2.Text+'"'+ ' AND 日期 <= '+'"'+edit3.Text+'"'+'  客户编码 like'+'"'+'%'+edit1.Text+'%'+'"' ;
        //Tj := 'Where 日期 '+'"'+edit2.Text+'"'+' and 日期<=' +'"'+edit3.Text+'"' ;
        //Tj := 'Where 客户编码 =' +'"'+edit1.Text+'"' ;
        Tj := 'Where 客户编码 =' +''''+edit1.Text+''''+'and 日期>= '+''''+edit2.Text+''''+'and 日期<= '+''''+edit3.Text+'''';
        FPTJ.SQL.Clear ;
        {Fppy为要查询的表名}
        FPTJ.SQL.Add('Select * From JzyFP') ;
        //FPTJ.SQL.Add('Select * From '+Fppy) ;
        FPTJ.SQL.Add(Tj) ;
        FPTJ.SQL.Add(Tj1) ;
        {开始查询}
        FPTJ.ExecSQL ;
        FPTJ.Close ;
        FPTJ.Open ;
        {如果没有记录则让查找为可用,统计为不可用}
        if FPTJ.RecordCount =0 then
        begin
            Application.MessageBox(PChar('对不起没有符合条件的记录 !'), PChar('提示'),MB_ICONINFORMATION);
            exit ;
        end;
        {显示共查找到多少条记录}
        Application.MessageBox(PChar('一共找到 '+inttostr(FPTJ.RecordCount)+'  条记录,如果要统计请单击上面 开始统计 按钮 !'), PChar('提示'),MB_ICONINFORMATION);
        StatusBar1.Panels[1].Text := inttostr(FPTJ.RecordCount);
        StatusBar1.Panels[3].Text := DatoFB('0.00');
        exit ;
     end;
     //以时间来统计
     if Radiobutton2.Checked then
     begin
        Tj := 'Where 日期>= '+''''+edit4.Text+''''+'and 日期<= '+''''+edit5.Text+'''';
        FPTJ.SQL.Clear ;
        {Fppy为要查询的表名}
        FPTJ.SQL.Add('Select * From JzyFP') ;
        //FPTJ.SQL.Add('Select * From '+Fppy) ;
        FPTJ.SQL.Add(Tj) ;
        FPTJ.SQL.Add(Tj1) ;
        {开始查询}
        FPTJ.ExecSQL ;
        FPTJ.Close ;
        FPTJ.Open ;
        {如果没有记录则让查找为可用,统计为不可用}
        if FPTJ.RecordCount =0 then
        begin
            Application.MessageBox(PChar('对不起没有符合条件的记录 !'), PChar('提示'),MB_ICONINFORMATION);
            exit ;
        end;
        {显示共查找到多少条记录}
        Application.MessageBox(PChar('一共找到 '+inttostr(FPTJ.RecordCount)+'  条记录,如果要统计请单击上面 开始统计 按钮 !'), PChar('提示'),MB_ICONINFORMATION);
        StatusBar1.Panels[1].Text := inttostr(FPTJ.RecordCount);
        StatusBar1.Panels[3].Text := DatoFB('0.00');
        exit ;
     end;
     //以时间来统计
     if Radiobutton3.Checked then
     begin
        FPTJ.Close ;
        FPTJ.SQL.Clear ;
        {Fppy为要查询的表名}
        Tj := 'Where 客户名称 like '+''''+'%'+edit6.Text+'%'+'''' ;
        //FPTJ.SQL.Add('Select * From '+Fppy) ;
        FPTJ.SQL.Add('Select * From JzyFP ') ;
        FPTJ.SQL.Add(Tj) ;
        {开始查询}
        FPTJ.ExecSQL ;
        FPTJ.Close ;
        FPTJ.Open ;
        {如果没有记录则让查找为可用,统计为不可用}
        if FPTJ.RecordCount =0 then
        begin
            Application.MessageBox(PChar('对不起没有符合条件的记录 !'), PChar('提示'),MB_ICONINFORMATION);
            exit ;
        end;
        {显示共查找到多少条记录}
        Application.MessageBox(PChar('一共找到 '+inttostr(FPTJ.RecordCount)+'  条记录,如果要统计请单击上面 开始统计 按钮 !'), PChar('提示'),MB_ICONINFORMATION);
        StatusBar1.Panels[1].Text := inttostr(FPTJ.RecordCount);
        StatusBar1.Panels[3].Text := DatoFB('0.00');
        exit ;
     end;
     Application.MessageBox(PChar('对不起,没有此发票  !'), PChar('提示'),MB_ICONINFORMATION);
     exit ;
   end;
except
     Application.MessageBox(PChar('对不起,没有此发票  !'), PChar('提示'),MB_ICONINFORMATION);
end;
end;
{查找转让不动产发票}
procedure TForm5.ZrbdcFP();
Var
  {定义一个查询的条件Where}
  Tj, Tj1 : String ;
begin
try
   with CustomerData do
   begin
     //客户编码
     if Radiobutton1.Checked then
     begin
        //Tj := 'Where 日期>= '+'"'+edit2.Text+'"'+ ' AND 日期 <= '+'"'+edit3.Text+'"'+'  客户编码 like'+'"'+'%'+edit1.Text+'%'+'"' ;
        //Tj := 'Where 日期 '+'"'+edit2.Text+'"'+' and 日期<=' +'"'+edit3.Text+'"' ;
        //Tj := 'Where 客户编码 =' +'"'+edit1.Text+'"' ;
        Tj := 'Where 客户编码 =' +''''+edit1.Text+''''+'and 日期>= '+''''+edit2.Text+''''+'and 日期<= '+''''+edit3.Text+'''';
        FPTJ.SQL.Clear ;
        {Fppy为要查询的表名}
        FPTJ.SQL.Add('Select * From ZrbdcFP') ;
        //FPTJ.SQL.Add('Select * From '+Fppy) ;
        FPTJ.SQL.Add(Tj) ;
        FPTJ.SQL.Add(Tj1) ;
        {开始查询}
        FPTJ.ExecSQL ;
        FPTJ.Close ;
        FPTJ.Open ;
        {如果没有记录则让查找为可用,统计为不可用}
        if FPTJ.RecordCount =0 then
        begin
            Application.MessageBox(PChar('对不起没有符合条件的记录 !'), PChar('提示'),MB_ICONINFORMATION);
            exit ;
        end;
        {显示共查找到多少条记录}
        Application.MessageBox(PChar('一共找到 '+inttostr(FPTJ.RecordCount)+'  条记录,如果要统计请单击上面 开始统计 按钮 !'), PChar('提示'),MB_ICONINFORMATION);
        StatusBar1.Panels[1].Text := inttostr(FPTJ.RecordCount);
        StatusBar1.Panels[3].Text := DatoFB('0.00');
        exit ;
     end;
     //以时间来统计
     if Radiobutton2.Checked then
     begin
        Tj := 'Where 日期>= '+''''+edit4.Text+''''+'and 日期<= '+''''+edit5.Text+'''';
        FPTJ.SQL.Clear ;
        {Fppy为要查询的表名}
        FPTJ.SQL.Add('Select * From ZrbdcFP') ;
        //FPTJ.SQL.Add('Select * From '+Fppy) ;
        FPTJ.SQL.Add(Tj) ;
        FPTJ.SQL.Add(Tj1) ;
        {开始查询}
        FPTJ.ExecSQL ;
        FPTJ.Close ;
        FPTJ.Open ;
        {如果没有记录则让查找为可用,统计为不可用}
        if FPTJ.RecordCount =0 then
        begin
            Application.MessageBox(PChar('对不起没有符合条件的记录 !'), PChar('提示'),MB_ICONINFORMATION);
            exit ;
        end;
        {显示共查找到多少条记录}
        Application.MessageBox(PChar('一共找到 '+inttostr(FPTJ.RecordCount)+'  条记录,如果要统计请单击上面 开始统计 按钮 !'), PChar('提示'),MB_ICONINFORMATION);
        StatusBar1.Panels[1].Text := inttostr(FPTJ.RecordCount);
        StatusBar1.Panels[3].Text := DatoFB('0.00');
        exit ;
     end;
     //客户名称
     if Radiobutton3.Checked then
     begin
        Tj := ' Where 卖方名称 like '+''''+'%'+edit6.Text+'%'+'''' ;
        FPTJ.SQL.Clear ;
        {Fppy为要查询的表名}
        FPTJ.SQL.Add('Select * From ZrbdcFP') ;
        FPTJ.SQL.Add(Tj) ;
        {开始查询}
        FPTJ.ExecSQL ;
        FPTJ.Close ;
        FPTJ.Open ;
        {如果没有记录则让查找为可用,统计为不可用}
        if FPTJ.RecordCount =0 then
        begin
            Application.MessageBox(PChar('对不起没有符合条件的记录 !'), PChar('提示'),MB_ICONINFORMATION);
            exit ;
        end;
        {显示共查找到多少条记录}
        Application.MessageBox(PChar('一共找到 '+inttostr(FPTJ.RecordCount)+'  条记录,如果要统计请单击上面 开始统计 按钮 !'), PChar('提示'),MB_ICONINFORMATION);
        StatusBar1.Panels[1].Text := inttostr(FPTJ.RecordCount);
        StatusBar1.Panels[3].Text := DatoFB('0.00');
        exit ;
     end;
   end;
     Application.MessageBox(PChar('对不起,没有此发票  !'), PChar('提示'),MB_ICONINFORMATION);
     exit ;
except
     Application.MessageBox(PChar('对不起,没有此发票  !'), PChar('提示'),MB_ICONINFORMATION);
end;
end;
{查找其它服务业发票}
procedure TForm5.QtfwyFP();
Var
  {定义一个查询的条件Where}
  Tj, Tj1 : String ;
begin
try
   with CustomerData do
   begin
     //客户编码
     if Radiobutton1.Checked then
     begin
        //Tj := 'Where 日期>= '+'"'+edit2.Text+'"'+ ' AND 日期 <= '+'"'+edit3.Text+'"'+'  客户编码 like'+'"'+'%'+edit1.Text+'%'+'"' ;
        //Tj := 'Where 日期 '+'"'+edit2.Text+'"'+' and 日期<=' +'"'+edit3.Text+'"' ;
        //Tj := 'Where 客户编码 =' +'"'+edit1.Text+'"' ;
        Tj := 'Where 客户编码 =' +''''+edit1.Text+''''+'and 日期>= '+''''+edit2.Text+''''+'and 日期<= '+''''+edit3.Text+'''';
        FPTJ.SQL.Clear ;
        {Fppy为要查询的表名}
        FPTJ.SQL.Add('Select * From QtfwyFP') ;
        //FPTJ.SQL.Add('Select * From '+Fppy) ;
        FPTJ.SQL.Add(Tj) ;
        FPTJ.SQL.Add(Tj1) ;
        {开始查询}
        FPTJ.ExecSQL ;
        FPTJ.Close ;
        FPTJ.Open ;
        {如果没有记录则让查找为可用,统计为不可用}
        if FPTJ.RecordCount =0 then
        begin
            Application.MessageBox(PChar('对不起没有符合条件的记录 !'), PChar('提示'),MB_ICONINFORMATION);
            exit ;
        end;
        {显示共查找到多少条记录}
        Application.MessageBox(PChar('一共找到 '+inttostr(FPTJ.RecordCount)+'  条记录,如果要统计请单击上面 开始统计 按钮 !'), PChar('提示'),MB_ICONINFORMATION);
        StatusBar1.Panels[1].Text := inttostr(FPTJ.RecordCount);
        StatusBar1.Panels[3].Text := DatoFB('0.00');
        exit ;
     end;
     //以时间来统计
     if Radiobutton2.Checked then
     begin
        Tj := 'Where 日期>= '+''''+edit4.Text+''''+'and 日期<= '+''''+edit5.Text+'''';
        FPTJ.SQL.Clear ;
        {Fppy为要查询的表名}
        FPTJ.SQL.Add('Select * From QtfwyFP') ;
        //FPTJ.SQL.Add('Select * From '+Fppy) ;
        FPTJ.SQL.Add(Tj) ;
        FPTJ.SQL.Add(Tj1) ;
        {开始查询}
        FPTJ.ExecSQL ;
        FPTJ.Close ;
        FPTJ.Open ;
        {如果没有记录则让查找为可用,统计为不可用}
        if FPTJ.RecordCount =0 then
        begin
            Application.MessageBox(PChar('对不起没有符合条件的记录 !'), PChar('提示'),MB_ICONINFORMATION);
            exit ;
        end;
        {显示共查找到多少条记录}
        Application.MessageBox(PChar('一共找到 '+inttostr(FPTJ.RecordCount)+'  条记录,如果要统计请单击上面 开始统计 按钮 !'), PChar('提示'),MB_ICONINFORMATION);
        StatusBar1.Panels[1].Text := inttostr(FPTJ.RecordCount);
        StatusBar1.Panels[3].Text := DatoFB('0.00');
        exit ;
     end;
     //以客户名称
     if Radiobutton3.Checked then
     begin
        Tj := 'Where 客户名称 like '+''''+'%'+edit6.Text+'%'+'''' ;
        FPTJ.SQL.Clear ;
        {Fppy为要查询的表名}
        FPTJ.SQL.Add('Select * From QtfwyFP ') ;
        //FPTJ.SQL.Add('Select * From '+Fppy) ;
        FPTJ.SQL.Add(Tj) ;
        {开始查询}
        FPTJ.ExecSQL ;
        FPTJ.Close ;
        FPTJ.Open ;
        {如果没有记录则让查找为可用,统计为不可用}
        if FPTJ.RecordCount =0 then
        begin
            Application.MessageBox(PChar('对不起没有符合条件的记录 !'), PChar('提示'),MB_ICONINFORMATION);
            exit ;
        end;
        {显示共查找到多少条记录}
        Application.MessageBox(PChar('一共找到 '+inttostr(FPTJ.RecordCount)+'  条记录,如果要统计请单击上面 开始统计 按钮 !'), PChar('提示'),MB_ICONINFORMATION);
        StatusBar1.Panels[1].Text := inttostr(FPTJ.RecordCount);
        StatusBar1.Panels[3].Text := DatoFB('0.00');
        exit ;
     end;
   end;
     Application.MessageBox(PChar('对不起,没有此发票  !'), PChar('提示'),MB_ICONINFORMATION);
     exit ;
except
     Application.MessageBox(PChar('对不起,没有此发票  !'), PChar('提示'),MB_ICONINFORMATION);
end;
end;
{查找转让无形资产发票}
procedure TForm5.ZrwxzcFP();
Var
  {定义一个查询的条件Where}
  Tj, Tj1 : String ;
begin
try
   with CustomerData do
   begin
     //客户编码
     if Radiobutton1.Checked then
     begin
        //Tj := 'Where 日期>= '+'"'+edit2.Text+'"'+ ' AND 日期 <= '+'"'+edit3.Text+'"'+'  客户编码 like'+'"'+'%'+edit1.Text+'%'+'"' ;
        //Tj := 'Where 日期 '+'"'+edit2.Text+'"'+' and 日期<=' +'"'+edit3.Text+'"' ;
        //Tj := 'Where 客户编码 =' +'"'+edit1.Text+'"' ;
        Tj := 'Where 客户编码 =' +''''+edit1.Text+''''+'and 日期>= '+''''+edit2.Text+''''+'and 日期<= '+''''+edit3.Text+'''';
        FPTJ.SQL.Clear ;
        {Fppy为要查询的表名}
        FPTJ.SQL.Add('Select * From ZrwxzcFP') ;
        //FPTJ.SQL.Add('Select * From '+Fppy) ;
        FPTJ.SQL.Add(Tj) ;
        FPTJ.SQL.Add(Tj1) ;
        {开始查询}
        FPTJ.ExecSQL ;
        FPTJ.Close ;
        FPTJ.Open ;
        {如果没有记录则让查找为可用,统计为不可用}
        if FPTJ.RecordCount =0 then
        begin
            Application.MessageBox(PChar('对不起没有符合条件的记录 !'), PChar('提示'),MB_ICONINFORMATION);
            exit ;
        end;
        {显示共查找到多少条记录}
        Application.MessageBox(PChar('一共找到 '+inttostr(FPTJ.RecordCount)+'  条记录,如果要统计请单击上面 开始统计 按钮 !'), PChar('提示'),MB_ICONINFORMATION);
        StatusBar1.Panels[1].Text := inttostr(FPTJ.RecordCount);
        StatusBar1.Panels[3].Text := DatoFB('0.00');
        exit ;
     end;
     //以时间来统计
     if Radiobutton2.Checked then
     begin
        Tj := 'Where 日期>= '+''''+edit4.Text+''''+'and 日期<= '+''''+edit5.Text+'''';
        FPTJ.SQL.Clear ;
        {Fppy为要查询的表名}
        FPTJ.SQL.Add('Select * From ZrwxzcFP') ;

⌨️ 快捷键说明

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