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

📄 frmpjgsetfz.pas

📁 ProviceSystem-公积金监管系统中心端
💻 PAS
字号:
unit frmPJgSetFz;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, CheckLst, ComCtrls, ImgList, ToolWin;

type
  TJgSetFz = class(TForm)
    CoolBar1: TCoolBar;
    ToolBar1: TToolBar;
    ImageList1: TImageList;
    ImageList2: TImageList;
    ToolButton1: TToolButton;
    CboDs: TComboBox;
    Label1: TLabel;
    ToolButton2: TToolButton;
    ToolButton3: TToolButton;
    Label2: TLabel;
    CLBDS: TCheckListBox;
    procedure ToolButton1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure ToolButton2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  JgSetFz: TJgSetFz;

implementation

{$R *.dfm}
uses uDmFunc, uConstUtils;

procedure TJgSetFz.ToolButton1Click(Sender: TObject);
begin
  close;
end;



procedure TJgSetFz.FormCreate(Sender: TObject);
var
  aDs: TString2Array;
  i: smallint;
begin
  DsInfo(aDs);
  for i:=0 to high(aDs) do
    CLBDS.Items.Add(aDs[i,0]+' :  '+aDs[i,1]);
  SetLength(aDs,0);
  YjSetDsInfo(aDs);
  for i:=0 to high(aDs) do
    CboDs.Items.Add(aDs[i,0]+' :  '+aDs[i,1]);
end;

procedure TJgSetFz.ToolButton2Click(Sender: TObject);
var
  sDs,tDs: String;
  i,l,iRet: smallint;
begin
  l := Pos(':',CboDs.Text);
  sDs:= copy(CboDs.Text,1,l-2);
  tDs:='';
  if (trim(sDs)='') then
  begin
    application.MessageBox('请先选择数据源(已设置违规的地市)!',PMsgCaption,64);
    CboDs.SetFocus;
    exit;
  end;
  iRet := 0;
  for i:=0 to CLBDS.Count-1 do
  begin
    l := Pos(':',CLBDS.Items.Strings[i]);
    if copy(CLBDS.Items.Strings[i],1,l-2)= sDs then
      continue;
    if Clbds.Checked[i] then
    begin
      l := Pos(':',CLBDS.Items.Strings[i]);
      tDs := copy(CLBDS.Items.Strings[i],1,l-2);
      iRet := YjSetFz(sDs,tDs);
    end;
    if iRet <> 0 then
      break;
  end;
  if tDs='' then
  begin
    application.MessageBox('请选择目的地市(欲重设或未设置违规的地市)!',pMsgCaption,48);
    CLBDs.SetFocus;
    exit;
  end;
  if iRet=0 then
    Application.MessageBox('复制成功。',PMsgCaption,64)
  else
    Application.MessageBox('复制失败!',PMsgCaption,16);
end;

end.

⌨️ 快捷键说明

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