client/Reportes/ReporteSITI.vb

87 lines
2.7 KiB
VB.net

Public Class ReporteSITI
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
Private Sub PNCentral_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PNCentral.Paint
End Sub
Private Sub BTAceptar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTAceptar.Click
PNPrincipal.Visible = True
End Sub
Private Sub BTRelevantes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTRelevantes.Click
Dim SQL As String
Dim clCmp As New clsComplejo
LBLTitulo.Text = "Reporte de Operaciones Relevantes del Periodo de " & DTMFecha1.Value.Date & " AL " & DTMFecha2.Value.Date
SQL = "prueba2 "
clCmp.fdtDataSetTabla(SQL)
GridPrincipal.SetDataBinding(clCmp.ds, "tabla", False)
GridPrincipal.Visible = True
PNCentral.Visible = True
End Sub
Private Sub BTParam_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTParam.Click
Dim forma As New FrmParamSITI
forma.Show()
End Sub
Private Sub BTInusuales_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTInusuales.Click
Dim SQL As String
Dim clCmp As New clsComplejo
LBLTitulo.Text = "Reporte de Operaciones Inusuales del Periodo de " & DTMFecha1.Value.Date & " AL " & DTMFecha2.Value.Date
SQL = "SELECT NOMBREPRODUCTO FROM PRODUCTO WHERE ACTIVO = 1 "
clCmp.fdtDataSet(SQL)
If clCmp.ds.Tables(0).Rows.Count <> 0 Then
For i As Integer = 0 To clCmp.ds.Tables(0).Rows.Count - 1
SQL = "SPReporteInusualesSITI '" & clCmp.ds.Tables(0).Rows(0).Item("nombrePRODUCTO").ToString & "' , '" & DTMFecha1.Value.Date.ToString & "','" & DTMFecha2.Value.Date.ToString & "'"
clCmp.sbInserta(SQL)
Next
End If
SQL = "SELECT * FROM ReporteInusualesPaso "
SQL = SQL & " WHERE fecha BETWEEN convert(datetime,'" & DTMFecha1.Value.Date & "',112) AND convert(datetime,'" & DTMFecha2.Value.Date & "',112) "
clCmp.fdtDataSetTabla(SQL)
GridPrincipal.SetDataBinding(clCmp.ds, "tabla", False)
GridPrincipal.Visible = True
PNCentral.Visible = True
End Sub
Private Sub BTPre_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTPre.Click
LBLTitulo.Text = "Reporte de Operaciones Preocupantes del Periodo de " & DTMFecha1.Value.Date & " AL " & DTMFecha2.Value.Date
End Sub
End Class