程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> Delphi >> datatree和數據庫綁定的最少代碼

datatree和數據庫綁定的最少代碼

編輯:Delphi
 unit mmslibrarypage;

  interface

  uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, ImgList, VirtualTrees, ComCtrls, ToolWin, mpToolBar,basicModal,DataModal,
    database,myScroll,insertdemon,MySQL,newmmsForlibrary;

  type
    TMMSLibraryForm = class(TPageForm)
      mainToolBar: TmpToolBar;
      btnNewMMS: TToolButton;
      btnDelete: TToolButton;
      DataTree: TVirtualStringTree;
      ilImages: TImageList;
      btnImport: TToolButton;
      btn2: TToolButton;
      btn3: TToolButton;
      btn4: TToolButton;
      btn5: TToolButton;
      btnExport: TToolButton;
      btnRefresh: TToolButton;
      procedure FormCreate(Sender: TObject);
      procedure btnNewMMSClick(Sender: TObject);
      procedure btnDeleteClick(Sender: TObject);
      procedure btnImportClick(Sender: TObject);
      procedure btnExportClick(Sender: TObject);
      procedure FormShow(Sender: TObject);
      procedure btnRefreshClick(Sender: TObject);
      procedure FormDestroy(Sender: TObject);
      procedure DataTreeGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
        Column: TColumnIndex; TextType: TVSTTextType;
        var CellText: WideString);
      procedure DataTreeInitNode(Sender: TBaseVirtualTree; ParentNode,
        Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
    
    private
      { Private declarations }
      stringlist:TStringList;
    public
      procedure  refreshtree();
    end;

    procedure GetMMSFromLibrary(dparam: TStringList; mysql_rows: PMySQL_ROW);

  type
   PMMSTreeNode=^TMMStreeNode;

  //自定義的datatree的結構
   TMMStreeNode=record
     mmsid:string;
     mmstype:string;
     mmssmil:string;
     mmssize:Integer;
     mmssubject:string;
   end;

  var
    MMSLibraryForm: TMMSLibraryForm;

  implementation

  {$R *.dfm}

  procedure TMMSLibraryForm.FormCreate(Sender: TObject);
  begin
  &nbs

[1] [2] [3] [4] [5] [6] 下一頁

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved