dgvdte.DefaultCellStyle.SelectionBackColor = Color.White
dgvdte.DefaultCellStyle.SelectionForeColor = Color.Black
jueves, 14 de septiembre de 2017
Deshabilitar selección azul Datagridview
Etiquetas:
DataGridView,
DefaultCellStyle,
SelectionBackColor
lunes, 4 de septiembre de 2017
Guía de despacho con valores exentos
https://goo.gl/P9sHJ2
indicador de traslado 1 y 5
indicador de traslado 1 y 5
viernes, 1 de septiembre de 2017
cambiar tipos de datos en sql
SELECT CAST(YourVarcharCol AS INT) FROM Table , recomendado usar CAST
SELECT CONVERT(INT, YourVarcharCol) FROM Table , recomendado para fechas y otros
SELECT CONVERT(INT, YourVarcharCol) FROM Table , recomendado para fechas y otros
viernes, 25 de agosto de 2017
Parámetros de entrada
Dim dialog As New FolderBrowserDialog()
dialog.ShowNewFolderButton = False ' No aparece la opción crear carpeta
If dialog.ShowDialog() = Windows.Forms.DialogResult.OK Then tbcarpeta.Text = dialog.SelectedPath()
End If
NumericUpDown
StartPosition: CenterScreen
Autosize: False
TextImageRelation: ImageAboveText
My.Application.CommandLineArgs(0) ' conex
My.Application.CommandLineArgs(1) ' estación
My.Application.CommandLineArgs(2) ' usuario
dialog.ShowNewFolderButton = False ' No aparece la opción crear carpeta
If dialog.ShowDialog() = Windows.Forms.DialogResult.OK Then tbcarpeta.Text = dialog.SelectedPath()
End If
NumericUpDown
StartPosition: CenterScreen
Autosize: False
TextImageRelation: ImageAboveText
My.Application.CommandLineArgs(0) ' conex
My.Application.CommandLineArgs(1) ' estación
My.Application.CommandLineArgs(2) ' usuario
jueves, 24 de agosto de 2017
Contar la cantidad de líneas de un archivo
Dim n As Integer = File.ReadAllLines("C:\file.txt").Lenght
fuente: https://stackoverflow.com/questions/119559/determine-the-number-of-lines-within-a-text-file
lunes, 14 de agosto de 2017
Webservice Registro Reclamo DTE
http://www.sii.cl/factura_electronica/Webservice_Registro_Reclamo_DTE_V1.1.pdf
http://www.sii.cl/factura_electronica/GUIA_aceptacion_reclamo_dte.pdf
https://www4.sii.cl/registrorechazodteInternet/
ingresarAceptacionReclamoDoc: Acepta Contenido del Documento (ACD)
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.registroreclamodte.diii.sdi.sii.cl">
<soapenv:Header/>
<soapenv:Body>
<ws:ingresarAceptacionReclamoDoc>
<rutEmisor>123</rutEmisor>
<dvEmisor>4</dvEmisor>
<tipoDoc>33</tipoDoc>
<folio>98765</folio>
<accionDoc>ACD</accionDoc>
</ws:ingresarAceptacionReclamoDoc>
</soapenv:Body>
</soapenv:Envelope>
ingresarAceptacionReclamoDoc: Reclamo al Contenido del Documento (RCD)
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.registroreclamodte.diii.sdi.sii.cl">
<soapenv:Header/>
<soapenv:Body>
<ws:ingresarAceptacionReclamoDoc>
<rutEmisor>123</rutEmisor>
<dvEmisor>4</dvEmisor>
<tipoDoc>33</tipoDoc>
<folio>98765</folio>
<accionDoc>RCD</accionDoc>
</ws:ingresarAceptacionReclamoDoc>
</soapenv:Body>
</soapenv:Envelope>
ingresarAceptacionReclamoDoc: Otorga Recibo de Mercaderías o Servicios (ERM)
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.registroreclamodte.diii.sdi.sii.cl">
<soapenv:Header/>
<soapenv:Body>
<ws:ingresarAceptacionReclamoDoc>
<rutEmisor>123</rutEmisor>
<dvEmisor>4</dvEmisor>
<tipoDoc>33</tipoDoc>
<folio>98765</folio>
<accionDoc>ERM</accionDoc>
</ws:ingresarAceptacionReclamoDoc>
</soapenv:Body>
</soapenv:Envelope>
ingresarAceptacionReclamoDoc: Reclamo por Falta Parcial de Mercaderías (RFP)
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.registroreclamodte.diii.sdi.sii.cl">
<soapenv:Header/>
<soapenv:Body>
<ws:ingresarAceptacionReclamoDoc>
<rutEmisor>123</rutEmisor>
<dvEmisor>4</dvEmisor>
<tipoDoc>34</tipoDoc>
<folio>98765</folio>
<accionDoc>RFP</accionDoc>
</ws:ingresarAceptacionReclamoDoc>
</soapenv:Body>
</soapenv:Envelope>
ingresarAceptacionReclamoDoc: Reclamo por Falta Total de Mercaderías (RFT)
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.registroreclamodte.diii.sdi.sii.cl">
<soapenv:Header/>
<soapenv:Body>
<ws:ingresarAceptacionReclamoDoc>
<rutEmisor>123</rutEmisor>
<dvEmisor>4</dvEmisor>
<tipoDoc>33</tipoDoc>
<folio>98765</folio>
<accionDoc>RFT</accionDoc>
</ws:ingresarAceptacionReclamoDoc>
</soapenv:Body>
</soapenv:Envelope>
listarEventosHistDoc
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.registroreclamodte.diii.sdi.sii.cl">
<soapenv:Header/>
<soapenv:Body>
<ws:listarEventosHistDoc>
<rutEmisor>123</rutEmisor>
<dvEmisor>K</dvEmisor>
<tipoDoc>34</tipoDoc>
<folio>10293847</folio>
</ws:listarEventosHistDoc>
</soapenv:Body>
</soapenv:Envelope>
consultarDocDteCedible
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.registroreclamodte.diii.sdi.sii.cl">
<soapenv:Header/>
<soapenv:Body>
<ws:consultarDocDteCedible>
<rutEmisor>123</rutEmisor>
<dvEmisor>8</dvEmisor>
<tipoDoc>34</tipoDoc>
<folio>456</folio>
</ws:consultarDocDteCedible>
</soapenv:Body>
</soapenv:Envelope>
consultarFechaRecepcionSii
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.registroreclamodte.diii.sdi.sii.cl">
<soapenv:Header/>
<soapenv:Body>
<ws:consultarFechaRecepcionSii>
<rutEmisor>1235</rutEmisor>
<dvEmisor>7</dvEmisor>
<tipoDoc>34</tipoDoc>
<folio>9998</folio>
</ws:consultarFechaRecepcionSii>
</soapenv:Body>
</soapenv:Envelope>
Primero se hace el Recibo de mercaderías y después Acepta el contenido del documento
Etiquetas:
aceptacion,
consultarDocDteCedible,
consultarFechaRecepcionSii,
dte,
electronica,
factura,
ingresarAceptacionReclamoDoc,
listarEventosHistDoc,
reclamo,
registrorechazodteinternet,
sii,
WebService
viernes, 11 de agosto de 2017
Mostrar un xml en un textbox multilinea
Dim doc As New XmlDocument()
doc.LoadXml(lineaxml)
Dim sb As New StringBuilder()
Dim settings As New XmlWriterSettings()
settings.Indent = True
Dim writer As XmlWriter = XmlWriter.Create(sb, settings)
doc.WriteTo(writer)
writer.Close()
tbrespsii.Text = sb.ToString()
Fuente: https://forums.asp.net/t/1302839.aspx?Displaying+xml+file+in+multiline+textbox
doc.LoadXml(lineaxml)
Dim sb As New StringBuilder()
Dim settings As New XmlWriterSettings()
settings.Indent = True
Dim writer As XmlWriter = XmlWriter.Create(sb, settings)
doc.WriteTo(writer)
writer.Close()
tbrespsii.Text = sb.ToString()
Fuente: https://forums.asp.net/t/1302839.aspx?Displaying+xml+file+in+multiline+textbox
Etiquetas:
LoadXml,
StringBuilder,
XmlDocument,
XmlWriter,
XmlWriterSettings
Limpiar combobox
ComboBox.SelectedIndex = -1
jueves, 10 de agosto de 2017
Reemplazar una cadena de caracteres
Dim mystr As String = New String("*"c, array.Length)
Fuente: https://stackoverflow.com/questions/14483500/how-do-i-generate-a-string-of-asterisks-with-specified-length
miércoles, 9 de agosto de 2017
BackgroundWorker
Imports System.Threading
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Control.CheckForIllegalCrossThreadCalls = False
End Sub
Public Class Form1
Private Sub btnaceptar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnaceptar.Click
If Not bgw1.IsBusy = True Then
bgw1.RunWorkerAsync()
End If
End Sub
Private Sub btncancelar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncancelar.Click
If bgw1.WorkerSupportsCancellation = True Then
bgw1.CancelAsync()
End If
End Sub
Private Sub bgw1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bgw1.DoWork
While True
If bgw1.CancellationPending = True Then
e.Cancel = True
Exit While
Else
MessageBox.Show("hola")
End If
Thread.Sleep(1000)
End While
End Sub
Private Sub bgw1_RunWorkerCompleted(ByVal sender As System.Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles bgw1.RunWorkerCompleted
If e.Cancelled = True Then
MessageBox.Show("Cancelado!")
ElseIf e.Error IsNot Nothing Then
MessageBox.Show(e.Error.Message)
Else
MessageBox.Show("Fin!")
End If
End Sub
End Class
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Control.CheckForIllegalCrossThreadCalls = False
End Sub
Etiquetas:
BackGroundWorker,
CancellationPending,
CheckForIllegalCrossThreadCalls,
IsBusy,
WorkerSupportsCancellation
Suscribirse a:
Entradas (Atom)