Android-xe10-sqlite

Diğer veritabanları ve SQL komutlarıyla ilgli sorularınızı sorabilirsiniz. Delphi tarafındaki sorularınızı lütfen Programlama forumunda sorunuz.
makif42
Üye
Mesajlar: 36
Kayıt: 29 Mar 2016 02:14

Re: Android-xe10-sqlite

Mesaj gönderen makif42 » 15 Nis 2016 12:15

Kod: Tümünü seç

unit Unit3;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
  FMX.Objects, FMX.Controls.Presentation, Data.DbxSqlite, Data.FMTBcd,
  Fmx.Bind.Grid, System.Rtti, System.Bindings.Outputs, Fmx.Bind.Editors,
  Data.Bind.EngExt, Fmx.Bind.DBEngExt, Data.Bind.Components, FMX.Layouts,
  FMX.Grid, Data.Bind.Grid, Data.Bind.DBScope, Data.DB, Data.SqlExpr,
  FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf,
  FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async,
  FireDAC.Phys, FireDAC.FMXUI.Wait, FireDAC.Comp.Client,
  FireDAC.Phys.SQLite, FireDAC.Phys.SQLiteDef, FireDAC.Stan.ExprFuncs, System.IOUtils,
  Datasnap.Provider;

type
  Tincome = class(TForm)
    ToolBar1: TToolBar;
    Label1: TLabel;
    Image1: TImage;
    p4: TPanel;
    Panel1: TPanel;
    Label4: TLabel;
    Label5: TLabel;
    Panel2: TPanel;
    bDelete: TButton;
    bAdd: TButton;
    bOK: TButton;
    StringGridBindSourceDB1: TStringGrid;
    LedgerConnection: TSQLConnection;
    GelirTable: TSQLDataSet;
    GelirTablegelirad: TWideMemoField;
    GelirTablegelirmiktar: TLargeintField;
    BindSourceDB1: TBindSourceDB;
    BindingsList1: TBindingsList;
    LinkGridToDataSourceBindSourceDB1: TLinkGridToDataSource;
    DataSetProvider1: TDataSetProvider;
    procedure FormKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char;
      Shift: TShiftState);
    procedure bAddClick(Sender: TObject);
    procedure bOKClick(Sender: TObject);
    procedure LedgerConnectionBeforeConnect(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  income: Tincome;

implementation

{$R *.fmx}

uses Unit2;

procedure Tincome.bAddClick(Sender: TObject);
begin
GelirTable.Active:=True;
GelirTable.Insert;
bAdd.Visible:=False;
bOK.Visible:=True;
end;

procedure Tincome.bOKClick(Sender: TObject);
begin
GelirTable.Refresh;
bOK.Visible:=False;
bAdd.Visible:=True;
end;

procedure Tincome.FormKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char;
  Shift: TShiftState);
begin
if Key = vkHardwareBack then
  begin
    menu.Show;
    income.Hide;
  end;
end;

procedure Tincome.LedgerConnectionBeforeConnect(Sender: TObject);
begin
{$IF DEFINED(ANDROID)}
LedgerConnection.Params.Values['Database']:=TPath.Combine(TPath.GetDocumentsPath,'tl.db');
{$ENDIF}
end;



end.

Cevapla