VERSION 5.00
Object = "{90F3D7B3-92E7-44BA-B444-6A8E2A3BC375}#1.0#0"; "actskin4.ocx"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FTranspendientes 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Transacciones Pendientes"
   ClientHeight    =   4785
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9255
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4785
   ScaleWidth      =   9255
   StartUpPosition =   3  'Windows Default
   Begin ACTIVESKINLibCtl.Skin sknTran 
      Left            =   2640
      OleObjectBlob   =   "FTranspendientes.frx":0000
      Top             =   4080
   End
   Begin MSDataGridLib.DataGrid dbTransPend 
      Height          =   3615
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   9015
      _ExtentX        =   15901
      _ExtentY        =   6376
      _Version        =   393216
      AllowUpdate     =   -1  'True
      HeadLines       =   1
      RowHeight       =   20
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   11.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "[F3] Eliminar - Transacciones Pendientes"
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   3082
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   3082
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton cmdaceptar 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Aceptar"
      Default         =   -1  'True
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   6120
      Picture         =   "FTranspendientes.frx":0234
      Style           =   1  'Graphical
      TabIndex        =   1
      Tag             =   "R ASDASD"
      Top             =   3840
      Width           =   1455
   End
   Begin VB.CommandButton cmdcancelar 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Cancelar"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   7560
      Picture         =   "FTranspendientes.frx":02CA
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   3840
      Width           =   1455
   End
   Begin VB.Label lblcorrelativo 
      Height          =   375
      Left            =   240
      TabIndex        =   3
      Top             =   4200
      Visible         =   0   'False
      Width           =   1215
   End
End
Attribute VB_Name = "FTranspendientes"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Se retiraron los Fuentes de la red el 24/04/2003
Option Explicit
Private MobjFacturacionCombust As DB_OP_FACTURACION.C_VENTASPLAYA

Private Sub cmdAceptar_Click()
  ' Se Cargan los datos de la Transacción en la Pantalla
  ' FdatosClientCombust
  If Not IsNull(dbTransPend.Bookmark) Then
     GblnVienedePendientes = True
     lblcorrelativo.Caption = dbTransPend.Columns(0).Text
     FDatosClientCombust.Show vbModal
     GblnVienedePendientes = False
  Else
     MsgBox "No se puede Restaurar Transacción", vbDefaultButton1 + vbExclamation, "Advertencia"
  End If
End Sub

Private Sub cmdCancelar_Click()
  Unload Me
End Sub
 
Private Sub dbTransPend_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     Screen.MousePointer = 11
     cmdAceptar_Click
     Screen.MousePointer = 0
  End If
  
  If KeyAscii = 27 Then
     Unload Me
  End If
  
End Sub

Private Sub dbTransPend_KeyUp(KeyCode As Integer, Shift As Integer)
On Error GoTo errhandler
  If KeyCode = vbKeyF3 Then
    If Not IsNull(dbTransPend.Bookmark) Then
     If MsgBox("Seguro que desea Elimiar venta en cara " & dbTransPend.Columns(1), vbYesNo + vbQuestion, "Advertencia") = vbYes Then
        
        If Trim(dbTransPend.Columns(2)) <> "" Then
            gstrRuc = ""  'Pablo N.
        End If
        MobjFacturacionCombust.EliminarTransTemporal (dbTransPend.Columns(0).Text)
        MsgBox "Transacción fue eliminada", vbDefaultButton1 + vbInformation, "Mensaje"
        Set dbTransPend.DataSource = MobjFacturacionCombust.ListarDatosCabeceraTemporal
        dbTransPend.Refresh
  
        'Dar Formato a la Grilla
        dbTransPend.Columns(0).Visible = False
        dbTransPend.Columns(1).Width = 900
        dbTransPend.Columns(2).Width = 2000
        dbTransPend.Columns(3).Width = 3700
        dbTransPend.Columns(4).Width = 2000

     End If
    End If
  End If
Exit Sub
errhandler:
    MsgBox Err.Description, vbDefaultButton1 + vbCritical, "Error"
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
   If KeyCode = 27 Then
      Unload Me
   End If
End Sub

Private Sub Form_Load()
  
  Me.KeyPreview = True
  
  sknTran.LoadSkin (App.Path & "\Skins\" & gstrSkin)
sknTran.ApplySkin (Me.hWnd)
  
  Set MobjFacturacionCombust = New DB_OP_FACTURACION.C_VENTASPLAYA
  Set dbTransPend.DataSource = MobjFacturacionCombust.ListarDatosCabeceraTemporal
  dbTransPend.Refresh
  
  'Dar Formato a la Grilla
  dbTransPend.Columns(0).Visible = False
  dbTransPend.Columns(1).Width = 900
  dbTransPend.Columns(2).Width = 2000
  dbTransPend.Columns(3).Width = 3700
  dbTransPend.Columns(4).Width = 2000
  
  
End Sub

Private Sub Form_Unload(Cancel As Integer)
   GblnVienedePendientes = False
   Set MobjFacturacionCombust = Nothing
End Sub

Public Sub GactualizarPendientes()
  Set dbTransPend.DataSource = MobjFacturacionCombust.ListarDatosCabeceraTemporal
  dbTransPend.Refresh
  
  'Dar Formato a la Grilla
  dbTransPend.Columns(0).Visible = False
  dbTransPend.Columns(0).Locked = True
  dbTransPend.Columns(1).Width = 900
  dbTransPend.Columns(1).Locked = True
  dbTransPend.Columns(2).Width = 2000
  dbTransPend.Columns(2).Locked = True
  dbTransPend.Columns(3).Width = 3700
  dbTransPend.Columns(3).Locked = True
  dbTransPend.Columns(4).Width = 2000
  dbTransPend.Columns(4).Locked = True

End Sub

