martes, 16 de enero de 2018

Descarga gratis Libreria Facturacion Electronica CFDI 3.3

Hola Amigos, como estan hace mucho ya no escribia, pero bueno por aca ando nuevamente, les traigo la libreria para que generen sus CFDIs y ya solo lo timbren con quien necesiten, ya trae casi todos los complementos, incluyendo pagos.

Descarga la libreria aquí

solo agregala a tu proyecto .Net y Listo

utiliza el objeto.



Si gustas invitarme un cafe, dale aquí.

saludos.

domingo, 18 de octubre de 2015

I took the solution from

Michael Crump blog .

I was recently running into a situation where every time I opened Visual Studio 2010 SP1 the following message would appear for about 60 seconds or so:

"Loading toolbox content from package Microsoft.VisualStudio.IDE.Toolbox.ControlInstaller.ToolboxInstallerPackage
'{2C98B35-07DA-45F1-96A3-BE55D91C8D7A}'"

After finally get fed up with the issue I started researching it and decided that I’d share the steps that I took to resolve it below:
•I first made a complete backup of my registry.
•I then removed the following key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{2c298b35-07da-45f1-96a3-be55d91c8d7a}]
•I went to the following directory: C:\Users\Your Name Here\AppData\Local\Microsoft\VisualStudio\10.0\ and created a folder called bk and moved the .tbd files to that folder (they are hidden so you will have to show all files). I then removed the .tbd files in the root directory.



SNAGHTMLcaac6ca
•I then launched Visual Studio 2010 SP1 again and it recreated those files and the problem was gone.

Anyways I hope this helps someone with a similar problem. I created this blog partially for myself but it is always nice to help my fellow developer.

Thanks for reading.

jueves, 7 de mayo de 2015

DEscarga MASIVA CFDI

Aqui tienen la aportacion que hemos realizado varios.
podran descargar el codigo si, asi lo desean.

http://www.lawebdelprogramador.com/foros/Visual-Basic.NET/1478397-Descarga-Masiva-XML-SAT.html#i1495133

saludos.

Delete LINQ to SQL and One-To-Many Relationships

Según el respectivo idioma les saldrá este error:

An attempt was made to remove a relationship between a ParentTable and a ChildTable. However, one of the relationship’s foreign keys (ChildTable.parent_id) cannot be set to null.

…ó el siguiente:

Se ha intentado quitar una relación entre TablaPadre y TablaHija, pero una de las claves externas de la relación (TablaHija.nIdPadre) no se puede establecer en null.

In order to be able to delete a child row independently in the database when calling SubmitChanges(), we must indicate DeleteOnNull="true" on this association. Unfortunately the only way to change this is to drop out of the designer and make the change manually in the .dbml file. Luckily, however, you can switch back to the designer and it will not remove this attribute if you continue to modify the model as long as you don't remove the entities entirely. Once we make this change we can now delete just a single Order from the grid and save normally:



The other option to fix this issue is to modify the Delete Rule to "Cascade" on the relationship in the database. In that case the designer correctly infers this attribute on the association. This may be a better solution if you want to always automatically delete the related orders when a customer is deleted in your database no matter what application is working against the data. Additionally, if you apply the Cascade delete rule on your database relationship, then you will not have to manually delete the children first every time the parent is deleted when working with the DataContext. (Note: To enable cascading deletes, just right click on the parent table in the Server Explorer, select "Open Table Definition", right-click on any column and select "Relationships", select the relation and expand the "INSERT and UPDATE Specification" then for the Delete Rule set it to CASCADE.)

jueves, 12 de febrero de 2015

GRANT TABLES, VIEW and SP's

--GRANT TO TABLES
DECLARE CURSOR_GRANT CURSOR FOR
SELECT
'GRANT SELECT ON [dbo].['+NAME+'] TO [E8F575915A2E4897A517779C0DD7CE]',
'GRANT CONTROL ON [dbo].['+NAME+'] TO [MSDSL]'
FROM SYSOBJECTS WHERE NAME LIKE 'X%' AND TYPE = 'U'

DECLARE @SELECT AS VARCHAR(100)
DECLARE @CONTROL AS VARCHAR(100)
DECLARE @CONTADOR AS INT
SET @CONTADOR = 0

OPEN CURSOR_GRANT

FETCH NEXT FROM CURSOR_GRANT INTO @SELECT, @CONTROL

WHILE @@FETCH_STATUS = 0
BEGIN
EXECUTE(@SELECT)
EXECUTE(@CONTROL)
SET @CONTADOR = @CONTADOR + 1
FETCH NEXT FROM CURSOR_GRANT INTO @SELECT, @CONTROL
END

CLOSE CURSOR_GRANT
DEALLOCATE CURSOR_GRANT
PRINT @CONTADOR
GO

--GRANT TO VIEWS
DECLARE CURSOR_GRANT CURSOR FOR
SELECT
'GRANT SELECT ON [dbo].['+NAME+'] TO [E8F575915A2E4897A517779C0DD7CE]',
'GRANT CONTROL ON [dbo].['+NAME+'] TO [MSDSL]'
FROM SYSOBJECTS WHERE NAME LIKE 'X%' AND TYPE = 'V'

DECLARE @SELECT AS VARCHAR(100)
DECLARE @CONTROL AS VARCHAR(100)
DECLARE @CONTADOR AS INT
SET @CONTADOR = 0

OPEN CURSOR_GRANT

FETCH NEXT FROM CURSOR_GRANT INTO @SELECT, @CONTROL

WHILE @@FETCH_STATUS = 0
BEGIN
EXECUTE(@SELECT)
EXECUTE(@CONTROL)
SET @CONTADOR = @CONTADOR + 1
FETCH NEXT FROM CURSOR_GRANT INTO @SELECT, @CONTROL
END

CLOSE CURSOR_GRANT
DEALLOCATE CURSOR_GRANT
PRINT @CONTADOR
GO

--GRANT TO PROCEDURES
DECLARE CURSOR_GRANT CURSOR FOR
SELECT
'GRANT EXECUTE ON [dbo].['+NAME+'] TO [E8F575915A2E4897A517779C0DD7CE]',
'GRANT CONTROL ON [dbo].['+NAME+'] TO [MSDSL]'
FROM SYSOBJECTS WHERE NAME LIKE 'X%' AND TYPE = 'P'

DECLARE @EXECUTE AS VARCHAR(100)
DECLARE @CONTROL AS VARCHAR(100)
DECLARE @CONTADOR AS INT
SET @CONTADOR = 0

OPEN CURSOR_GRANT

FETCH NEXT FROM CURSOR_GRANT INTO @EXECUTE, @CONTROL

WHILE @@FETCH_STATUS = 0
BEGIN
EXECUTE(@EXECUTE)
EXECUTE(@CONTROL)
SET @CONTADOR = @CONTADOR + 1
FETCH NEXT FROM CURSOR_GRANT INTO @EXECUTE, @CONTROL
END

CLOSE CURSOR_GRANT
DEALLOCATE CURSOR_GRANT
PRINT @CONTADOR
GO

martes, 6 de enero de 2015

UTF8 encode and decode VB.Net


Public Function XUTF8_Decode(ByVal pStr As String) As String
Dim Buffer As String
Dim i As Integer
Dim vChar() As Char = pStr.ToCharArray()
Dim vutf8data(vChar.Length) As Byte
'vutf8data = Encoding.UTF8.GetBytes(pStr)
For i = 0 To (vChar.Length - 1)
vutf8data(i) = System.Convert.ToByte(vChar(i))
Next
Buffer = Encoding.UTF8.GetString(vutf8data)
'Return .
XUTF8_Decode = Buffer
End Function

Public Function XUTF8_Encode(ByVal pStr As String) As String
Dim vutf8Encoding As New System.Text.UTF8Encoding
Dim vencodedString() As Byte
Dim vStringRes As String

vencodedString = vutf8Encoding.GetBytes(pStr)
vStringRes = vutf8Encoding.GetString(vencodedString)
'Return
XUTF8_Encode = vStringRes
End Function