Skip to content

Commit

Permalink
Carga de Egresos
Browse files Browse the repository at this point in the history
  • Loading branch information
MontiQt committed Mar 3, 2017
1 parent 2346a66 commit ff817a2
Show file tree
Hide file tree
Showing 8 changed files with 302 additions and 94 deletions.
21 changes: 19 additions & 2 deletions SireCu/Clases/Egreso.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,25 @@

Module Egreso

Public Sub nuevo_egreso()

Public Sub nuevo_egreso(ByVal compro As String, ByVal proveedor As String, ByVal categoria As String, ByVal persona As String,
ByVal fecha As Date, ByVal tipo_comp As String, ByVal secc As String, ByVal reintegro As Date, ByVal monto As Double,
ByVal comentario As String)
Principal.query = "INSERT INTO egresos (nro_comprobante, proveedor_id, categoria_gasto_id, persona_id, " &
"fecha, tipo_comprobante_id, seccional_id, mes_reintegro, monto, comentario)" &
"VALUES (@nro_comprobante, @proveedor, @cat_gasto, @persona, @fecha, @t_comprobante, " &
"@seccional, @reintegro, @monto, @comentario)"
Principal.command.Parameters.AddWithValue("@nro_comprobante", compro)
Principal.command.Parameters.AddWithValue("@proveedor", proveedor)
Principal.command.Parameters.AddWithValue("@cat_gasto", categoria)
Principal.command.Parameters.AddWithValue("@persona", persona)
Principal.command.Parameters.AddWithValue("@fecha", fecha)
Principal.command.Parameters.AddWithValue("@t_comprobante", tipo_comp)
Principal.command.Parameters.AddWithValue("@seccional", secc)
Principal.command.Parameters.AddWithValue("@reintegro", reintegro)
Principal.command.Parameters.AddWithValue("@monto", monto)
Principal.command.Parameters.AddWithValue("@comentario", comentario)

consultarNQ(Principal.query, Principal.command)
End Sub

Public Sub modificar_egreso()
Expand Down
16 changes: 0 additions & 16 deletions SireCu/Clases/Ingreso.vb
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,6 @@ Module Ingreso

End Function

Public Function ultimoaño()

Principal.query = "SELECT fecha FROM ingresos ORDER BY fecha DESC"
consultarNQ(Principal.query, Principal.command)
ClearDataset(Principal.dataset)

Principal.adapter = New SqlCeDataAdapter(Principal.command)
Principal.adapter.Fill(Principal.dataset.Tables("ingresos"))

If (Principal.dataset.Tables("ingresos").Rows.Count() = 0) Then
Return ("2000")
Else : Return (DatePart(DateInterval.Year, Principal.dataset.Tables("ingresos").Rows.Item(0).Item("fecha")))
End If

End Function

Public Function verificar_año(ByVal año As Integer)

Principal.query = "SELECT * from ingresos where DATEPART(Year, fecha) = '" & año & "'"
Expand Down
Binary file modified SireCu/DBSireCu.sdf
Binary file not shown.
85 changes: 44 additions & 41 deletions SireCu/Egresos/ABMEgresos.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ff817a2

Please sign in to comment.