Skip to main content

Posts

Showing posts from 2017

AVOID DUPLICATE ENTRY TO DATATABLE

 Dim Temukan As DataRow() = DTSumPO.Select("PONUM ='" & vPO & "' AND POQTY = '" & vQTY & "'")                                         If Temukan.Length = 0 Then                                             DTSumPO.Rows.Add(vPO, vQTY)                                         End If

SUM QTY FROM DATATABLE VB.NET

Dim DTGakGeser, DTGeser As New DataTable                                 DTGakGeser.Columns.Add("COGAKGESER", GetType(String))                                 DTGakGeser.Columns.Add("QTYGAKGESER", GetType(Decimal))                                 DTGeser.Columns.Add("COGESER", GetType(String))                                 DTGeser.Columns.Add("QTYGESER", GetType(Decimal))                                 Dim tmpSUMGakGeser, tmpSUMGeser                                 If DTGakGeser.Rows.Count > 0 Then                                     'SUM DATATABLE                                     tmpSUMGakGeser = Convert.ToInt32(DTGakGeser.Compute("SUM(QTYGAKGESER)", String.Empty))                                 End If                                 If DTGeser.Rows.Count > 0 Then                                     'SUM DATATABLE                                                                 tmpSU

error 11 could not copy exceeded retry count of 10. failed

My case in VS2013 Open project properties [ menu > project > properties ] Choose "debug" tab Uncheck "Enable the visual studio hosting process" Start debugging [F5] You will receive security warning , just "ok". Lets application running Stop debugging. Check option "Enable the visual studio hosting process" , under debug tab, Now , try to start debugging , you will not see error again source :  https://stackoverflow.com/questions/18102859/visual-studio-could-not-copy-during-build

CHECK CHECKBOX IN DATAGRIDVIEW IS CHECKED OR UNCHECKED

'CHECK CHECKBOX IS CHECKED OR UNCHECKED     Private Sub CB_CheckedChanged(sender As Object, e As EventArgs) Handles CB.CheckedChanged         With DgvDoc             If CB.CheckState = CheckState.Checked Then                 For iRow = 0 To .Rows.Count - 1                     .Rows(iRow).Cells("CHECKED").Value = True                 Next             Else                 For iRow = 0 To .Rows.Count - 1                     .Rows(iRow).Cells("CHECKED").Value = False                 Next             End If         End With     End Sub

DATAGRIDVIEW CELL/COLUMN UPPERCASE

 'DATAGRIDVIEW UPPERCASE     Private Sub DGVUpperCase(sender As Object, e As KeyPressEventArgs)         e.KeyChar = Char.ToUpper(e.KeyChar)     End Sub     Private Sub DgvDoc_EditingControlShowing(sender As Object, e As DataGridViewEditingControlShowingEventArgs) _ Handles DgvDoc.EditingControlShowing         AddHandler e.Control.KeyPress, AddressOf DGVUpperCase     End Sub

Create Comment As .xls In Farpoint Spread

  Private Sub TAGS_PARENTING()         Dim DTPopUp As New DataTable         With DTPopUp             .Columns.Add("SEQ", GetType(String))             .Columns.Add("QTY", GetType(String))             .Columns.Add("ETD", GetType(String))             .Columns.Add("ETA", GetType(String))             DTPopUp = MePostab_Control.Cari_TAG_PARENTING         End With         With FPPOSTAB             For GG As Integer = 0 To .ActiveSheet.RowCount - 1                 Dim JMLROW As Integer = .ActiveSheet.GetChildView(GG, 0).Rows.Count                 Try                     If JMLROW >= 2 Then                         For vTAG As Integer = 0 To (JMLROW - 1)                             For vCOL As Integer = 0 To 5                                 Dim ColCONumber As String = .ActiveSheet.GetChildView(GG, 0).Cells(vTAG, 3 + (vCOL * 4)).Text                                 Dim tmpTAGS = DTPopUp.Select("CO = '" & ColCONumber & "

ONLY ALLOW NUMBER AND BACKSPACE IN TEXTBOX

SAMPLE DATATABLE IN VB.NET

 Dim DTT As New DataTable         Dim DTROW As DataRow         DTROW = DTT.NewRow         With DTT             .Columns.Add("BULAN0")             .Columns.Add("BULAN1")             .Columns.Add("BULAN2")             For YY = 0 To 2                 If YY.ToString = 0 Then                     DTROW.Item("BULAN0") = "NOL"                 ElseIf YY.ToString = 1 Then                     DTROW.Item("BULAN1") = "SATU"                 ElseIf YY.ToString = 2 Then                     DTROW.Item("BULAN2") = "DUA"                 End If             Next             .Rows.Add(DTROW)         End With         DataGridView1.DataSource = DTT

SEARCH DATA

'WITH DATATABLE Public Function CARI_QUESTION_4EDIT(ByVal Monthnya As String, _                                      ByVal Yearnya As String, _                                      ByVal Jenisnya As String) As DataTable         MeKONEKSI.TUTUPKONEKSI()         DTA = New SqlDataAdapter("SELECT * FROM View_GRID_DETECTION_ANSWER " & _                             "WHERE MMONTH = '" & Monthnya & "' AND " & _                             "YYEAR = '" & Yearnya & "' AND " & _                             "JENIS = '" & Jenisnya & "'", MeKONEKSI.BUKAKONEKSI)         DTT.Clear()         DTA.Fill(DTT)         Return DTT     End Function 'WITH DATAVIEW Public Function ISI_GRID_QUESTION() As DataView         Try             MeKONEKSI.TUTUPKONEKSI()             DTA = New SqlDataAdapter("SELECT TOP 50 * FROM View_GRID_DETECTION_QUESTION&q

AUTO FIT ALL CELL IN FARPOINT SPREAD

            'FARPOINT SPREAD AUTOFIT EACH CELLS             Dim KOLOM As FarPoint.Win.Spread.Column             Dim UKUR As Single             For JJ As Integer = 0 To .ActiveSheet.ColumnCount - 1                 KOLOM = .ActiveSheet.Columns(JJ)                 UKUR = KOLOM.GetPreferredWidth                 KOLOM.Width = UKUR             Next

Select multiple rows data then show in one row

Select multiple rows data then show in one row this is how to do that : select DATA=stuff(( select top 2 '/' + supplierpicname from TABELSUPPLIERCONTACT where supplierid = 'SUP006' for XML path('')),1,1,'') select DATA=stuff(( select  top 2  ' / ' + supplierpicname from TABELSUPPLIERCONTACT where supplierid = 'SUP006' for XML path('')),1,3,'')

C# OOP TUTORIAL 2017

DOWNLOAD FILE HERE ! ebook preview Main Menu Preview List Data Preview Action Preview for everyone who want to learn more about OOP implementation on programming tool using C#.Net in Visual Studio environment Enjoy the lesson, thanks for visit please leave your comment about this e-book

OOP In A Simple Way

How To Send List From Datagridview Into .xls File In VB.Net

Follow Below Script : Private Sub ExportToExcelFromGridview()         Dim excel As Microsoft.Office.Interop.Excel._Application = New Microsoft.Office.Interop.Excel.Application()         Dim workbook As Microsoft.Office.Interop.Excel._Workbook = excel.Workbooks.Open(TemplatePathEmpty)         Dim worksheet As Microsoft.Office.Interop.Excel._Worksheet = Nothing         Try             worksheet = workbook.ActiveSheet             worksheet.Name = "SUPPLIER"             Dim cellRowIndex As Integer = 2             Dim cellColumnIndex As Integer = 1             ''Adding HeaderText From Datagridview             For Each column As DataGridViewColumn In DgvSUPPLIER.Columns                 worksheet.Cells(1, column.Index + 1) = column.HeaderText             Next             For i As Integer = 0 To DgvSUPPLIER.Rows.Count - 1                 For j As Integer = 0 To DgvSUPPLIER.Columns.Count - 1                     If cellRowIndex = 1 Then          

How To Merge Some (3) Datatable Into A Single Datatable

How To Checking Your Typing Text On ComboBox

1st Pattern, Working on Manual Add Item and Datasource Item :  2nd Pattern, Only working on Manual Add Item

Get TextValue In Combo Box From A Specific Symbol

This is how to get TextValue in a ComboBox before and after a spesific symbol, please see how to do that After Symbol :        'Ambil Text Setelah Tanda (-)         Dim Z As String = CmbMATERIALGROUP.Text         Dim D = Z.Substring(Z.IndexOf("-")+1)         MsgBox("" & D & "") Before Symbol :         'Ambil Text Sebelum Tanda (-)         Dim Z As String = CmbMATERIALGROUP.Text         Dim D = Z.Substring(0, Z.IndexOf("-"))         MsgBox("" & D & "")

Change Combo Box Display Name But Still Refer To Specific Field

Make a display name of your combo box content list as you wish event different name but you still can assign to specifik field as you wish. just write below codes then see what happens :      With CmbCARIDATA             DTT = New DataTable             DTT.Columns.Add("Id")             DTT.Columns.Add("Name")             DTT.Rows.Add("ApplicationName.ApplicationID", "ID")             DTT.Rows.Add("ApplicationName.ApplicationName", "NAME")             DTT.Rows.Add("ApplicationName.SystemName", "SYSTEM NAME")             DTT.Rows.Add("ApplicationName.Remark", "REMARK")             CmbCARIDATA.DataSource = DTT             CmbCARIDATA.DisplayMember = "Name"             CmbCARIDATA.ValueMember = "Id"         End With

Email Address Validation (Regex : Regular Expression) In VB.Net

This is how to check email address validation in VB.Net add below inheritance on your textcode : (CONTROL) Imports System.Text.RegularExpressions (BOUNDARY) Add a button and write below codes :

TextBox VB.Net Only Allow Number And Enter On Keyboard

      'Number Only And Allow Enter         If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> Chr(13) Then             e.Handled = True             MsgBox("PLEASE USE NUMBER ONLY (0 ~ 9)" & vbCrLf & _                       "THANK YOU", MsgBoxStyle.Information, Me.Text)         ElseIf e.KeyChar = Chr(13) Then             MsgBox("ENTER IS ALLOWED" & vbCrLf & _                     "THANK YOU", MsgBoxStyle.Information, Me.Text)         End If

Binding List Data On Combo Box VB.NET With Empty First Row Data

Control Script     Public Function CARI_SUPPLIERID(ByVal _Namenya As String) As String         MeKONEKSI.TUTUPKONEKSI()         COMMAND.CommandType = CommandType.Text         COMMAND.CommandText = "SELECT SUPPLIERID FROM TABELSUPPLIER " & _                               "WHERE SUPPLIERNAME = '" & _Namenya & "'"         COMMAND.Connection = MeKONEKSI.BUKAKONEKSI         DTR = COMMAND.ExecuteReader         Return DTR.Read     End Function Boundary Script        With CmbSUPPLIERNAME             .AutoCompleteMode = AutoCompleteMode.SuggestAppend             .AutoCompleteSource = AutoCompleteSource.ListItems             .DataSource = MeSupplier_Control.SUPPLIERID_SUPPLIERNAME             .DisplayMember = "SUPPLIERNAME"             .SelectedIndex = -1             .Text = "- SELECT SUPPLIER -"         End With

OOP Tutorial 2017

password open file : oop2017 Download Tutorial File (.pdf)