Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Facturacion 110318185708 Phpapp02
Facturacion 110318185708 Phpapp02
http://sistemasddm.blogspot.com
http://sistemasddm.blogspot.com
Me.txtSubTotal.Text = ""
Me.txtIgv.Text = ""
Me.txtTotal.Text = ""
Me.cbEstado.Text = ""
Me.DatosGrid.Rows.Clear()
Me.DatosGrid.DataSource = Nothing
D=0
End Sub
Private Sub DatosGrid_CellClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.DataGridViewCellEventArgs) Handles DatosGrid.CellClick
fila = e.RowIndex
End Sub
Private Sub DatosGrid_CellEnter(ByVal sender As Object, ByVal e As
System.Windows.Forms.DataGridViewCellEventArgs) Handles DatosGrid.CellEnter
Try
If (DatosGrid.Rows(D).Cells(2).Value > 0) Then
Me.DatosGrid.Rows(D).Cells(3).Value = Me.DatosGrid.Rows(D).Cells(2).Value *
Me.DatosGrid.Rows(D).Cells(1).Value
End If
If (radBoleta.Checked = True) Then
If (DatosGrid.Rows(D).Cells(3).Value > 0) Then
pre = pre + DatosGrid.Rows(D).Cells(3).Value
Me.txtSubTotal.Text = pre
Me.txtIgv.Text = 0
Me.txtTotal.Text = Me.txtSubTotal.Text
D=D+1
End If
ElseIf (radFactura.Checked = True) Then
If (DatosGrid.Rows(D).Cells(3).Value > 0) Then
pre = pre + DatosGrid.Rows(D).Cells(3).Value
Me.txtSubTotal.Text = pre
Me.txtIgv.Text = (Val(Me.txtSubTotal.Text) * 0.19)
Me.txtTotal.Text = (Val(Me.txtSubTotal.Text) + Val(Me.txtIgv.Text))
D=D+1
End If
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub btnImprimir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
btnImprimir.Click
tipoDocu = cbTipoDocu.SelectedItem
codDocu = txtCodigoDocu.Text
frmImprimir.Show()
End Sub
End Class
http://sistemasddm.blogspot.com
http://sistemasddm.blogspot.com
http://sistemasddm.blogspot.com
CODIGO DE FrmImprimir
Imports System.Data.SqlClient
Public Class frmImprimir
Dim Cn As New SqlConnection("Server=LocalHost;Uid=sa;Password=123;Database=SISTEMA")
Dim INFORME1 As Reporte
Dim MITABLA As CrystalDecisions.CrystalReports.Engine.Table
Dim MILOGIN As CrystalDecisions.Shared.TableLogOnInfo
Private Sub frmImprimir_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Try
INFORME1 = New Reporte
For Each Me.MITABLA In INFORME1.Database.Tables
MILOGIN = MITABLA.LogOnInfo
MILOGIN.ConnectionInfo.Password = "123"
MILOGIN.ConnectionInfo.UserID = "sa"
MITABLA.ApplyLogOnInfo(MILOGIN)
Next
Me.CrystalReportViewer1.ReportSource = INFORME1
INFORME1.RecordSelectionFormula = "{CAB_DOCUMENTO.TIP_DOC}='" + tipoDocu + "' And
{DETALLE_DOCUMENTO.NDOC}='" + codDocu + "'"
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
http://sistemasddm.blogspot.com