Libreria | Clase | Metodo |
AhoraAsistentes | Asistentes | DamefrmDlg_Fecha |
Implementación:
Public Function DamefrmDlg_Fecha() As Object Set DamefrmDlg_Fecha = New frmDlg_Fecha End Function
Descripción:
Abre un formulario que permite introducir una fecha, se recupera mediante la función Ver:
Public Function Ver( Optional aFecha As Variant, Optional aMsg As String, Optional aTop As Boolean = True) As Variant
Código VB6:
Set lForm = gCn.AhoraProceso("DamefrmDlg_Fecha", False)
lFecha = lForm.Ver(Date, "Introduzca la fecha del Pedido:")
Set lForm = Nothing
If lFecha = "" Or Not IsDate(lFecha) Then
MsgBox "ERROR. Debe introducir una fecha válida." , vbExclamation
Exit Sub
Else
gCn.EjecutaStoreCol "pPers_ActualizarPedido", lFecha
End If Código C#:
using AhoraAsistentes;
using AhoraCore;
using System;
using static AhoraCore.VBA.Interaction;
namespace AhoraScriptsVacia
{
public class Script_26 : AhoraOCX.AhoraBaseScript
{
public void Main()
{
IfrmDlg_Fecha lForm = null;
lForm = (IfrmDlg_Fecha)gCn.AhoraProceso("DamefrmDlg_Fecha", out _);
Valor lFecha = lForm.Ver(new Valor(DateTime.Now), gCn.Traducir(12641, "Introduza la fecha de actualización:"));
lForm = null;
if (lFecha.ToString().Length == 0 || !lFecha.IsDate())
{
MsgBox("ERROR. Debe introducir una fecha válida", VbMsgBoxStyle.vbExclamation);
return;
}
IVB6Collection<Valor> lColParam = gCn.DameNewCollection();
lColParam.Add(lFecha);
gCn.EjecutaStoreCol("pPers_ActualizaPedido", lColParam);
}
}
}