mirror of
https://github.com/KeymonSoft/ADM2.git
synced 2026-04-17 19:36:33 +00:00
VERSION 6.01.05
- Se cambio el nombre de las imagenes cuando se realiza a primera venta. - Se agrego la fecha de la bitacora en todos lados para que siempre ponga inicioi y fin
This commit is contained in:
@@ -560,15 +560,18 @@ Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
||||
End Sub
|
||||
|
||||
Sub gest_Click
|
||||
|
||||
c = Starter.skmt.ExecQuery("SELECT * FROM FOTOINICIAL")
|
||||
If c.RowCount = 0 Then
|
||||
Private hayFotoinicial As Boolean = False
|
||||
c = Starter.skmt.ExecQuery("SELECT CAT_VA_VALOR FROM CAT_VARIABLES where CAT_VA_DESCRIPCION = 'FOTO_INICIAL'")
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
If c.GetString("CAT_VA_VALOR") = "ENVIADA" Then hayFotoinicial = True
|
||||
End If
|
||||
If hayFotoinicial = False Then
|
||||
p_camara.Visible = True
|
||||
InitializeCamera
|
||||
Subs.panelVisible(p_camara, 0, 0)
|
||||
b_foto_inci.Text = "Foto tienda"
|
||||
Else
|
||||
|
||||
If la_cuenta.Text = "0" Then
|
||||
B4XPages.MainPage.tipo_venta = "ABORDO"
|
||||
Else If la_cuenta.Text = "1" Then
|
||||
@@ -608,6 +611,8 @@ Sub gest_Click
|
||||
' If B4XPages.MainPage.productos.prodsMap.IsInitialized And B4XPages.MainPage.productos.prodsMap.Size > 0 Then Subs.borraPedidoClienteActual
|
||||
B4XPages.ShowPage("productos")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Sub Tels_Click
|
||||
@@ -2860,9 +2865,10 @@ Sub Camera1_Ready (Success As Boolean)
|
||||
End Sub
|
||||
|
||||
Sub Camera1_PictureTaken (Data() As Byte)
|
||||
Private cliente As String = Subs.traeCliente
|
||||
If b_foto_inci.Text = "Foto tienda" Then
|
||||
DateTime.DateFormat="ddMMyyyyHHmmss"
|
||||
fototomada = DateTime.Now & "_tienda.jpg"
|
||||
fototomada = cliente & "_" & DateTime.Now & "_tienda.jpg"
|
||||
Dim filename As String = fototomada
|
||||
Dim dir As String = File.DirInternal
|
||||
camEx.SavePictureToFile(Data, dir, filename)
|
||||
@@ -2874,7 +2880,7 @@ Sub Camera1_PictureTaken (Data() As Byte)
|
||||
Dim Dir2 As String
|
||||
Try
|
||||
File.MakeDir(Dirp,"/adm")
|
||||
dir = "/amd"
|
||||
dir = "/adm"
|
||||
Log("creado en promotoria " & Dirp & dir)
|
||||
Catch
|
||||
dir = ""
|
||||
@@ -2908,15 +2914,15 @@ Sub Camera1_PictureTaken (Data() As Byte)
|
||||
LogColor("Mandamos foto tienda: " & fototomada, Colors.red)
|
||||
Log(dir)
|
||||
Log(Dir2)
|
||||
Log($"${Subs.traeAlmacen}, ${Subs.traeRuta}, ${Subs.traeCliente}, ${dir & Dir2 & "/" & fototomada}"$)
|
||||
Starter.mandaForma(Subs.traeAlmacen, Subs.traeRuta, Subs.traeCliente, dir & Dir2 & "/" & fototomada)
|
||||
Log($"${Subs.traeAlmacen}, ${Subs.traeRuta}, ${cliente}, ${dir & Dir2 & "/" & fototomada}"$)
|
||||
Starter.mandaForma(Subs.traeAlmacen, Subs.traeRuta, cliente, dir & Dir2 & "/" & fototomada)
|
||||
|
||||
' Starter.skmt.ExecNonQuery2("INSERT INTO FOTOINICIAL (RUTAA, ALMACEN, LATITUD, LONGITUD, FECHAHORA, FOTO, USUARIO) VALUES (?,?,?,?,?,?,?)",Array As Object(LA_RUTA, ALMACEN, B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, sDate & " " & sTime, File.ReadBytes(File.DirInternal & dir & Dir2, fototomada), Subs.traeUsuarioDeBD))
|
||||
b_foto_inci.Text = "Foto usuario"
|
||||
ChangeCamera_Click
|
||||
Else If b_foto_inci.Text = "Foto usuario" Then
|
||||
DateTime.DateFormat="ddMMyyyyHHmmss"
|
||||
fototomada = DateTime.Now & "_cliente.jpg"
|
||||
fototomada = cliente & "_" & DateTime.Now & "_cliente.jpg"
|
||||
Dim filename As String = fototomada
|
||||
Dim dir As String = File.DirInternal
|
||||
camEx.SavePictureToFile(Data, dir, filename)
|
||||
@@ -2960,8 +2966,8 @@ Sub Camera1_PictureTaken (Data() As Byte)
|
||||
out.Close
|
||||
|
||||
LogColor("Mandamos foto usuario: " & fototomada, Colors.red)
|
||||
Log($"${Subs.traeAlmacen}, ${Subs.traeRuta}, ${Subs.traeCliente}, ${dir & Dir2 & "/" & fototomada}"$)
|
||||
Starter.mandaForma(Subs.traeAlmacen, Subs.traeRuta, Subs.traeCliente, dir & Dir2 & "/" & fototomada)
|
||||
Log($"${Subs.traeAlmacen}, ${Subs.traeRuta}, ${cliente}, ${dir & Dir2 & "/" & fototomada}"$)
|
||||
Starter.mandaForma(Subs.traeAlmacen, Subs.traeRuta, cliente, dir & Dir2 & "/" & fototomada)
|
||||
|
||||
' B4XPages.MainPage.skmt.ExecNonQuery2("UPDATE FOTOINICIAL set FOTO2 = ? where USUARIO = ? and RUTAA = ? and ALMACEN = ? ", Array As Object (File.ReadBytes(File.DirInternal & dir & Dir2, fototomada), Subs.traeUsuarioDeBD,LA_RUTA, ALMACEN ))
|
||||
b_foto_inci.Text = "Foto tienda"
|
||||
|
||||
Reference in New Issue
Block a user