Sunday, November 17, 2013

IsDBNull

        If IsDBNull(DataGridView1.CurrentRow.Cells(0).Value) Then
            txtKd_Aktiva.Text = ""
            txtKd_Dept.Text = ""

        Else
            txtKd_Aktiva.Text = DataGridView1.CurrentRow.Cells(0).Value
            txtKd_Dept.Text = DataGridView1.CurrentRow.Cells(1).Value
        End If

Wednesday, November 13, 2013

ToolStrip Collect Command

-- save
    Private Sub SaveToolStripButton_Click(sender As Object, e As EventArgs) Handles SaveToolStripButton.Click
        Dim frm As Object = Me.ActiveMdiChild
        If frm Is Nothing Then Return
        Call frm.save()
    End Sub

--delete

    Private Sub DeleteToolStripButton_Click(sender As Object, e As EventArgs) Handles DeleteToolStripButton.Click
        If MsgBox("Are you sure want to Delete?", MsgBoxStyle.YesNo, "Delete") = MsgBoxResult.Yes Then
            Dim frm As Object = Me.ActiveMdiChild
            If frm Is Nothing Then Return
            Call frm.delete()
        Else
            MsgBox("You aren't deleted")
        End If
    End Sub

--filter
    Private Sub FilterToolStripButton_Click(sender As Object, e As EventArgs) Handles FilterToolStripButton.Click
        Dim frm As Object = Me.ActiveMdiChild
        If frm Is Nothing Then Return
        Call frm.Filter()
    End Sub

Saturday, November 2, 2013

Convert Dbf to MySQL

Step by step for convert Dbf to MySql

1. Convert Dbf to Xls with Foxpro command. Example for copy file ledger.dbf to ledger.xls, you can used this script "Copy to ledger type xls".
2. Convert Xls to Mdb Online with zamzar.com.
3. Convert Mdb to Sql with MySQL Migration Toolkit.
4. Create table ledger in database  MySql.
5. Import table from step 3.