Skip to content

Commit

Permalink
Merge pull request #2 from mauryparra/develop
Browse files Browse the repository at this point in the history
Primer Sprint
  • Loading branch information
MontiQt authored Feb 20, 2017
2 parents 12e3d8e + 8881efd commit b1a9b31
Show file tree
Hide file tree
Showing 34 changed files with 2,842 additions and 129 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ipch/
*.ncb
*.opendb
*.opensdf
*.sdf
# *.sdf Archivo de BD SQL CE
*.cachefile
*.VC.db
*.VC.VC.opendb
Expand Down Expand Up @@ -136,6 +136,7 @@ DocProject/Help/html

# Click-Once directory
publish/
publicar/

# Publish Web Output
*.[Pp]ublish.xml
Expand Down
12 changes: 12 additions & 0 deletions SireCu/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="SireCu.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<userSettings>
<SireCu.My.MySettings>
<setting name="CadenaConexion" serializeAs="String">
<value>Data Source = |DataDirectory|\DBSireCu.sdf</value>
</setting>
</SireCu.My.MySettings>
</userSettings>
</configuration>
128 changes: 128 additions & 0 deletions SireCu/Clases/Egreso.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
Public Class Egreso

Private nComp As String
Private provee As String
Private cGasto As String
Private gasta As String
Private fecha As DateTime
Private tipComp As String
Private uda As String
Private reintegro As Integer
Private mont As Double
Private comen As String

'Constructor
Public Sub New(ByVal numComprobante As String, ByVal proveedor As String, ByVal catGasto As String, _
ByVal gastador As String, ByVal fechaEgreso As DateTime, ByVal tipoComprobante As String, _
ByVal uda As String, ByVal mesReintegro As Integer, ByVal monto As Double, ByVal comentario As String)
Me.nComp = numComprobante
Me.provee = proveedor
Me.cGasto = catGasto
Me.gasta = gastador
Me.fecha = fechaEgreso
Me.tipComp = tipocomprobante
Me.uda = uda
Me.reintegro = mesReintegro
Me.mont = monto
Me.comen = comentario

End Sub
'Get & Set
Public Property numcomprobante() As String
Get
Return nComp
End Get
Set(ByVal value As String)
nComp = value
End Set
End Property
Public Property proveedor() As String
Get
Return provee
End Get
Set(ByVal value As String)
provee = value
End Set
End Property
Public Property catGasto() As String
Get
Return cGasto
End Get
Set(ByVal value As String)
cGasto = value
End Set
End Property
Public Property gastador() As String
Get
Return gasta
End Get
Set(ByVal value As String)
gasta = value
End Set
End Property
Public Property fechaEgreso() As DateTime
Get
Return fecha
End Get
Set(ByVal value As DateTime)
fecha = value
End Set
End Property
Public Property tipoComprobante() As String
Get
Return tipComp
End Get
Set(ByVal value As String)
tipComp = value
End Set
End Property
Public Property seccionalUDA() As String
Get
Return uda
End Get
Set(ByVal value As String)
uda = value
End Set
End Property
Public Property mesReintegro() As Integer
Get
Return reintegro
End Get
Set(ByVal value As Integer)
reintegro = value
End Set
End Property
Public Property monto() As Double
Get
Return mont
End Get
Set(ByVal value As Double)
mont = value
End Set
End Property
Public Property comentario() As String
Get
Return comen
End Get
Set(ByVal value As String)
comen = value
End Set
End Property

Public Sub cargar_egreso()

End Sub

Public Sub modificar_egreso()

End Sub

Public Sub eliminar_egreso()

End Sub

Public Sub filtrar_datos()

End Sub

End Class
85 changes: 85 additions & 0 deletions SireCu/Clases/Ingreso.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
Imports System.Data.SqlServerCe

Module Ingreso

Public Sub modificar_ingreso(ByVal mes As String, ByVal año As Integer, ByVal iprov As Double,
ByVal iotros As Double, ByVal icen As Double)

Principal.query = "UPDATE ingresos SET ingresos_prov = @iProvinciales, ingresos_otros = @iOtros, ingresos_central = @iCentral WHERE " &
"DATEPART(month, fecha) = '" & mes & "'" & " And DatePart(Year, fecha) = '" & año & "'"
Principal.command.Parameters.AddWithValue("@iProvinciales", iprov)
Principal.command.Parameters.AddWithValue("@iOtros", iotros)
Principal.command.Parameters.AddWithValue("@iCentral", icen)

consultarNQ(Principal.query, Principal.command)

Principal.command.Parameters.Clear()

End Sub

Public Function mostrar_ingreso(ByVal mes As Integer, ByVal año As Integer)

Principal.query = "SELECT * from ingresos where DATEPART(month, fecha) = '" & mes & "'" &
" And DatePart(Year, fecha) = '" & año & "'"

consultarNQ(Principal.query, Principal.command)
Principal.adapter = New SqlCeDataAdapter(Principal.command)
ClearDataset(Principal.dataset)
Principal.adapter.Fill(Principal.dataset.Tables("ingresos"))

Dim array() As String
If (Principal.dataset.Tables("ingresos").Rows.Count = 0) Then
array = {0}
Return (array)
Else
array = {
Principal.dataset.Tables("ingresos").Rows.Item(0).Item("ingresos_prov"),
Principal.dataset.Tables("ingresos").Rows.Item(0).Item("ingresos_central"),
Principal.dataset.Tables("ingresos").Rows.Item(0).Item("ingresos_otros")
}
Return array
End If

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 & "'"
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 (False)
Else
Return (True)
End If

End Function

Public Sub new_año(ByVal año As String)
For i = 1 To 12
Principal.query = "INSERT INTO ingresos (fecha, ingresos_prov, ingresos_central, ingresos_otros)" &
"VALUES ('" & i & "-01-" & año & "' , '0,0', '0,0', '0,0')"
consultarNQ(Principal.query, Principal.command)
Next
End Sub

End Module
24 changes: 24 additions & 0 deletions SireCu/Clases/Personas/Persona.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Public Class Persona

Protected nom As String
Protected ape As String

'Get & Set
Public Property nombre() As String
Get
Return nom
End Get
Set(ByVal value As String)
nom = value
End Set
End Property
Public Property apellido() As String
Get
Return ape
End Get
Set(ByVal value As String)
ape = value
End Set
End Property

End Class
15 changes: 15 additions & 0 deletions SireCu/Clases/Personas/Usuarios/usuarioAdmin.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Public Class usuarioAdmin

Inherits personaUsuario

'Constructor
Public Sub New(ByVal nombre As String, ByVal apellido As String, _
ByVal cuenta As String, ByVal password As String, ByVal email As String)
Me.nom = nombre
Me.ape = apellido
Me.acc = cuenta
Me.pass = password
Me.mail = email
End Sub

End Class
27 changes: 27 additions & 0 deletions SireCu/Clases/Personas/Usuarios/usuarioContador.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Public Class usuarioContador

Inherits personaUsuario

'Constructor
Public Sub New(ByVal nombre As String, ByVal apellido As String, _
ByVal cuenta As String, ByVal password As String, ByVal email As String)
Me.nom = nombre
Me.ape = apellido
Me.acc = cuenta
Me.pass = password
Me.mail = email
End Sub

Public Sub crear_cuenta()

End Sub

Public Sub modificar_cuenta()

End Sub

Public Sub eliminar_cuenta()

End Sub

End Class
48 changes: 48 additions & 0 deletions SireCu/Clases/Personas/personaGastador.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Public Class personaGastador

Inherits Persona

Private loca As String
Private tel As Integer
Private gastado As Double

'Constructor
Public Sub New(ByVal nombre As String, ByVal apellido As String, _
ByVal localidad As String, ByVal telefono As String, ByVal totalGastado As Double)
Me.nom = nombre
Me.ape = apellido
Me.loca = localidad
Me.tel = telefono
Me.gastado = totalGastado
End Sub
'Get & Set
Public Property localidad() As String
Get
Return loca
End Get
Set(ByVal value As String)
loca = value
End Set
End Property
Public Property telefono() As String
Get
Return tel
End Get
Set(ByVal value As String)
tel = value
End Set
End Property
Public Property totalGastado() As String
Get
Return gastado
End Get
Set(ByVal value As String)
gastado = value
End Set
End Property

Public Sub total_gastado()

End Sub

End Class
Loading

0 comments on commit b1a9b31

Please sign in to comment.