Torna al Thread

Imports System Imports System.Data Imports System.Data.SqlClient Imports System.Windows.Forms Public Class frmClienti Private Sub frmClienti_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.CLIENTI1TableAdapter.Fill(Me.DataSet61.CLIENTI1) Me.CLIENTI_SEDE1TableAdapter.Fill(Me.DataSet61.CLIENTI_SEDE1) Me.ListavaloriTableAdapter1.Fill(Me.DataSet61.LISTAVALORI) End Sub Private Sub BindingSource1__PositionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles BindingSource1.PositionChanged Dim Idcliente As Integer = 0 Dim modPagamento As Integer = 0 If BindingSource1.Current IsNot Nothing Then Dim dv As DataRowView = DirectCast(BindingSource1.Current, DataRowView) Idcliente = DirectCast(dv("IDcliente"), Integer) BindingSource2.Filter = String.Format("IDCLIENTE = '{0}'", Idcliente) If Not IsDBNull(dv("Mod_PAgamento")) Then modPagamento = dv("Mod_PAgamento") ComboBox1.SelectedItem = ComboBox1.FindString(modPagamento) End If End If End Sub Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged BindingSource1.Filter = "ragione_sociale like '" & TextBox1.Text & "%'" End Sub Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click Me.OdbcDataAdapter1.Update(Me.DataSet61.CLIENTI1) Me.OdbcDataAdapter1.Update(Me.DataSet61.CLIENTI_SEDE1) End Sub End Class
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5