1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
| Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonModif.Click
Try
Dim Finder$
Dim AjoutEnreg As DataRow
Dim i%
Finder = LBLRecupArri.Text
DS.Tables("ModifInfarriv").PrimaryKey = New DataColumn() {DS.Tables("ModifInfarriv").Columns("narri")}
AjoutEnreg = DS.Tables("ModifInfarriv").Rows.Find(Finder)
i = DS.Tables("ModifInfarriv").Rows.IndexOf(AjoutEnreg)
DS.Tables("ModifInfarriv").Rows(i)(1) = LBLDoss.Text
DS.Tables("ModifInfarriv").Rows(i)(2) = UCase(ComboMP.Text)
DS.Tables("ModifInfarriv").Rows(i)(3) = UCase(ComboEP.Text)
DS.Tables("ModifInfarriv").Rows(i)(4) = TxtDateRCV.Text
DS.Tables("ModifInfarriv").Rows(i)(5) = TxtDateRCA.Text
DS.Tables("ModifInfarriv").Rows(i)(6) = TxtDateRFCA.Text
DS.Tables("ModifInfarriv").Rows(i)(7) = UCase(TxtFac.Text)
DS.Tables("ModifInfarriv").Rows(i)(8) = TxtMtFac.Text
DS.Tables("ModifInfarriv").Rows(i)(9) = TxtMtFacDH.Text
DS.Tables("ModifInfarriv").Rows(i)(10) = TxtEIN.Text
DS.Tables("ModifInfarriv").Rows(i)(11) = ComboBank.Text
DS.Tables("ModifInfarriv").Rows(i)(12) = UCase(TxtCred.Text)
DS.Tables("ModifInfarriv").Rows(i)(13) = TxtDateCred.Text
DS.Tables("ModifInfarriv").Rows(i)(14) = TxtDateVC.Text
DS.Tables("ModifInfarriv").Rows(i)(15) = TxtDateEIN.Text
DS.Tables("ModifInfarriv").Rows(i)(16) = TxtDateEE.Text
db = New OleDb.OleDbCommandBuilder(IA_InfoArrivModif)
IA_InfoArrivModif.Update(DS, "ModifInfarriv") 'ModifInfarriv
DS.Tables("InfoCommande").Rows.Clear()
Dim count% = 1
For Each row1 As DataGridViewRow In GEDOC.DGVInfoCde.Rows
count = count + 1
row1.Cells(0).Value = count
Next
'GEDOC.DTClear()
GEDOC.RemplirGDVInfoDoss()
MsgBox("L'arrivage a bien été modifié.")
GEDOC.DGVInfoCde.DataSource = DS.Tables("InfoCommande") 'InfoCommande
Using w As StreamWriter = File.AppendText(P & "\JournalGEDOC(" & Date.Now.Month & "." & Date.Now.Year & ").txt")
LoginCeDoC.Log("Modification de l'arrivage du dossier N°" & CInt(GEDOC.LBLNumDoss.Text) & " par:" & GEDOC.LBLAuthent.Text, w)
' Close the writer and underlying file.
w.Close()
End Using
' Open and read the file.
Using r As StreamReader = File.OpenText(P & "\JournalGEDOC(" & Date.Now.Month & "." & Date.Now.Year & ").txt")
LoginCeDoC.DumpLog(r)
End Using
Me.Close()
GEDOC.Show()
Cadenas()
'BtnCameleon.Text = "Modifier"
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Class |
Partager