mirror of
https://github.com/KeymonSoft/Durakelo.git
synced 2026-04-20 04:39:17 +00:00
31/10/23 - Cambios en Cliente, Productos y Nota
- Se amplió el campo de la cantidad cuando se agrega un producto. - Se agregó que mande un Toast cuando se hace clic en Back en Cliente para que avise que hay que hacer clic en "Guardar" - Se corrigieron las acciones cuando se hace Back en algunas pantallas. - Se puso código para que en nota muestre de diferente color los productos de Venta y Preventa.
This commit is contained in:
@@ -24,6 +24,8 @@ Sub Class_Globals
|
||||
Private xui As XUI
|
||||
Public login As B4XMainPage
|
||||
Dim rp As RuntimePermissions
|
||||
Public Provider As FileProvider
|
||||
|
||||
Public principal As C_Principal 'Antes seleccion
|
||||
Public clientes As C_Clientes 'Antes Colonia
|
||||
Public cliente As C_Cliente 'Antes fila
|
||||
@@ -139,6 +141,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
' ruta = Starter.ruta
|
||||
ruta = File.DirInternal
|
||||
kh.Initialize(Me, "kh")
|
||||
Provider.Initialize
|
||||
' If(FirstTime) Then
|
||||
' g.Initialize("GPS")
|
||||
' End If
|
||||
@@ -404,15 +407,20 @@ 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
|
||||
'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
|
||||
End Sub
|
||||
|
||||
@@ -526,3 +534,22 @@ Sub copiaDB
|
||||
ToastMessageShow("Sin permisos", True)
|
||||
End If
|
||||
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)
|
||||
Sleep(1000)
|
||||
File.Copy(File.DirInternal, FileName, Provider.SharedFolder, FileName)
|
||||
Dim email As Email
|
||||
email.To.Add("cheveguerra@gmail.com")
|
||||
email.Subject = "subject"
|
||||
email.Attachments.Add(Provider.GetFileUri(FileName))
|
||||
' email.Attachments.Add(Provider.GetFileUri(FileName)) 'second attachment
|
||||
Dim in As Intent = email.GetIntent
|
||||
in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION
|
||||
StartActivity(in)
|
||||
End Sub
|
||||
Reference in New Issue
Block a user