关闭

delehi使用Ado方式读取EXCEL导入的Demo

标签: delphiexcel
407人阅读 评论(0) 收藏 举报
分类:

delehi使用Ado方式读取EXCEL导入的Demo


源码

unit UF_S_KH_DR;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Menus, ActnList, DB, ADODB, DBGridEhGrouping, ToolCtrlsEh,
  DBGridEhToolCtrls, DynVarsEh, StdCtrls, ComCtrls, GridsEh, DBAxisGridsEh,
  DBGridEh, exgrid, RapTree, FlytreePro, Mask, RzEdit, RzBtnEdt, ExtCtrls,
  RzTabs, Grids, DBGrids, RzCmboBx, ComObj, DateUtils, DBCtrls, DBNavPlus,
  HzSpell;

type
  TF_S_KH_DR = class(TForm)
    AQry_CSM: TADOQuery;
    Ds_CSM: TDataSource;
    ActionList1: TActionList;
    Act_Exit: TAction;
    Act_0_N: TAction;
    Act_1_P: TAction;
    Act_1_N: TAction;
    Act_2_P: TAction;
    Act_2_N: TAction;
    Act_3_P: TAction;
    Act_3_N: TAction;
    Act_GridConfig_AQryCSM: TAction;
    PM_Grid: TPopupMenu;
    N1: TMenuItem;
    AQry_DRM: TADOQuery;
    AQry_Tmp: TADOQuery;
    AQry_XZ: TADOQuery;
    PGC_Main: TRzPageControl;
    Tab0: TRzTabSheet;
    Pnl_0_Head: TPanel;
    Button2: TButton;
    Button3: TButton;
    Btn_0_Close: TButton;
    Panel1: TPanel;
    lbl_1: TLabel;
    Label1: TLabel;
    Label8: TLabel;
    Tab1: TRzTabSheet;
    Panel2: TPanel;
    Label3: TLabel;
    Label2: TLabel;
    Panel5: TPanel;
    Button1: TButton;
    Button4: TButton;
    Button5: TButton;
    DBGrd_CSM: TDBGridEh;
    Tab2: TRzTabSheet;
    Panel3: TPanel;
    Label5: TLabel;
    Label4: TLabel;
    Panel6: TPanel;
    Button6: TButton;
    Button7: TButton;
    Button8: TButton;
    Panel8: TPanel;
    PB_JD: TProgressBar;
    Mem_JCTS: TMemo;
    Panel9: TPanel;
    Label6: TLabel;
    lbl_JD: TLabel;
    Tab3: TRzTabSheet;
    Panel4: TPanel;
    Label7: TLabel;
    Panel7: TPanel;
    Button9: TButton;
    Button10: TButton;
    Button11: TButton;
    dbgrd_1: TDBGrid;
    Edt_ExcelFileName: TRzButtonEdit;
    cbb_ExcelGZB: TRzComboBox;
    Chb_SY2003FS: TCheckBox;
    Ds_1: TDataSource;
    ACON_DBE: TADOConnection;
    AQRY_Excel: TADOQuery;
    stat_1: TStatusBar;
    Button12: TButton;
    Act_DCExcel_AQryCSM: TAction;
    Pb_Read: TProgressBar;
    AQry_DRCMD: TADOQuery;
    lb_ExcelJD: TLabel;
    Chb_ClearTable: TCheckBox;
    DBNavPlus1: TDBNavPlus;
    DBNavPlus2: TDBNavPlus;
    HzSpell1: THzSpell;
    procedure FormCreate(Sender: TObject);
    procedure Edt_ExcelFileNameButtonClick(Sender: TObject);
    procedure Act_ExitExecute(Sender: TObject);
    procedure cbb_ExcelGZBChange(Sender: TObject);
    procedure Ds_1DataChange(Sender: TObject; Field: TField);
    procedure Ds_1StateChange(Sender: TObject);
    procedure Ds_1UpdateData(Sender: TObject);
    procedure Act_0_NExecute(Sender: TObject);
    procedure Act_1_PExecute(Sender: TObject);
    procedure Act_1_NExecute(Sender: TObject);
    procedure Act_2_PExecute(Sender: TObject);
    procedure Act_2_NExecute(Sender: TObject);
    procedure Act_3_PExecute(Sender: TObject);
    procedure Act_3_NExecute(Sender: TObject);
    procedure Act_DCExcel_AQryCSMExecute(Sender: TObject);
    procedure Act_GridConfig_AQryCSMExecute(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    FACon: TADOConnection;
    FSJOK: Boolean;


    procedure SetStatInfoByDataSet(ISBar: TStatusBar; IIndex: Integer; IDataSet: TDataSet);

  end;

function SetDsFDW(IDs: TDataSet; IFieldWidth: Integer): Boolean;

const
  //Excel连接
  FrmConStrE = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;Extended Properties="Excel 8.0;HDR=YES;IMEX=1"';

  FrmConStrE2003 = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;Extended Properties="Excel 8.0;HDR=YES;IMEX=1"';
  FrmConStrE2010 = 'Provider=Microsoft.ACE.OLEDB.12.0;Data Source=''%s''; Extended Properties=''Excel 12.0;HDR=YES''';
   // FrmConStrE = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;Extended Properties="Excel 8.0;HDR=YES;IMEX=1"';


implementation

uses
  U_DBSystem,
  U_Message,
  U_Grid,
  U_Report,
  U_Other;
{$R *.dfm}




function SetDsFDW(IDs: TDataSet; IFieldWidth: Integer): Boolean;
var
  i_c: Integer;
begin
  Result := False;
  if IDs.Active then
  begin
    for i_c := 0 to Ids.FieldCount - 1 do
      if IDs.Fields[i_c].DisplayWidth > IFieldWidth then
        IDs.Fields[i_c].DisplayWidth := IFieldWidth;
  end;
end;


procedure TF_S_KH_DR.SetStatInfoByDataSet(ISBar: TStatusBar; IIndex: Integer; IDataSet: TDataSet);
begin
  try
    ISBar.Panels[IIndex].Text := '';
    if IDataSet <> nil then
    begin
      if IDataSet.Active then
      begin
        if IDataSet.IsEmpty then
        begin
          ISBar.Panels[IIndex].Text := '0/0';
        end
        else
        begin

          ISBar.Panels[IIndex].Text := IntToStr(IDataSet.RecNo) + '/' + IntToStr(IDataSet.RecordCount);
        end;
      end;
    end;
  except
  end;
end;




procedure TF_S_KH_DR.FormCreate(Sender: TObject);
var
  i: integer;
begin
  Caption := '托收-客户基础数据-导入';
  Mem_JCTS.Clear;

  for i := 0 to Self.PGC_Main.PageCount - 1 do
  begin
    PGC_Main.Pages[i].TabVisible := False;
  end;
  PGC_Main.ActivePageIndex := 0;

  DBGrd_CSM.ReadOnly := True;
 // DBGrd_CSM.Options := EditFalse;
  DBGrd_CSM.Options := GridOptionsEditFalse;
  DBGrd_CSM.OptionsEh := GridOptionsEh;

  DBGrd_CSM.RowHeight := 18;
  DBGrd_CSM.RowSizingAllowed := True;

  DBGrd_CSM.TitleParams.MultiTitle := True;

  FSJOK := False;
end;

procedure TF_S_KH_DR.Act_ExitExecute(Sender: TObject);
begin
  Close;
end;

procedure TF_S_KH_DR.Edt_ExcelFileNameButtonClick(
  Sender: TObject);
begin
  with TOpenDialog.Create(Application) do
  begin
    try
     //  Filter := 'Excel文件(*.XLS)|*.XLS|所有文件(*.*)|*.*';

      Filter := 'Excel文件(2003/2010)(*.xls;*.xlsx)|*.xls;*.xlsx|所有文件(*.*)|*.*';

      FilterIndex := 0;
      InitialDir := ExtractFilePath(Application.ExeName);
      if Trim(self.edt_ExcelFileName.Text) <> '' then
      begin
        FileName := Trim(self.edt_ExcelFileName.Text);
      end;

      if Execute then
      begin
        ACON_DBE.Close;
        ACON_DBE.ConnectionString := '';
        if Chb_SY2003FS.Checked then
        begin
          ACON_DBE.ConnectionString := Format(FrmConStrE2003, [FileName]);
        end
        else
        begin
          ACON_DBE.ConnectionString := Format(FrmConStrE2010, [FileName]);
        end;

        self.edt_ExcelFileName.Text := FileName;
        try
          ACON_DBE.Open;
          cbb_ExcelGZB.Clear;
          ACON_DBE.GetTableNames(cbb_ExcelGZB.Items, False);
          cbb_ExcelGZB.ItemIndex := 0;
          cbb_ExcelGZBChange(Sender);

        except
          cbb_ExcelGZB.Clear;
          AQRY_Excel.Close;
          ShowMessage('打开文件不成功.');
        end;

      end;
    finally
      Free;
    end;
  end;
end;



procedure TF_S_KH_DR.cbb_ExcelGZBChange(Sender: TObject);
var i_c: integer;
begin
  if self.cbb_ExcelGZB.Text <> '' then
  begin
    AQRY_Excel.Close;
    AQRY_Excel.SQL.Text := 'Select * From [' + Self.cbb_ExcelGZB.Text + ']';
    try
      AQRY_Excel.Open;
      SetDsFDW(AQRY_Excel, 22);
    except
      ShowMessage('打开Excel工作薄不成功!');
    end;
  end;
end;

procedure TF_S_KH_DR.Ds_1DataChange(Sender: TObject;
  Field: TField);
begin
  SetStatInfoByDataSet(Self.stat_1, 0, self.ds_1.DataSet);
end;

procedure TF_S_KH_DR.Ds_1StateChange(Sender: TObject);
begin
  SetStatInfoByDataSet(Self.stat_1, 0, self.ds_1.DataSet);
end;

procedure TF_S_KH_DR.Ds_1UpdateData(Sender: TObject);
begin
  SetStatInfoByDataSet(Self.stat_1, 0, self.ds_1.DataSet);
end;

procedure TF_S_KH_DR.Act_0_NExecute(Sender: TObject);
var
  i: integer;
  SJOK: Boolean;
  SJBH: Integer;
begin
  FSJOK := False;
  SJOK := True;
  AQRY_Excel.DisableControls;
  try

    FACon.BeginTrans;
    try

      {
      AQry_Tmp.Close;
      AQry_Tmp.Connection := FACon;
      AQry_Tmp.SQL.Text := 'Truncate table S_KH';
      AQry_Tmp.ExecSQL;
      AQry_Tmp.Close;
       }
      AQry_CSM.Close;
      AQry_CSM.Connection := FACon;
      AQry_CSM.SQL.Text := 'SELECT * '
        + ' From S_KH_YHTSHT'
        + ' WHERE 1=0';
      AQry_CSM.Open;
      Pb_Read.Position := 0;
      Pb_Read.Max := AQRY_Excel.RecordCount;
      lb_ExcelJD.Caption := '';
      Application.ProcessMessages;
      if Chb_ClearTable.Checked then
      begin
        SJBH := 1;
      end
      else
      begin
        SJBH := GetSIDInt(FACon, 'S_KH_YHTSHT', 'SJBH');
      end;
      AQRY_Excel.First;
      while not AQRY_Excel.Eof do
      begin
        lb_ExcelJD.Caption := IntToStr(AQRY_Excel.RecNo) + '/' + IntToStr(AQRY_Excel.RecordCount);
        Pb_Read.Position := AQRY_Excel.RecNo;
        Application.ProcessMessages;

        AQry_CSM.Append;

        AQry_CSM.FieldByName('SJBH').AsInteger := SJBH;
        SJBH := SJBH + 1;

        AQry_CSM.FieldByName('KHSH').AsString := AQRY_Excel.FieldByName('税号').AsString;
        AQry_CSM.FieldByName('KHMC').AsString := AQRY_Excel.FieldByName('名称').AsString;

        AQry_CSM.FieldByName('PYJM').AsString := UpperCase(HzSpell1.PyHeadOfHz(AQRY_Excel.FieldByName('名称').AsString));

       // AQry_CSM.FieldByName('BZ').AsString := AQRY_Excel.FieldByName('备注').AsString;

        AQry_CSM.Post;

        AQRY_Excel.Next;
      end;
      FACon.CommitTrans;
      Application.ProcessMessages;

    except
      on E: Exception do
      begin
        FACon.RollbackTrans;
        MsgBoxS('行(' + IntToStr(AQRY_Excel.RecNo) + ')读取错误:' + E.message);
        Exit;
      end;
    end;

    Application.ProcessMessages;

    DB_ZDSZ_Load(FACon, 'S_KH_YHTSHT_DRRead', DBGrd_CSM, AQRY_CSM);
    self.PGC_Main.ActivePageIndex := 1;
  finally
    AQRY_Excel.EnableControls;
  end;
end;

procedure TF_S_KH_DR.Act_1_PExecute(Sender: TObject);
begin
  FSJOK := False;
  self.PGC_Main.ActivePageIndex := 0;
end;

procedure TF_S_KH_DR.Act_1_NExecute(Sender: TObject);
var
  RQSJT: TDateTime;

  YWGUID: string;
begin
  Self.Mem_JCTS.Clear;
  self.PGC_Main.ActivePageIndex := 2;
  Application.ProcessMessages;

  PB_JD.Max := AQry_CSM.RecordCount;
  PB_JD.Position := 0;


  RQSJT := Now; //GetFWQSJ(FACon);
  //YWGUID := GetGuid;
  FACon.BeginTrans;
  try
    if Chb_ClearTable.Checked then
    begin
      AQry_DRCmd.Close;
      AQry_DRCmd.Connection := FACon;
      AQry_DRCmd.SQL.Text := 'Delete FROM  S_KH_YHTSHT';


      AQry_DRCmd.ExecSQL;
      AQry_DRCmd.Close;
    end;
    self.Mem_JCTS.Lines.Add('导入');
    AQry_DRM.Close;
    AQry_DRM.Connection := FACon;
    AQry_DRM.SQL.Text := 'SELECT * FROM S_KH_YHTSHT WHERE 1=0 ';
    AQry_DRM.Open;
    AQry_CSM.First;
    while not AQry_CSM.Eof do
    begin
      PB_JD.Position := AQry_CSM.RecNo;
      lbl_JD.Caption := IntToStr(AQry_CSM.RecNo) + '/' + IntToStr(AQry_CSM.RecordCount);
      Application.ProcessMessages;
      self.Mem_JCTS.Lines.Add(IntToStr(AQry_CSM.RecNo) + ' '
        + AQry_DRM.FieldByName('SJBH').AsString + ' ' + AQry_CSM.FieldByName('KHMC').AsString);

      AQry_DRM.Append;
     // AQry_DRM.FieldByName('YWGUID').AsString := YWGUID;
     // AQry_DRM.FieldByName('DRR').AsString := PCZYMC;

      AQry_DRM.FieldByName('SJBH').AsInteger := AQry_CSM.FieldByName('SJBH').AsInteger;
      YWGUID := '';
      YWGUID := GetGuid;
      AQry_DRM.FieldByName('YWGUID').AsString := YWGUID;

      AQry_DRM.FieldByName('KHSH').AsString := AQry_CSM.FieldByName('KHSH').AsString;
      AQry_DRM.FieldByName('KHMC').AsString := AQry_CSM.FieldByName('KHMC').AsString;
      AQry_DRM.FieldByName('PYJM').AsString := AQry_CSM.FieldByName('PYJM').AsString;



      AQry_DRM.FieldByName('DRRQ').AsDateTime := RQSJT;
      AQry_DRM.FieldByName('XGRQ').AsDateTime := RQSJT;
      AQry_DRM.FieldByName('TBRQ').AsDateTime := RQSJT;

      AQry_DRM.Post;

      AQry_CSM.Next;
    end;
    AQry_DRM.Close;
    FACon.CommitTrans;
    MsgBoxI('完成.');

  except
    on E: Exception do
    begin
      FACon.RollbackTrans;
      MsgBoxS('出错' + E.message);
    end;
  end;
end;

procedure TF_S_KH_DR.Act_2_PExecute(Sender: TObject);
begin
  self.PGC_Main.ActivePageIndex := 1;
end;

procedure TF_S_KH_DR.Act_2_NExecute(Sender: TObject);
begin
  Close;
  //self.PGC_Main.ActivePageIndex := 3;
end;

procedure TF_S_KH_DR.Act_3_PExecute(Sender: TObject);
begin
  self.PGC_Main.ActivePageIndex := 2;
end;

procedure TF_S_KH_DR.Act_3_NExecute(Sender: TObject);
begin

  Close;
  // self.PGC_Main.ActivePageIndex := 3;
end;

procedure TF_S_KH_DR.Act_DCExcel_AQryCSMExecute(Sender: TObject);
begin
  F_S_DB_DC_DataSetToExcel(AQry_CSM);
end;

procedure TF_S_KH_DR.Act_GridConfig_AQryCSMExecute(
  Sender: TObject);
begin
 //
  F_S_DB_ZDSZ_Show(FACON, 'S_KH_YHTSHT_DRRead', DBGrd_CSM, AQry_CSM);

end;

end.


窗体


object F_S_KH_DR: TF_S_KH_DR
  Left = 455
  Top = 125
  Width = 695
  Height = 651
  Caption = #32534#30721#23548#20837
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -15
  Font.Name = #23435#20307
  Font.Style = []
  OldCreateOrder = False
  Position = poDesktopCenter
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 15
  object PGC_Main: TRzPageControl
    Left = 0
    Top = 0
    Width = 687
    Height = 613
    ActivePage = Tab1
    Align = alClient
    ShowFullFrame = False
    ShowShadow = False
    TabIndex = 1
    TabOrder = 0
    FixedDimension = 21
    object Tab0: TRzTabSheet
      Caption = 'Tab0'
      object Pnl_0_Head: TPanel
        Left = 0
        Top = 541
        Width = 687
        Height = 50
        Align = alBottom
        TabOrder = 0
        DesignSize = (
          687
          50)
        object lb_ExcelJD: TLabel
          Left = 283
          Top = 15
          Width = 40
          Height = 15
          Caption = 'Excel'
        end
        object Button2: TButton
          Left = 396
          Top = 10
          Width = 75
          Height = 25
          Anchors = [akTop, akRight]
          Caption = #19978#19968#27493
          Enabled = False
          TabOrder = 0
        end
        object Button3: TButton
          Left = 490
          Top = 10
          Width = 75
          Height = 25
          Action = Act_0_N
          Anchors = [akTop, akRight]
          TabOrder = 1
        end
        object Btn_0_Close: TButton
          Left = 584
          Top = 10
          Width = 75
          Height = 25
          Action = Act_Exit
          Anchors = [akTop, akRight]
          TabOrder = 2
        end
        object stat_1: TStatusBar
          Left = 106
          Top = 11
          Width = 135
          Height = 25
          Align = alNone
          Panels = <
            item
              Width = 50
            end>
        end
        object DBNavPlus2: TDBNavPlus
          Left = 1
          Top = 10
          Width = 100
          Height = 26
          DataSource = Ds_1
          VisibleButtons = [nbFirst, nbPrior, nbNext, nbLast]
          TabOrder = 4
          Captions.Strings = (
            #26368#21069
            #21521#21069
            #21521#21518
            #26368#21518
            #25554#20837
            #21024#38500
            #32534#36753
            #25552#20132
            #25764#28040
            #21047#26032)
          CaptionsShow = False
          Spacing = 5
          Margin = -1
        end
      end
      object Panel1: TPanel
        Left = 0
        Top = 0
        Width = 687
        Height = 125
        Align = alTop
        TabOrder = 1
        DesignSize = (
          687
          125)
        object lbl_1: TLabel
          Left = 106
          Top = 41
          Width = 45
          Height = 15
          Caption = #24037#20316#34920
        end
        object Label1: TLabel
          Left = 14
          Top = 12
          Width = 51
          Height = 16
          Caption = #31532#19968#27493
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -16
          Font.Name = #23435#20307
          Font.Style = [fsBold]
          ParentFont = False
        end
        object Label8: TLabel
          Left = 83
          Top = 13
          Width = 70
          Height = 15
          Caption = 'Excel'#25991#20214
        end
        object Edt_ExcelFileName: TRzButtonEdit
          Left = 161
          Top = 10
          Width = 505
          Height = 23
          Anchors = [akLeft, akTop, akRight]
          Color = clInfoBk
          ReadOnly = True
          TabOrder = 0
          AltBtnKind = bkFind
          ButtonKind = bkFind
          HideButtonsOnReadOnly = False
          OnButtonClick = Edt_ExcelFileNameButtonClick
        end
        object cbb_ExcelGZB: TRzComboBox
          Left = 161
          Top = 37
          Width = 287
          Height = 23
          Style = csDropDownList
          ItemHeight = 0
          TabOrder = 1
          OnChange = cbb_ExcelGZBChange
        end
        object Chb_SY2003FS: TCheckBox
          Left = 161
          Top = 66
          Width = 288
          Height = 17
          Caption = #20351#29992'Excel2003'#29256#26041#24335
          TabOrder = 2
        end
        object Chb_ClearTable: TCheckBox
          Left = 162
          Top = 90
          Width = 502
          Height = 17
          Caption = #28165#31354#21407#34920#26723#26696#25152#26377#25968#25454'-'#21024#38500#24050#24405#20837#25152#26377#21512#21516#25968#25454
          TabOrder = 3
        end
      end
      object dbgrd_1: TDBGrid
        Left = 0
        Top = 125
        Width = 687
        Height = 397
        Align = alClient
        DataSource = Ds_1
        ReadOnly = True
        TabOrder = 2
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -15
        TitleFont.Name = #23435#20307
        TitleFont.Style = []
      end
      object Pb_Read: TProgressBar
        Left = 0
        Top = 522
        Width = 687
        Height = 19
        Align = alBottom
        TabOrder = 3
      end
    end
    object Tab1: TRzTabSheet
      Caption = 'Tab1'
      object Panel2: TPanel
        Left = 0
        Top = 0
        Width = 687
        Height = 41
        Align = alTop
        TabOrder = 0
        object Label3: TLabel
          Left = 14
          Top = 12
          Width = 51
          Height = 16
          Caption = #31532#20108#27493
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -16
          Font.Name = #23435#20307
          Font.Style = [fsBold]
          ParentFont = False
        end
        object Label2: TLabel
          Left = 77
          Top = 12
          Width = 90
          Height = 15
          Caption = #35835#21462#25968#25454#39044#35272
        end
      end
      object Panel5: TPanel
        Left = 0
        Top = 541
        Width = 687
        Height = 50
        Align = alBottom
        TabOrder = 1
        DesignSize = (
          687
          50)
        object Button1: TButton
          Left = 396
          Top = 10
          Width = 75
          Height = 25
          Action = Act_1_P
          Anchors = [akTop, akRight]
          TabOrder = 0
        end
        object Button4: TButton
          Left = 490
          Top = 10
          Width = 75
          Height = 25
          Action = Act_1_N
          Anchors = [akTop, akRight]
          TabOrder = 1
        end
        object Button5: TButton
          Left = 584
          Top = 10
          Width = 75
          Height = 25
          Action = Act_Exit
          Anchors = [akTop, akRight]
          TabOrder = 2
        end
        object Button12: TButton
          Left = 131
          Top = 10
          Width = 158
          Height = 26
          Action = Act_DCExcel_AQryCSM
          TabOrder = 3
        end
        object DBNavPlus1: TDBNavPlus
          Left = 16
          Top = 10
          Width = 100
          Height = 26
          DataSource = Ds_CSM
          VisibleButtons = [nbFirst, nbPrior, nbNext, nbLast]
          TabOrder = 4
          Captions.Strings = (
            #26368#21069
            #21521#21069
            #21521#21518
            #26368#21518
            #25554#20837
            #21024#38500
            #32534#36753
            #25552#20132
            #25764#28040
            #21047#26032)
          CaptionsShow = False
          Spacing = 5
          Margin = -1
        end
      end
      object DBGrd_CSM: TDBGridEh
        Left = 0
        Top = 41
        Width = 687
        Height = 500
        Align = alClient
        DataSource = Ds_CSM
        DynProps = <>
        Flat = True
        IndicatorOptions = [gioShowRowIndicatorEh, gioShowRecNoEh]
        Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
        OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghDialogFind, dghShowRecNo, dghColumnResize, dghColumnMove, dghExtendVertLines]
        PopupMenu = PM_Grid
        TabOrder = 2
        TitleParams.MultiTitle = True
        object RowDetailData: TRowDetailPanelControlEh
        end
      end
    end
    object Tab2: TRzTabSheet
      Caption = 'Tab2'
      object Panel3: TPanel
        Left = 0
        Top = 0
        Width = 687
        Height = 41
        Align = alTop
        TabOrder = 0
        object Label5: TLabel
          Left = 14
          Top = 12
          Width = 51
          Height = 16
          Caption = #31532#19977#27493
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -16
          Font.Name = #23435#20307
          Font.Style = [fsBold]
          ParentFont = False
        end
        object Label4: TLabel
          Left = 77
          Top = 12
          Width = 150
          Height = 15
          Caption = #25968#25454#26657#39564#24182#20889#20837#25968#25454#24211
        end
      end
      object Panel6: TPanel
        Left = 0
        Top = 541
        Width = 687
        Height = 50
        Align = alBottom
        TabOrder = 1
        DesignSize = (
          687
          50)
        object Button6: TButton
          Left = 396
          Top = 10
          Width = 75
          Height = 25
          Action = Act_2_P
          Anchors = [akTop, akRight]
          TabOrder = 0
        end
        object Button7: TButton
          Left = 490
          Top = 10
          Width = 75
          Height = 25
          Action = Act_2_N
          Anchors = [akTop, akRight]
          TabOrder = 1
        end
        object Button8: TButton
          Left = 584
          Top = 10
          Width = 75
          Height = 25
          Action = Act_Exit
          Anchors = [akTop, akRight]
          TabOrder = 2
        end
      end
      object Panel8: TPanel
        Left = 0
        Top = 434
        Width = 687
        Height = 30
        Align = alBottom
        Caption = 'Panel8'
        TabOrder = 2
        object PB_JD: TProgressBar
          Left = 1
          Top = 1
          Width = 685
          Height = 28
          Align = alClient
          TabOrder = 0
        end
      end
      object Mem_JCTS: TMemo
        Left = 0
        Top = 41
        Width = 687
        Height = 393
        Align = alClient
        Lines.Strings = (
          'Mem_JCTS')
        TabOrder = 3
      end
      object Panel9: TPanel
        Left = 0
        Top = 464
        Width = 687
        Height = 77
        Align = alBottom
        BevelOuter = bvNone
        TabOrder = 4
        object Label6: TLabel
          Left = 16
          Top = 15
          Width = 191
          Height = 15
          Caption = #27491#22312#22788#29702#25968#25454','#35831#38144#20505'......'
        end
        object lbl_JD: TLabel
          Left = 16
          Top = 42
          Width = 191
          Height = 15
          Caption = #27491#22312#22788#29702#25968#25454','#35831#38144#20505'......'
        end
      end
    end
    object Tab3: TRzTabSheet
      Caption = 'Tab3'
      object Panel4: TPanel
        Left = 0
        Top = 0
        Width = 687
        Height = 41
        Align = alTop
        TabOrder = 0
        object Label7: TLabel
          Left = 14
          Top = 12
          Width = 51
          Height = 16
          Caption = #31532#22235#27493
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -16
          Font.Name = #23435#20307
          Font.Style = [fsBold]
          ParentFont = False
        end
      end
      object Panel7: TPanel
        Left = 0
        Top = 541
        Width = 687
        Height = 50
        Align = alBottom
        TabOrder = 1
        DesignSize = (
          687
          50)
        object Button9: TButton
          Left = 396
          Top = 10
          Width = 75
          Height = 25
          Anchors = [akTop, akRight]
          Caption = #19978#19968#27493
          TabOrder = 0
        end
        object Button10: TButton
          Left = 490
          Top = 10
          Width = 75
          Height = 25
          Anchors = [akTop, akRight]
          Caption = #19979#19968#27493
          Enabled = False
          TabOrder = 1
        end
        object Button11: TButton
          Left = 584
          Top = 10
          Width = 75
          Height = 25
          Action = Act_Exit
          Anchors = [akTop, akRight]
          TabOrder = 2
        end
      end
    end
  end
  object AQry_CSM: TADOQuery
    LockType = ltBatchOptimistic
    Parameters = <>
    Left = 145
    Top = 184
  end
  object Ds_CSM: TDataSource
    DataSet = AQry_CSM
    Left = 142
    Top = 249
  end
  object ActionList1: TActionList
    Left = 148
    Top = 119
    object Act_Exit: TAction
      Caption = #20851#38381
      OnExecute = Act_ExitExecute
    end
    object Act_0_N: TAction
      Caption = #19979#19968#27493
      OnExecute = Act_0_NExecute
    end
    object Act_1_P: TAction
      Caption = #19978#19968#27493
      OnExecute = Act_1_PExecute
    end
    object Act_1_N: TAction
      Caption = #19979#19968#27493
      OnExecute = Act_1_NExecute
    end
    object Act_2_P: TAction
      Caption = #19978#19968#27493
      OnExecute = Act_2_PExecute
    end
    object Act_2_N: TAction
      Caption = #23436#25104
      OnExecute = Act_2_NExecute
    end
    object Act_3_P: TAction
      Caption = #19978#19968#27493
      OnExecute = Act_3_PExecute
    end
    object Act_3_N: TAction
      Caption = #19979#19968#27493
      OnExecute = Act_3_NExecute
    end
    object Act_GridConfig_AQryCSM: TAction
      Caption = #34920#26684#35774#32622
      OnExecute = Act_GridConfig_AQryCSMExecute
    end
    object Act_DCExcel_AQryCSM: TAction
      Caption = #23548#20986#39044#35272#25968#25454
      OnExecute = Act_DCExcel_AQryCSMExecute
    end
  end
  object PM_Grid: TPopupMenu
    Left = 305
    Top = 214
    object N1: TMenuItem
      Action = Act_GridConfig_AQryCSM
    end
  end
  object AQry_DRM: TADOQuery
    Parameters = <>
    Left = 222
    Top = 129
  end
  object AQry_Tmp: TADOQuery
    Parameters = <>
    Left = 140
    Top = 326
  end
  object AQry_XZ: TADOQuery
    LockType = ltBatchOptimistic
    Parameters = <>
    Left = 224
    Top = 312
  end
  object Ds_1: TDataSource
    DataSet = AQRY_Excel
    OnStateChange = Ds_1StateChange
    OnDataChange = Ds_1DataChange
    OnUpdateData = Ds_1UpdateData
    Left = 38
    Top = 247
  end
  object ACON_DBE: TADOConnection
    LoginPrompt = False
    Left = 46
    Top = 119
  end
  object AQRY_Excel: TADOQuery
    Connection = ACON_DBE
    Parameters = <>
    Left = 41
    Top = 180
  end
  object AQry_DRCMD: TADOQuery
    Parameters = <>
    Left = 231
    Top = 212
  end
  object HzSpell1: THzSpell
    Left = 407
    Top = 98
  end
end



0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:3323次
    • 积分:71
    • 等级:
    • 排名:千里之外
    • 原创:4篇
    • 转载:0篇
    • 译文:0篇
    • 评论:1条
    文章分类
    文章存档