Está en la página 1de 9

1/9/2021 Exemple SQLite3 - Entrada Saída e Saldo - AMSSpecialist

AMSSpecialist
  
 Enlaces rápidos
Sus mensajes
Nuevos mensajes
Mensajes no leídos
Temas sin respuesta
Temas activos

Buscar

 Usuarios
 El Equipo
 FAQ

Buscar…


sebast14101980

 Panel de Control del Usuario


 Perfil

 Desconectarte

 Panel de Control del Usuario


 Perfil

 Desconectarte

 Notificaciones 0
Notificaciones Preferencias
No tiene notificaciones
Ver todas

Notificaciones Preferencias
No tiene notificaciones
Ver todas

Exemple SQLite3 - Entrada Saída e Saldo


Ejemplos y plantillas para Autoplay Media Studio.
16 mensajes
Página 1 de 1

 Publicar una respuesta


 Email sobre el tema


 Vista para imprimir

 Buscar este tema…


Buscar

Exemple SQLite3 - Entrada Saída e Saldo

dripro  AMS Freak

Mensajes: 522
Registrado: 20 Nov 2015 14:57

11 Nov 2017 12:11

por dripro » 11 Nov 2017 12:11


 

HIDE: ON
Hidebb Message Hidden Description

Imagen

script

www.amsspecialist.com/viewtopic.php?f=12&t=3841 1/9
1/9/2021 Exemple SQLite3 - Entrada Saída e Saldo - AMSSpecialist
foundDBF = Folder.DoesExist(_SourceFolder .."\\DataBase");

if not foundDBF then

Folder.Create(_SourceFolder .."\\DataBase");

end

------------------------------------------------------------------------------------------------------
sDatabase = _SourceFolder.."\\DataBase\\db.db"

tInfo_Selected = nil;

db = SQLite3.Open(sDatabase);

nLastError = Application.GetLastError();

if nLastError ~= SQLite3.OK then

Dialog.Message("Error de Apertura de Base de Datos", SQLite3.GetLastErrorString());

end

function Convertdate(strdate)

if strdate then

if (tonumber(strdate)< 10) and (String.Length(strdate)<2) then

newDate = "0"..strdate

else
newDate =strdate

end

end

return newDate

end

------------------------------------------------------------------------------------------------------
SQLite3.Query(db,"CREATE TABLE Ussers (RecordID INTEGER PRIMARY KEY,"

.."\r\DATA TEXT,"

.."\r\TIPO TEXT,"

.."\r\DESCRISAO TEXT,"

.."\r\ENTRADA_1 TEXT,"

.."\r\ENTRADA_2 TEXT,"

.."\r\SAIDA_1 TEXT,"

.."\r\SAIDA_2 TEXT,"

.."\r\SALDO TEXT)")

SQLite3.Query(db, "CREATE TABLE Backup (RecordID INTEGER PRIMARY KEY,Date TEXT, Path TEXT)");

Backup = false;

------------------------------------------------------------------------------------------------------
function InputSoloNumeros(HwndInput)------------->> Só Opitar por Numeros

Args1 = string.format("%d,%d", HwndInput, -16)

GetWinLong = DLL.CallFunction("user32.dll", "GetWindowLongA", Args1, DLL_RETURN_TYPE_LONG,


Args2 Notificaciones
= string.format("%d,%d,%d", HwndInput, -16, GetWinLong + 8192)
Preferencias
No tiene notificaciones
DLL.CallFunction("user32.dll", "SetWindowLongA", Args2, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);

end
Ver todas

------------------------------------------------------------------------------------------------------
function HabilitarObjetos()------------->> Habilitar verdadeiro

if (i == 1) then

for count = 1,3 do

tProperties = {};

tProperties.ReadOnly = false;

Input.SetProperties("Input"..count, tProperties);

WinApi.EnableWindow(DialogEx.Close(IDOK), true);

i = 0;

end
end

end

------------------------------------------------------------------------------------------------------
function DesabilitarObjetos()------------->> Desabilitar falso

if (i == 1) then

else
for count = 1,3 do

tProperties = {};

tProperties.ReadOnly = true;

Input.SetProperties("Input"..count, tProperties);

i = 1;

end
end

end

DesabilitarObjetos()

------------------------------------------------------------------------------------------------------

Page.StartTimer(100, 1);

Page.StartTimer(100, 2);

------------------------------------------------------------------------------------------------------
function Pesquisar_Tabela()

Grid.DeleteNonFixedRows("Grid1", true);----->> Adicionar textos ao cabeçalho das colunas da grade

Grid.SetCellText("Grid1", 0, 0, "ID", false);

Grid.SetCellText("Grid1", 0, 1, "DATA", false);

Grid.SetCellText("Grid1", 0, 2, "TIPO", false);

Grid.SetCellText("Grid1", 0, 3, "DESCRIÇÃO", false);

Grid.SetCellText("Grid1", 0, 4, "ENTRADA", false);

Grid.SetCellText("Grid1", 0, 5, "SAÍDA", false);

Grid.SetCellText("Grid1", 0, 6, "SALDO", false);


www.amsspecialist.com/viewtopic.php?f=12&t=3841 2/9
1/9/2021 Exemple SQLite3 - Entrada Saída e Saldo - AMSSpecialist
G d.SetCe e t( G d , 0, 6, S O , a se);

Grid.Refresh("Grid1")

tInfo_Selected = SQLite3.QueryToTable(db, "Select * from Ussers", true)

for nRow = 1, tInfo_Selected.Rows do

for i, v in pairs (Pesquisar) do

if (String.Find(tInfo_Selected.Data[nRow]["TIPO"]..tInfo_Selected.Data[nRow]["DATA"], v, 1, false) ~=

local nLine = Grid.InsertRow("Grid1", -1, false);

Grid.SetCellText("Grid1", nLine, 0, tInfo_Selected.Data[nRow]["RecordID"], false);

Grid.SetCellText("Grid1", nLine, 1, tInfo_Selected.Data[nRow]["DATA"], false);

Grid.SetCellText("Grid1", nLine, 2, tInfo_Selected.Data[nRow]["TIPO"], false);

Grid.SetCellText("Grid1", nLine, 3, tInfo_Selected.Data[nRow]["DESCRISAO"], false);

Grid.SetCellText("Grid1", nLine, 4, tInfo_Selected.Data[nRow]["ENTRADA_1"], false);

Grid.SetCellText("Grid1", nLine, 5, tInfo_Selected.Data[nRow]["SAIDA_1"], false);

Grid.SetCellText("Grid1", nLine, 6, tInfo_Selected.Data[nRow]["SALDO"], false);

end

end

end

------------------------------------------------------------------------------------------------------
saldo = 0;

for x = 1, Grid.GetRowCount ("Grid1")-1 do

if Grid.GetCellText("Grid1", x, 4) ~= nil then

saldo = saldo + String.ToNumber (Grid.GetCellText("Grid1", x, 4)) - String.ToNumber (Grid.GetCellText(


local nNumber = saldo

local sCountry = "R$"

local bDecimal = true

local sCurrency = CurrencyGeran.ToCurrency(nNumber, sCountry, bDecimal);

Grid.SetCellText("Grid1", x, 6, sCurrency, true); --->> Resultado

end

end

------------------------------------------------------------------------------------------------------
entrada = 0;

for x = 1, Grid.GetRowCount ("Grid1")-1 do

if Grid.GetCellText("Grid1", x, 4) ~= nil then

entrada = entrada + String.ToNumber (Grid.GetCellText("Grid1", x, 4))

local nNumber = entrada

local sCountry = "R$"

local bDecimal = true

Notificaciones
local sCurrency = CurrencyGeran.ToCurrency(nNumber, sCountry, bDecimal);
Preferencias
Input.SetText("Input8", sCurrency);
No tiene notificaciones
end
Ver todas
end

saida = 0

for x = 1, Grid.GetRowCount ("Grid1")-1 do

if Grid.GetCellText("Grid1", x, 5) ~= nil then

saida = saida + String.ToNumber (Grid.GetCellText("Grid1", x, 5))

local nNumber = saida

local sCountry = "R$"

local bDecimal = true

local sCurrency = CurrencyGeran.ToCurrency(nNumber, sCountry, bDecimal);

Input.SetText("Input9", sCurrency);

end

end

returnNumber = 0

function OPERATION(operat)

number = entrada

if number == "" then

returnNumber = 0

else
returnNumber = String.ToNumber(number)

operation = operat

end

end

OPERATION("moins")

number = saida

if operation == "moins" then

returnNumber = returnNumber - String.ToNumber(number)

end

local nNumber = returnNumber

local sCountry = "R$"

local bDecimal = true

local sCurrency = CurrencyGeran.ToCurrency(nNumber, sCountry, bDecimal);

Input.SetText("Input10", sCurrency);

------------------------------------------------------------------------------------------------------

-------------------------------->> Entrada

entrada = 0;

for x = 1, Grid.GetRowCount ("Grid1")-1 do

if Grid.GetCellText ("Grid1", x, 4) ~= "" and String.ToNumber (Grid.GetCellText ("Grid1", x, 4)) ~= 0


entrada = String.ToNumber (Grid.GetCellText("Grid1", x, 4))
www.amsspecialist.com/viewtopic.php?f=12&t=3841 3/9
1/9/2021 Exemple SQLite3 - Entrada Saída e Saldo - AMSSpecialist
entrada String.ToNumber (Grid.GetCellText( Grid1 , x, 4))

local nNumber = entrada

local sCountry = "R$"

local bDecimal = true

local sCurrency = CurrencyGeran.ToCurrency(nNumber, sCountry, bDecimal);

Grid.SetCellText("Grid1", x, 4, sCurrency, true);

end

end

-------------------------------->> Saida

saida = 0;

for x = 1, Grid.GetRowCount ("Grid1")-1 do

if Grid.GetCellText ("Grid1", x, 5) ~= "" and String.ToNumber (Grid.GetCellText ("Grid1", x, 5)) ~= 0


saida = String.ToNumber (Grid.GetCellText("Grid1", x, 5))

local nNumber = saida

local sCountry = "R$"

local bDecimal = true

local sCurrency = CurrencyGeran.ToCurrency(nNumber, sCountry, bDecimal);

Grid.SetCellText("Grid1", x, 5, sCurrency, false);

end

end

------------------------------------------------------------------------------------------------------

Grid.AutoSize("Grid1", GVS_BOTH, true);

Grid.AutoSizeColumns("Grid1", GVS_BOTH, true);

Grid.ExpandColumnsToFit("Grid1", true, true);

--Grid.ExpandRowsToFit("Grid1", true, true);

Grid.Refresh("Grid1")

end

Imagen

Última edición por Dow Sher el 12 Nov 2017 23:47, editado 1 vez en total. 


Re: Exemple SQLite3 - Entrada Saída e Saldo

Dow Sher  Staff


Mensajes: 910
Registrado: 18 Ene 2014 21:58
Ubicación: Jalisco, México.

12 Nov 2017 23:56


Notificaciones Preferencias
No tiene notificaciones
Ver todas
por Dow Sher » 12 Nov 2017 23:56
 

Gracias por tu aporte... Le echaré un ojo...

Muevo a foro correspondiente 'Ejemplos y Plantillas'


Re: Exemple SQLite3 - Entrada Saída e Saldo

luasqlite  AMS Freak


Mensajes: 580
Registrado: 14 Abr 2016 19:03

13 Nov 2017 23:23

por luasqlite » 13 Nov 2017 23:23


 

El gran dipro

www.amsspecialist.com/viewtopic.php?f=12&t=3841 4/9
1/9/2021 Exemple SQLite3 - Entrada Saída e Saldo - AMSSpecialist


Re: Exemple SQLite3 - Entrada Saída e Saldo

dripro  AMS Freak


Mensajes: 522
Registrado: 20 Nov 2015 14:57

14 Nov 2017 10:32

por dripro » 14 Nov 2017 10:32


 

luasqlite escribió: ↑
13 Nov 2017 23:23
El gran dipro

grande amigo lene

Imagen

Notificaciones Preferencias

Re: Exemple SQLite3 - Entrada Saída e Saldo No tiene notificaciones
oussemaTN  Conoce Bien El Foro
Mensajes: 258
Ver todas
Registrado: 09 Sep 2017 05:57

18 Dic 2017 22:16

por oussemaTN » 18 Dic 2017 22:16


 

thnkssssssssssssssss


Re: Exemple SQLite3 - Entrada Saída e Saldo

usamakey  AMS Freak


Mensajes: 559
Registrado: 31 Ene 2011 19:25
Ubicación: Kandahar

19 Ene 2018 19:39

por usamakey » 19 Ene 2018 19:39


 

tnks m8

[Izzedin Al Qassam Group]


Re: Exemple SQLite3 - Entrada Saída e Saldo

www.amsspecialist.com/viewtopic.php?f=12&t=3841 5/9
1/9/2021 Exemple SQLite3 - Entrada Saída e Saldo - AMSSpecialist
Mensajes: 266
THEBEST1  Conoce Bien El Foro

Registrado: 29 Abr 2016 16:52


10 May 2018 15:33

por THEBEST1 » 10 May 2018 15:33


 

gracias


Re: Exemple SQLite3 - Entrada Saída e Saldo
mrflowers  Usuario Avanzado
Mensajes: 177
Registrado: 14 Feb 2011 15:03

17 May 2018 08:20

por mrflowers » 17 May 2018 08:20


 

Gracias


Re: Exemple SQLite3 - Entrada Saída e Saldo
miguelangel_one  Usuario Avanzado
Mensajes: 125
Registrado: 26 Feb 2011 00:19
Notificaciones
 Preferencias
No tiene notificaciones
Ver todas
30 May 2018 08:30

por miguelangel_one » 30 May 2018 08:30


 

muchas gracias...


Re: Exemple SQLite3 - Entrada Saída e Saldo

traveler  Usuario Avanzado


Mensajes: 168
Registrado: 14 Mar 2015 22:38

27 Nov 2019 20:31

por traveler » 27 Nov 2019 20:31


 

gracias


Re: Exemple SQLite3 - Entrada Saída e Saldo

traveler  Usuario Avanzado


Mensajes: 168
Registrado: 14 Mar 2015 22:38

27 Dic 2019 12:43

www.amsspecialist.com/viewtopic.php?f=12&t=3841 6/9
1/9/2021 Exemple SQLite3 - Entrada Saída e Saldo - AMSSpecialist

por traveler » 27 Dic 2019 12:43


 

Would anyone have this project to pass me because the Mega link is no longer available?

Thanks.

¿Alguien tendría este proyecto para aprobarme porque el enlace Mega ya no está disponible?

Gracias.

Alguém teria este projeto para me passar pois o link do Mega já não está mais disponível?

Obrigado.


Re: Exemple SQLite3 - Entrada Saída e Saldo
marcpv89  Usuario
Mensajes: 35
Registrado: 24 Ene 2012 12:32
Ubicación: Habana, Cuba

03 Ene 2020 16:17

por marcpv89 » 03 Ene 2020 16:17


 

probando

Informático, amante del futbol y el beisbol, azul de sangre y amante de la vida.


Re: Exemple SQLite3 - Entrada Saída e Saldo

patch  AMS Hacker


Mensajes: Notificaciones
336 Preferencias
Registrado: 25 Abr
No 2011
tiene 12:46
notificaciones
Ubicación: USAz
Ver todas

04 Ene 2020 11:17

por patch » 04 Ene 2020 11:17


 

Not something I would ever use but I have to say it's a nice example well done.

USAz english soz allz

Patch 1.0.0.3 Aero


Re: Exemple SQLite3 - Entrada Saída e Saldo
RuHor  Usuario
Mensajes: 90
Registrado: 01 Jun 2019 11:59

15 Ene 2020 17:45

por RuHor » 15 Ene 2020 17:45


 

thanks


Re: Exemple SQLite3 - Entrada Saída e Saldo
sistemci1988  Usuario
Mensajes: 88
Registrado: 29 Ene 2017 13:18

www.amsspecialist.com/viewtopic.php?f=12&t=3841 7/9
1/9/2021 Exemple SQLite3 - Entrada Saída e Saldo - AMSSpecialist

10 Feb 2020 15:15

por sistemci1988 » 10 Feb 2020 15:15


 

thank you


Re: Exemple SQLite3 - Entrada Saída e Saldo
orthiismusic  Usuario
Mensajes: 50
Registrado: 25 Nov 2019 09:56

24 Abr 2021 22:27

por orthiismusic » 24 Abr 2021 22:27


 

gracias

Respuesta Rápida

 Publicar una respuesta


 Email sobre el tema


 Vista para imprimir Notificaciones Preferencias
No tiene notificaciones
Ver todas
Buscar este tema…
Buscar

 Tema anterior
16 mensajes
Página 1 de 1
Tema siguiente 
Mostrar mensajes previos: Todos los mensajes
Ordenar por Fecha publicación
Ascendente
Ir
 Volver a “Ejemplos y Plantillas”
Ir a
 ¿Quién está conectado?
Temas Generales
En total hay 10 usuarios conectados :: 1 registrado, 0 ocultos y 9 invitados (basados en usuarios activos en los últimos 5 ↳   General
minutos)
↳   Noticias
La mayor cantidad de usuarios identificados fue 959 el 16 Sep 2019 09:33
↳   Dudas Generales
Autoplay Media Studio
Usuarios navegando por este Foro: sebast14101980 y 9 invitados ↳   Dudas
↳   Dudas Resueltas

 ↳   Programas
↳   Creaciones con AMS
Temas sin respuesta ↳   Tutoriales
Mensajes no leídos ↳   Cursos
Nuevos mensajes ↳   Peticiones de Tutoriales
Temas activos
↳   Ejemplos y Plantillas
↳   Scripts
↳   Ejemplos y Plantillas AMS 7
↳   Plugins
↳   Plugins AMS 7
↳   Utilidades
↳   Extras: Skins, Botones, etc...
↳   Desarrollo
Programación en General
↳   Aplicaciones Móviles
↳   Aplicaciones de Escritorio
↳   Desarrollo Web
↳   Diseño Gráfico
↳   Bases De Datos
↳   Oferta/Demanda desarrollo aplicaciones
Otros
www.amsspecialist.com/viewtopic.php?f=12&t=3841 8/9
1/9/2021 Exemple SQLite3 - Entrada Saída e Saldo - AMSSpecialist
↳   Setup Factory
↳   English Section

Notificaciones Preferencias
No tiene notificaciones
Ver todas

www.amsspecialist.com/viewtopic.php?f=12&t=3841 9/9

También podría gustarte