mirror of
https://github.com/KeymonSoft/Durakelo.git
synced 2026-04-17 19:36:12 +00:00
Se quitaron lineas comentadas
This commit is contained in:
@@ -105,7 +105,6 @@ End Sub
|
||||
Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
If Not(Starter.Logger) Then logger = False
|
||||
Root = Root1
|
||||
' Root.LoadLayout("MainPage")
|
||||
Root.LoadLayout("login")
|
||||
B4XPages.SetTitle(Me, "Durakelo")
|
||||
login.Initialize
|
||||
@@ -118,46 +117,25 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
B4XPages.AddPageAndCreate("Cliente", cliente)
|
||||
productos.Initialize
|
||||
B4XPages.AddPage("Productos", productos)
|
||||
' updateAvailable.Initialize
|
||||
' B4XPages.AddPage("updateAvailable", updateAvailable)
|
||||
' mapas.Initialize
|
||||
' B4XPages.AddPage("Mapas", mapas)
|
||||
' nuevoCliente.Initialize
|
||||
' B4XPages.AddPageAndCreate("NuevoCliente", nuevoCliente)
|
||||
ticketsDia.Initialize
|
||||
B4XPages.AddPage("TicketsDia", ticketsDia)
|
||||
noVenta.Initialize
|
||||
B4XPages.AddPage("NoVenta", noVenta)
|
||||
nota.Initialize
|
||||
B4XPages.AddPage("Nota", nota)
|
||||
' pedidos.Initialize
|
||||
' B4XPages.AddPage("Pedidos", pedidos)
|
||||
promos.Initialize
|
||||
B4XPages.AddPage("Promos", promos)
|
||||
historico.Initialize
|
||||
B4XPages.AddPage("Historico", historico)
|
||||
' checklist.Initialize
|
||||
' B4XPages.AddPage("CheckList", checklist)
|
||||
' ruta = Starter.ruta
|
||||
ruta = File.DirInternal
|
||||
kh.Initialize(Me, "kh", Starter.skmt)
|
||||
Provider.Initialize
|
||||
' If(FirstTime) Then
|
||||
' g.Initialize("GPS")
|
||||
' End If
|
||||
' se crea o no el archivo de la base de ddatos de kmt
|
||||
'NOTAS SI SE MODIFICA LA ESTRUCTURA SE QUITA EL IF Y SE VA DIRECTO A LA SENTENCIA FILE.COPY PARA QUE
|
||||
'TOME LA NUEVA ESTRUCTURA ES MUY IMPORTANTE TENER EL IF DE LO CONTRARIO SOLO LO ESCRIBE UNA VEZ Y LO BORRA
|
||||
'SI SE REGRESA A ESTE ACTIVIDAD.
|
||||
' Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
|
||||
' Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
|
||||
kh.guardaAppInfo
|
||||
Dim sDate, sTime As String
|
||||
DateTime.DateFormat = "yyyyMMdd"
|
||||
sDate=DateTime.Date(DateTime.Now)
|
||||
|
||||
Starter.skmt.ExecNonQuery("DROP TABLE IF EXISTS PEDIDO3")
|
||||
' skmt.ExecNonQuery("DROP VIEW TOTAL_MARCAS")
|
||||
|
||||
Starter.skmt.ExecNonQuery("CREATE VIEW IF NOT EXISTS CATALOGO AS Select CAT_GP_CLASIF, CAT_GP_ID FROM CAT_GUNAPROD UNION Select CAT_GP_CLASIF, CAT_GP_ID FROM CAT_GUNAPROD2 GROUP BY CAT_GP_CLASIF, CAT_GP_ID")
|
||||
Starter.skmt.ExecNonQuery("create view IF NOT EXISTS total_marcas AS Select cat_gp_clasif, sum(pe_costo_tot) As total from CATALOGO, pedido where pe_proid = cat_gp_id And pe_cliente <> 0 group by cat_gp_clasif")
|
||||
@@ -186,12 +164,10 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
Starter.DBReqServer = c.GetString("CAT_VA_VALOR")
|
||||
End If
|
||||
Dim P As PhoneId
|
||||
'user.Text = P.GetDeviceId
|
||||
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE)
|
||||
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
|
||||
If Result Then
|
||||
Dim P As PhoneId
|
||||
'user.Text = P.GetDeviceId
|
||||
IMEI = P.GetDeviceId
|
||||
IMEI = ""
|
||||
Else
|
||||
@@ -211,36 +187,24 @@ End Sub
|
||||
|
||||
Sub B4XPage_Appear
|
||||
l_version.Text = Application.VersionName
|
||||
' copiaDB
|
||||
' server = "http://10.0.0.205:1782"
|
||||
|
||||
reqManager.Initialize(Me, Starter.DBReqServer)
|
||||
Log(Starter.DBReqServer)
|
||||
' If g.GPSEnabled=False Then
|
||||
' ToastMessageShow("Habilitar el GPS", True)
|
||||
' StartActivity(g.LocationSettingsIntent)
|
||||
' Else
|
||||
' g.Start(0,0)
|
||||
' End If
|
||||
' user.Text ="GPS"
|
||||
c = Starter.skmt.ExecQuery2("select count(*) as CUANTOS from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("FECHA"))
|
||||
c.Position =0
|
||||
If c.GetString("CUANTOS") = 0 Then
|
||||
cmd.Initialize
|
||||
cmd.Name = "select_fechat"
|
||||
reqManager.ExecuteQuery(cmd , 0, "fecha")
|
||||
|
||||
'Msgbox("AJUSTAR FECHA","AVISO")
|
||||
B4XPage_Appear
|
||||
Else
|
||||
c = Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("FECHA"))
|
||||
c.Position =0
|
||||
Dim sDate,sTime As String
|
||||
|
||||
DateTime.dateFormat = "yyyyMMddHHmm"
|
||||
sDate=DateTime.Date(DateTime.Now)
|
||||
|
||||
'Msgbox("aaa"& sDate,"aviso")
|
||||
If c.GetString("CAT_VA_VALOR") > sDate & sTime Then
|
||||
' Msgbox("AJUSTAR LA FECHA YA QUE ES MENOR AL SISTEMA " & " "& c.GetString("CAT_VA_VALOR") & " " & sDate & sTime ,"AVISO")
|
||||
DateTime.TimeFormat = "MM/dd/yyyyHH:mm:ss"
|
||||
@@ -269,16 +233,16 @@ Sub B4XPage_Appear
|
||||
If c.GetString("CUANTOS") = 0 Then
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("MACIMP","0"))
|
||||
End If
|
||||
|
||||
|
||||
c=Starter.skmt.ExecQuery("select COUNT(*) AS CUANTOS FROM VERSION")
|
||||
c.Position= 0
|
||||
|
||||
|
||||
If c.GetString("CUANTOS") = 0 Then
|
||||
Starter.skmt.ExecNonQuery("delete from VERSION")
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO VERSION(NOVERSION) VALUES (?)", Array As Object ("2.6"))
|
||||
End If
|
||||
c.Close
|
||||
|
||||
|
||||
c=Starter.skmt.ExecQuery("select NOVERSION FROM VERSION")
|
||||
c.Position = 0
|
||||
|
||||
@@ -295,7 +259,6 @@ Sub B4XPage_Appear
|
||||
ToastMessageShow("No permission", True)
|
||||
End If
|
||||
Starter.usuario = kh.traeUsuarioDeDB
|
||||
' dameUsuario 'Obtenemos el usuario registrado
|
||||
CallSubDelayed(FirebaseMessaging, "SubscribeToTopics")
|
||||
End Sub
|
||||
|
||||
@@ -408,18 +371,6 @@ Sub JobDone(Job As HttpJob)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Sub Activity_KeyPress (key As Int) As Boolean
|
||||
' ' BACK key pressed
|
||||
' If key=KeyCodes.KEYCODE_BACK Then
|
||||
' ' I want to capture the key here so I return True
|
||||
' 'StartActivity(Main)
|
||||
' ExitApplication
|
||||
' 'Return True
|
||||
' End If
|
||||
' ' Returning False signals the system to handle the key
|
||||
' Return False
|
||||
'End Sub
|
||||
|
||||
Private Sub B4XPage_CloseRequest As ResumableSub
|
||||
ExitApplication
|
||||
Return False
|
||||
@@ -427,12 +378,8 @@ End Sub
|
||||
|
||||
Sub GPS_LocationChanged (Location1 As Location)
|
||||
If user.text = "GPS" Then
|
||||
'user.Text=Location1.ConvertToMinutes(Location1.Latitude)
|
||||
'pass.text=Location1.ConvertToMinutes(Location1.Longitude)
|
||||
user.Text=Location1.Latitude
|
||||
pass.text=Location1.Longitude
|
||||
'btnTakePicture.Enabled = True
|
||||
's.ExecNonQuery2("INSERT INTO HIST_GPS (HGDATE,HGLAT, HGLON) VALUES(?,?,?) ", Array As Object (sDate & sTime, lat_gps, lon_gps))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -460,11 +407,9 @@ Sub ImageView4_Click
|
||||
Label1.TextSize = 20
|
||||
Label1.TextColor = Colors.Black
|
||||
ListView1.AddSingleLine(Starter.DBReqServer)
|
||||
|
||||
c=Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("SERVER"))
|
||||
c.Position =0
|
||||
E_SERVER.text = c.GetString("CAT_VA_VALOR")
|
||||
' Panel1.Visible = True
|
||||
kh.panelVisible(Panel1, 0, 0)
|
||||
End Sub
|
||||
|
||||
@@ -538,8 +483,6 @@ End Sub
|
||||
|
||||
'Enviamos la base de datos por correo o Whatsapp
|
||||
Private Sub b_envioBD_Click
|
||||
' copiaDB
|
||||
' Sleep(1000)
|
||||
Dim FileName As String = "kmt.db"
|
||||
'copy the shared file to the shared folder
|
||||
Log("xxxxxx:"&Provider.SharedFolder)
|
||||
|
||||
@@ -43,7 +43,7 @@ ModuleBreakpoints7=
|
||||
ModuleBreakpoints8=
|
||||
ModuleBreakpoints9=
|
||||
ModuleClosedNodes0=
|
||||
ModuleClosedNodes1=2,3,6,7
|
||||
ModuleClosedNodes1=2,3,6,7,19
|
||||
ModuleClosedNodes10=
|
||||
ModuleClosedNodes11=
|
||||
ModuleClosedNodes12=
|
||||
@@ -64,6 +64,6 @@ ModuleClosedNodes6=1
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=1,3,31,35,36,37,38,39,40,41,42
|
||||
NavigationStack=B4XMainPage,Initialize,96,0,C_Productos,Class_Globals,0,0,C_Productos,lv_catalogos_ItemClick,295,0,C_Principal,cargar_Click,875,0,C_Productos,B4XPage_Appear,268,6,C_Cliente,B4XPage_Created,156,3,C_Cliente,B4XPage_Appear,264,4,C_Productos,clv_prods_ll_VisibleRangeChanged,1212,0,C_Productos,Busca_TextChanged,1271,0,C_Productos,LlenaProdsLL,1310,0
|
||||
NavigationStack=C_Cliente,B4XPage_Created,156,3,C_Cliente,B4XPage_Appear,264,4,C_Productos,clv_prods_ll_VisibleRangeChanged,1212,0,C_Productos,Busca_TextChanged,1266,0,B4XMainPage,Initialize,96,0,B4XMainPage,B4XPage_Created,163,0,B4XMainPage,B4XPage_Appear,254,0,B4XMainPage,JobDone,366,0,B4XMainPage,GPS_LocationChanged,375,0,B4XMainPage,ImageView4_Click,402,0,B4XMainPage,b_envioBD_Click,478,0
|
||||
SelectedBuild=0
|
||||
VisibleModules=19,1,8,16,6,3,9,20,10,21,12
|
||||
|
||||
Reference in New Issue
Block a user