Newsgroup: italia.napoli.discussioni
Titolo: SILVIO e ALEMANNO........una scrivania...

Solo SILVIO ha pi� nominate di me.....in 3 giorni....da solo.....
''''''''''''''''''''
'''''''''''''''''''''
'''''''''''''''''
''''''''''''''''''
mi odiano.....
� matto nun serve ,,,non capisc niente..� la rogna..
Silvio una scrivania....
presentarsi nella Regione Lazio con la foto di Silvio e Fini.....
sul computer,,,
 TOM ha le palle....
Imports System.Web.UI.HtmlControls.HtmlGenericControl
Public Class PopUp
    Inherits 
System.Web.UI.Page
    Protected WithEvents control As
System.Web.UI.HtmlControls.HtmlInputHidden
    Protected WithEvents calDate As System.Web.UI.WebControls.Calendar
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
        If Not Request.Params("textbox") = "" Then
            control.Value = Request.QueryString("textbox").ToString()
        End If
    End Sub
    Protected Sub Change_Date(ByVal sender As System.Object, ByVal e As
System.EventArgs)
        Dim strScript As String =
"<script>window.opener.document.forms(0)." + control.Value + ".value = '"
        strScript += calDate.SelectedDate.ToString("dd/MM/yyyy")
        strScript += "';self.close()"
        strScript += "</" + "script>"
        RegisterClientScriptBlock("anything", strScript)
    End Sub
End Class
Imports System.Data.OleDb
Imports System.Data.SqlClient
Imports System.Diagnostics
Imports System.Configuration
Imports Utility
Imports System.Data
Partial Class _Default
    Inherits 
System.Web.UI.Page
    Public Data As String
    Public Ora As String
    Public CodConcess As Integer
    Public punto1 As Integer
    Public punto2 As Integer
    Public P1 As Integer
    Public P2 As Integer
    Public punto3 As Integer
    Public setparam As Integer
    Public param As String
    Public id_concessionario As Integer
    Public win As String
    Public giorno As String
    Private Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
        bindata()
        ''  Me.TxtDataChiamata.Text = ViewState("giorno")
        If Not Request.Params("TxtCodiceConces") = "" Then
            Me.TxtCodiceConces.Text = Request.Params("TxtCodiceConces")
            Label3.Visible = False
            Me.TxtRagSociCoConc.Text = Request.Params("TxtRagSociCoConc")
        End If
 
        If TxtDataChiamata.Text = "" Then
            TxtDataChiamata.Text = Date.Now
            Data = TxtDataChiamata.Text
            Format(Data, "yyyy/dd/mm HH:mm:ss").Replace(":", ".")
        End If
        Page.Title = "Gestione Inserimento Chiamate Concessionario"
        lblRicerca.Visible = False
        If Not IsPostBack Then
            BidCheckBox()
        End If
        BtnRicerca.Visible = True
        If Not IsPostBack Then
            param = Request.QueryString("loginInfo")
            If param = 2 Then
                ViewState("param") = "2"
                id_concessionario =
Request.QueryString("id_concessionario")
                lblRicerca.Visible = False
                lbl_idconcessionario.Visible = False
                caricaCampi()
                SettacheckBox()
            End If
        End If
    End Sub
    Private Sub bindata()
        Dim i As Integer
        Dim DataInizio As String
        Dim DataFine As String
        If (txtStartDate.Text <> "" And txtEndDate.Text = "") Then
            txtEndDate.Text = txtStartDate.Text
        End If
        If (txtStartDate.Text = "" And txtEndDate.Text <> "") Then
        txtStartDate.Text = txtEndDate.Text
        End If
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sql2 As OleDbDataAdapter
        'If (txtStartDate.Text = "") And (txtEndDate.Text = "") And
(TxtCodiceConces2.Text = "") Then
        '    lblRicerca.Visible = True
        '    lblRicerca.Text = "Inserire un Parametro per la ricerca"
        '    Exit Sub
        'End If
        If txtStartDate.Text <> "" And txtEndDate.Text <> "" Then
            DataInizio = txtStartDate.Text
            DataFine = txtEndDate.Text
            Format(DataInizio, "dd/MM/yyyy")
            Format(DataFine, "dd/MM/yyyy")
        End If
        Dim TxtCodiceConces As String = Request.QueryString("loginInfoId")
        objCon.Open()
        ''   cod_concessionario like '%" &
Me.TxtCodiceConces.Text.Replace("'", "''") & "%'"
        '
        If (txtStartDate.Text <> "" And txtEndDate.Text <> "" And
TxtCodiceConces2.Text <> "") Then
            sql2 = New OleDbDataAdapter("select
Numerofattura,RagioneSociale,cognomechiamante,CodiceConcessionario,data_chiamata,ora_chiamata,id_concessionario
from Tbt_Concessionario where CodiceConcessionario=('" &
DoQuotes((TxtCodiceConces2.Text)) & "') and Data_Chiamata >=('" &
DateToNumber(DataInizio) & "') and Data_Chiamata <= ('" &
DateToNumber(DataFine) & "') order by Data_Chiamata desc", objCon)
        ElseIf (txtStartDate.Text <> "" And txtEndDate.Text <> "" And
TxtCodiceConces2.Text = "") Then
            sql2 = New OleDbDataAdapter("select
Numerofattura,RagioneSociale,cognomechiamante,CodiceConcessionario,data_chiamata,ora_chiamata,id_concessionario
from Tbt_Concessionario where  Data_Chiamata >=('" &
DateToNumber(DataInizio) & "') and Data_Chiamata <= ('" &
DateToNumber(DataFine) & "')order by Data_Chiamata desc", objCon)
        ElseIf (txtStartDate.Text = "" And txtEndDate.Text = "" And
TxtCodiceConces2.Text <> "") Then
            sql2 = New OleDbDataAdapter("select
Numerofattura,RagioneSociale,cognomechiamante,CodiceConcessionario,data_chiamata,ora_chiamata,id_concessionario
from Tbt_Concessionario where CodiceConcessionario=(" &
DoQuotes(TxtCodiceConces2.Text) & ") order by Data_Chiamata desc", objCon)
        ElseIf (txtStartDate.Text = "" And txtEndDate.Text = "" And
TxtCodiceConces2.Text = "") Then
            sql2 = New OleDbDataAdapter("select
Numerofattura,RagioneSociale,cognomechiamante,CodiceConcessionario,data_chiamata,ora_chiamata,id_concessionario
from Tbt_Concessionario  order by Data_Chiamata desc ", objCon)
        Else
        End If
        Dim querydataset As DataSet = New DataSet()
        Dim a As String
        sql2.Fill(querydataset)
        If querydataset.Tables(0).Rows.Count > 0 Then
            For i = 0 To querydataset.Tables(0).Rows.Count - 1
                querydataset.Tables(0).Rows(i).Item("ora_chiamata") =
NumberToTime(querydataset.Tables(0).Rows(i).Item("ora_chiamata").ToString)
                querydataset.Tables(0).Rows(i).Item("data_chiamata") =
NumberToDate(querydataset.Tables(0).Rows(i).Item("data_chiamata").ToString)
            Next i
            lblRicerca.Text = ""
            GridView2.Visible = True
            GridView2.DataSource = querydataset
            GridView2.DataBind()
        Else
            lblRicerca.Visible = True
            lblRicerca.Text = "Nessuna corrispondenza trovata"
            GridView2.Visible = False
        End If
    End Sub
    Protected Sub GridView2_PageIndexChanging(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles
GridView2.PageIndexChanging
        GridView2.PageIndex = e.NewPageIndex
        bindata()
    End Sub
    Protected Sub BtnSalva_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnSalva.Click
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sql2 As OleDbDataAdapter
        ''Dim giorno As String
        Dim ora As String
        giorno = Me.TxtDataChiamata.Text
        ViewState("giorno") = giorno
        ''Date.Now.ToString("dd/MM/yyyy")
        ora = Date.Now.ToString("HH:mm:ss")
        Dim codiceconcess As String
        Dim codiceconcess2 As String
        codiceconcess2 = TxtRagSociCoConc.Text
        codiceconcess = TxtCodiceConces.Text
        lbl_idconcessionario.Visible = False
        objCon.Open()
        Dim trans As OleDbTransaction
        trans = objCon.BeginTransaction
        ValidazioneCampi()
        lbl_idconcessionario.Visible = False
        If setparam = 1 Then
            If (BtnSalva.Text = "Modifica") Then
                win = "2"
                If (win <> ViewState("param")) Then
                    SetIdConcessionario()
                End If
                lbl_idconcessionario.Text =
ViewState("lbl_idconcessionario.Text")
                BtnSalva.Text = "Salva"
                setwrite()
                Label3.Visible = False
                Exit Sub
            End If
            If (BtnSalva.Text = "Salva") And lbl_idconcessionario.Text <>
"" Then
                Label3.Visible = False
                modifica()
                BtnSalva.Text = "Modifica"
                SetReadonly()
                BtnRicerca.Visible = True
                bind()
                lbl_idconcessionario.Text = ""
                Exit Sub
            End If
            If (BtnSalva.Text = "Salva") And lbl_idconcessionario.Text =
"" Then
                Label3.Visible = False
                lbl_idconcessionario.Text = ""
                Try
                    Dim sql1 As String = String.Empty
                    sql1 = "INSERT INTO Tbt_Concessionario "
                    sql1 &= "(DescTelefono1"
                    sql1 &= ",DescTelefono2"
                    sql1 &= ",CognomeChiamante"
                    sql1 &= ",RagioneSociale"
                    sql1 &= ",Relazione"
                    sql1 &= ",CodiceConcessionario"
                    sql1 &= ",NumeroFattura"
                    sql1 &= ",data_chiamata"
                    sql1 &= ",ora_chiamata"
                    sql1 &= ",Nota_descrittiva"
                    sql1 &= ")values"
                    sql1 &= "('" & DoQuotes(TxtTelefono1.Text) & "'"
                    sql1 &= ",'" & DoQuotes(TxtTelefono2.Text) & "'"
                    sql1 &= ",'" & DoQuotes(TxtCoDelchiama.Text) & "'"
                    sql1 &= ",'" & DoQuotes(TxtRagSociCoConc.Text) & "'"
                    sql1 &= ",'" & DoQuotes(TxtRelChiamante.Text) & "'"
                    sql1 &= ",'" & DoQuotes(TxtCodiceConces.Text) & "'"
                    sql1 &= ",'" & DoQuotes(TxtNumFattura.Text) & "'"
                    sql1 &= ",'" & DateToNumber(giorno) & "'"
                    sql1 &= ",'" & TimeToNumber(ora) & "'"
                    sql1 &= ",'" & DoQuotes(TxtNotaDescrittiva.Text) & "'"
                    sql1 &= ")"
                    Dim comm As OleDbCommand = New OleDbCommand
                    comm.Connection = objCon
                    'Inizia la transazione
                    comm.Transaction = trans
                    'prima query
                    comm.CommandText = sql1
                    comm.ExecuteNonQuery()
                    'eseguo la transazione
                    trans.Commit()
                Catch ex As SqlException
                    'se si sono verificati errori faccio il rollback
                    trans.Rollback()
                    Response.Write(ex.ToString())
                Finally
                    objCon.Close()
                End Try
                BtnSalva.Text = "Modifica"
                SetReadonly()
                BtnRicerca.Visible = True
                bind()
                Me.TxtDataChiamata.Text = ViewState("giorno")
            Else
            End If
        Else
            Label3.Visible = True
            Label3.Text = "****"
            lblRicerca.Text = "***"
        End If
    End Sub
    Private Sub ValidazioneCampi()
        setparam = 1
        If TxtCodiceConces.Text = "" Then
            punto3 = 0
            Label3.Text = "****"
            setparam = 0
        Else
            punto3 = 1
        End If
    End Sub
    Sub controllacampi(ByVal TestBox As TextBox, ByVal a As Integer)
        If a = 1 Then
            If IsNumeric(TestBox) Then
                a = "Errore dati nella Casella" + Convert.ToString(TestBox)
                lblRicerca.Text = "Errore dati nella Casella" + a
            End If
        End If
    End Sub
    Private Sub modifica()
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sql2 As OleDbDataAdapter
        Dim mm As DateTime
        mm = Date.Now
        objCon.Open()
        Dim trans As OleDbTransaction
        trans = objCon.BeginTransaction()
        Try
            Label3.Visible = False
            DeleteId_concessionario()
            Dim sql1 As String = "UPDATE Tbt_Concessionario SET
DescTelefono1= '" & DoQuotes(TxtTelefono1.Text) & " ' ,DescTelefono2= '" &
DoQuotes(TxtTelefono2.Text) & " ',CognomeChiamante='" &
DoQuotes(TxtCoDelchiama.Text) & "',RagioneSociale='" &
DoQuotes(TxtRagSociCoConc.Text) & "',Relazione='" &
DoQuotes(TxtRelChiamante.Text) & "',CodiceConcessionario=" &
DoQuotes(TxtCodiceConces.Text) & ",NumeroFattura='" &
DoQuotes(TxtNumFattura.Text) & "',Nota_descrittiva='" &
DoQuotes(TxtNotaDescrittiva.Text) & "'  where id_concessionario=(" &
(lbl_idconcessionario.Text) & ")"
            Dim comm As OleDbCommand = New OleDbCommand
            comm.Connection = objCon
            'Inizia la transazione
            comm.Transaction = trans
            'prima query
            comm.CommandText = sql1
            comm.ExecuteNonQuery()
            'eseguo la transazione
            trans.Commit()
        Catch ex As SqlException
            trans.Rollback()
            Response.Write(ex.ToString())
        Finally
            objCon.Close()
            setwrite()
        End Try
        Me.TxtDataChiamata.Text = ViewState("giorno")
        BtnSalva.Text = "Salva"
    End Sub
    Public Function Apici(ByVal s As String) As String
        Apici = Chr(34) & s & Chr(34)
    End Function
    Private Sub DeleteId_concessionario()
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sql2 As String
        Dim mm As DateTime
        mm = Date.Now
        objCon.Open()
        Dim trans As OleDbTransaction
        trans = objCon.BeginTransaction()
        win = "2"
        If (win <> ViewState("param")) Then
            SetIdConcessionario()
        End If
        Try
            sql2 = "delete from Tbt_MotivoChiamata where
id_concessionario= " & lbl_idconcessionario.Text & ""
            Dim comm As OleDbCommand = New OleDbCommand
            comm.Connection = objCon
            'Inizia la transazione
            comm.Transaction = trans
            'prima query
            comm.CommandText = sql2
            comm.ExecuteNonQuery()
            'eseguo la transazione
            trans.Commit()
        Catch ex As SqlException
            'se si sono verificati errori faccio il rollback
            trans.Rollback()
            Response.Write(ex.ToString())
        Finally
            'chiudiamo sempre le connessioni!
            objCon.Close()
        End Try
    End Sub
    Private Sub SetIdConcessionario()
        Dim id_concessionario As String
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sql2 As OleDbDataAdapter
        objCon.Open()
        sql2 = New OleDbDataAdapter("SELECT Max(id_concessionario)  AS
id_motivo from Tbt_Concessionario", objCon)
        Dim querydataset As DataSet = New DataSet()
        sql2.Fill(querydataset)
        If querydataset.Tables(0).Rows.Count > 0 Then
            id_concessionario =
querydataset.Tables(0).Rows(0).Item(0).ToString()
            ViewState("lbl_idconcessionario.Text") = id_concessionario
        Else
            lblRicerca.Visible = True
            lblRicerca.Text = "Nessuna corrispondenza trovata"
            '    GridView1.Visible = False
        End If
    End Sub
    Private Sub InsertcheckBox(ByVal id_motivo As Integer, ByVal
CodiceConcessionario As Integer)
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sql2 As String
        Dim mm As DateTime
        mm = Date.Now
        '' mm.Replace(".", ":")
        objCon.Open()
        Dim trans As OleDbTransaction
        trans = objCon.BeginTransaction()
        Try
            sql2 = "INSERT INTO Tbt_MotivoChiamata (id_motivo,
id_concessionario)values('" & id_motivo & "'," & lbl_idconcessionario.Text
& ")"
            Dim comm As OleDbCommand = New OleDbCommand
            comm.Connection = objCon
            'Inizia la transazione
            comm.Transaction = trans
            'prima query
            comm.CommandText = sql2
            comm.ExecuteNonQuery()
            'eseguo la transazione
            trans.Commit()
        Catch ex As SqlException
            'se si sono verificati errori faccio il rollback
            trans.Rollback()
            Response.Write(ex.ToString())
        Finally
            objCon.Close()
        End Try
    End Sub
    Protected Sub BtnModifica_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnRicerca.Click
        Response.Redirect("GestConcRicerca.aspx")
    End Sub
    Protected Sub TxtRelChiamante_TextChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles TxtRelChiamante.TextChanged
    End Sub
    Protected Sub TextBox9_TextChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TxtNotaDescrittiva.TextChanged
    End Sub
    Protected Sub TxtNumFattura_TextChanged(ByVal sender As Object, ByVal
e As System.EventArgs) Handles TxtNumFattura.TextChanged
    End Sub
    Private Sub caricaCampi()
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sql2 As OleDbDataAdapter
        objCon.Open()
        sql2 = New OleDbDataAdapter("select desctelefono1,desctelefono2, 
CognomeChiamante,RagioneSociale,Relazione,CodiceConcessionario,NumeroFattura,data_chiamata,ora_chiamata,Nota_descrittiva,id_concessionario
from Tbt_Concessionario where id_concessionario=(" & id_concessionario &
")", objCon)
        Dim querydataset As DataSet = New DataSet()
        sql2.Fill(querydataset)
        If querydataset.Tables(0).Rows.Count > 0 Then
            TxtTelefono1.Text =
querydataset.Tables(0).Rows(0).Item("desctelefono1").ToString()
            TxtTelefono2.Text =
querydataset.Tables(0).Rows(0).Item("desctelefono2").ToString()
            TxtCoDelchiama.Text =
querydataset.Tables(0).Rows(0).Item("CognomeChiamante").ToString()
            TxtRagSociCoConc.Text =
querydataset.Tables(0).Rows(0).Item("RagioneSociale").ToString()
            TxtRelChiamante.Text =
querydataset.Tables(0).Rows(0).Item("Relazione").ToString()
            TxtCodiceConces.Text =
querydataset.Tables(0).Rows(0).Item("CodiceConcessionario").ToString()
            TxtNumFattura.Text =
querydataset.Tables(0).Rows(0).Item("NumeroFattura").ToString()
            TxtDataChiamata.Text =
NumberToDate(querydataset.Tables(0).Rows(0).Item("data_chiamata").ToString())
+ " " +
NumberToTime(querydataset.Tables(0).Rows(0).Item("ora_chiamata").ToString())
            TxtNotaDescrittiva.Text =
querydataset.Tables(0).Rows(0).Item("Nota_descrittiva").ToString()
            lbl_idconcessionario.Text =
querydataset.Tables(0).Rows(0).Item("id_concessionario").ToString()
            ViewState("lbl_idconcessionario.Text") =
lbl_idconcessionario.Text
            ViewState("giorno") = TxtDataChiamata.Text
            SetReadonly()
            BtnSalva.Text = "Modifica"
        Else
            lblRicerca.Text = "Nessuna corrispondenza trovata"
        End If
    End Sub
    Private Sub PulisciMaschera()
        Dim i As Integer
        For i = 0 To CheckBoxList1.Items.Count - 1
            CheckBoxList1.Items.Item(i).Selected = False
            CheckBoxList1.Items.Item(i).Enabled = False
        Next
        TxtCoDelchiama.Text = ""
        TxtCodiceConces.Text = ""
        TxtDataChiamata.Text = ""
        TxtNotaDescrittiva.Text = ""
        TxtNumFattura.Text = ""
        TxtTelefono1.Text = ""
        TxtTelefono2.Text = ""
        TxtRelChiamante.Text = ""
        TxtRagSociCoConc.Text = ""
    End Sub
    Private Sub riempiListacheck()
    End Sub
    Private Sub setwrite()
        Dim i As Integer
        For i = 0 To CheckBoxList1.Items.Count - 1
            CheckBoxList1.Items.Item(i).Enabled = True
        Next
        TxtCoDelchiama.ReadOnly = False
        TxtNotaDescrittiva.ReadOnly = False
        TxtNumFattura.ReadOnly = False
        TxtTelefono1.ReadOnly = False
        TxtTelefono2.ReadOnly = False
        TxtRelChiamante.ReadOnly = False
        Me.TxtDataChiamata.Text = ViewState("giorno")
    End Sub
    Private Sub ControlliCampi()
    End Sub
    Private Sub SetReadonly()
        Dim i As Integer
        For i = 0 To CheckBoxList1.Items.Count - 1
            CheckBoxList1.Items.Item(i).Enabled = False
        Next
        TxtCoDelchiama.ReadOnly = True
        TxtDataChiamata.ReadOnly = True
        TxtNotaDescrittiva.ReadOnly = True
        TxtNumFattura.ReadOnly = True
        TxtTelefono1.ReadOnly = True
        TxtTelefono2.ReadOnly = True
        TxtRelChiamante.ReadOnly = True
        Me.TxtDataChiamata.Text = ViewState("giorno")
    End Sub
    Private Sub SettacheckBox()
        Dim i As Integer
        Dim conta As Integer
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sql2 As OleDbDataAdapter
        objCon.Open()
        sql2 = New OleDbDataAdapter("select id_motivo from
Tbt_MotivoChiamata where id_concessionario=(" &
(lbl_idconcessionario.Text) & ")", objCon)
        Dim querydataset As DataSet = New DataSet()
        sql2.Fill(querydataset)
        If querydataset.Tables(0).Rows.Count > 0 Then
            conta = querydataset.Tables(0).Rows.Count
            Dim j As Integer = 0
            For i = 0 To CheckBoxList1.Items.Count - 1
                If conta > 0 Then
                    If CheckBoxList1.Items.Item(i).Value =
querydataset.Tables(0).Rows(j).Item(0).ToString() Then
                        CheckBoxList1.Items.Item(i).Selected = True
                        j = j + 1
                        conta = conta - 1
                    End If
                End If
            Next
            lbl_idconcessionario.Text = ""
        Else
            lblRicerca.Visible = True
        End If
    End Sub
    Private Sub BidCheckBox()
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sql2 As OleDbDataAdapter
        objCon.Open()
        sql2 = New OleDbDataAdapter("select id_motivo,Descrizione from
Tbt_IdentificativoChiamata", objCon)
        Dim querydataset As DataSet = New DataSet()
        sql2.Fill(querydataset)
        If querydataset.Tables(0).Rows.Count > 0 Then
            CheckBoxList1.DataSource = querydataset
            CheckBoxList1.DataValueField = "id_motivo"
            CheckBoxList1.DataTextField = "Descrizione"
            CheckBoxList1.DataBind()
        Else
            lblRicerca.Visible = True
        End If
    End Sub
    Private Sub bind()
        Dim i As Integer
        Dim cod As Integer
        win = "2"
        If (win <> ViewState("param")) Then
            SetIdConcessionario()
        End If
        lbl_idconcessionario.Text = ViewState("lbl_idconcessionario.Text")
        For i = 0 To CheckBoxList1.Items.Count - 1
            If CheckBoxList1.Items.Item(i).Selected = True Then
                cod = CheckBoxList1.Items.Item(i).Value
                InsertcheckBox(cod, lbl_idconcessionario.Text)
            End If
        Next
    End Sub
    Protected Sub BtnLettura_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnPulisci.Click
        ViewState("param") = ""
        lbl_idconcessionario.Visible = False
        PulisciMaschera()
        lbl_idconcessionario.Text = ""
        setwrite()
        BtnRicerca.Visible = True
        BtnSalva.Text = "Salva"
        'If TxtDataChiamata.Text = "" Then
        '    TxtDataChiamata.Text = Date.Now
        'End If
    End Sub
    Protected Sub TxtCodiceConces_TextChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles TxtCodiceConces.TextChanged
        Label3.Text = ""
    End Sub
    Protected Sub CheckBoxList1_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
CheckBoxList1.SelectedIndexChanged
    End Sub
    Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles GridView2.SelectedIndexChanged
    End Sub
    Protected Sub BtnRicerca0_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnRicerca0.Click
        bindata()
    End Sub
    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewCommandEventArgs) Handles
GridView2.RowCommand
        GridView2.Visible = True
        If e.CommandName = "Select" Then
            Dim intRiga As Integer = e.CommandArgument
            id_concessionario = Me.GridView2.DataKeys(intRiga).Value
            caricaCampi()
        End If
        If e.CommandName = "Page" Then
            bindata()
        End If
    End Sub
    Protected Sub BtnPulisci0_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnPulisci0.Click
        TxtCodiceConces2.Text = ""
        txtStartDate.Text = ""
        txtEndDate.Text = ""
        GridView2.Columns.Clear()
        GridView2.Visible = False
    End Sub
    Protected Sub BtnSetta_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnSetta.Click
        Response.Redirect("GestCheck.aspx")
    End Sub
    Protected Sub TxtDataChiamata_TextChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles TxtDataChiamata.TextChanged
    End Sub
End Class
Imports System.Data
Imports System.Data.OleDb
Imports System.Data.SqlClient
Imports System.Diagnostics
Imports System.Configuration
Imports Utility
Partial Class GestCheck
    Inherits 
System.Web.UI.Page
    Public idconcess As String
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
        Page.Title = "Gestione check box"
        EseguiRicerca()
    End Sub
    Private Sub EseguiRicerca()
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sql2 As OleDbDataAdapter
        Dim sSQL As String = String.Empty
        Dim sWHERE As String = String.Empty
        Dim TxtCodiceConces As String = Request.QueryString("loginInfoId")
        sSQL = "select id_motivo as idmotivo ,descrizione as
CodiceConcessionario from Tbt_IdentificativoChiamata  order by id_motivo"
 
        objCon.Open()
        sql2 = New OleDbDataAdapter(sSQL & sWHERE, objCon)
        Dim querydataset As DataSet = New DataSet()
        sql2.Fill(querydataset)
        If querydataset.Tables(0).Rows.Count > 0 Then
            GridView1.DataSource = querydataset
            GridView1.DataBind()
        Else
            lblRicerca.Visible = True
            lblRicerca.Text = "Nessuna corrispondenza trovata"
            GridView1.Visible = False
        End If
    End Sub
    Protected Sub cmdRicerca_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cmdElimina.Click
        EseguiRicerca()
    End Sub
    Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.GridViewRowEventArgs) Handles
GridView1.RowDataBound
        Dim oCmd As HtmlInputButton
        Dim oRiga As DataRowView
        Dim sCodice As String = String.Empty
        Dim sDescrizione As String = String.Empty
        oCmd = CType(e.Row.FindControl("cmdSelect"), HtmlInputButton)
        oRiga = CType(e.Row.DataItem, DataRowView)
        If Not oRiga Is Nothing Then
            sCodice = oRiga.Row("codiceconcessionario").ToString
            ''sDescrizione = oRiga.Row("CognomeChiamante").ToString
        End If
        If Not oCmd Is Nothing Then
            oCmd.Attributes.Add("onclick", "javascript:assegnaRiga('" &
sCodice & "','" & sDescrizione & "');")
        End If
    End Sub
    Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
    End Sub
    Protected Sub GridView1_SelectedIndexChanging(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewSelectEventArgs) Handles
GridView1.SelectedIndexChanging
        GridView1.PageIndex = e.NewSelectedIndex
        EseguiRicerca()
    End Sub
    Protected Sub GridView1_PageIndexChanging(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles
GridView1.PageIndexChanging
        GridView1.PageIndex = e.NewPageIndex
        EseguiRicerca()
    End Sub
    Protected Sub GridView1_RowDeleted(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewDeletedEventArgs) Handles
GridView1.RowDeleted
    End Sub
    Protected Sub BtnAnnulla_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cmdElimina.Click
    End Sub
    Protected Sub cmdRicerca0_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cmdElimina.Click
        lbl_idconcessionario.Text = ""
        Dim objCon As OleDbConnection
        If txtRagioneSociale.Text <> "" Then
            Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
            objCon = New OleDbConnection(connectionstring)
            Dim sql2 As String
            Dim mm As DateTime
            mm = Date.Now
            objCon.Open()
            Dim trans As OleDbTransaction
            trans = objCon.BeginTransaction
            Try
                sql2 = "delete from Tbt_IdentificativoChiamata where
id_motivo= " & ViewState("idconcess") & ""
                Dim comm As OleDbCommand = New OleDbCommand
                comm.Connection = objCon
                'Inizia la transazione
                comm.Transaction = trans
                'prima query
                comm.CommandText = sql2
                comm.ExecuteNonQuery()
                'eseguo la transazione
                trans.Commit()
            Catch ex As SqlException
                'se si sono verificati errori faccio il rollback
                trans.Rollback()
                Response.Write(ex.ToString())
            Finally
                'chiudiamo sempre le connessioni!
                objCon.Close()
            End Try
            EseguiRicerca()
            txtRagioneSociale.Text = ""
        Else
            lbl_idconcessionario.Text = "Eseguire una selezione"
        End If
    End Sub
    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewCommandEventArgs) Handles
GridView1.RowCommand
        GridView1.Visible = True
        If e.CommandName = "Select" Then
            Dim intRiga As Integer = e.CommandArgument
            ViewState("idconcess") = Me.GridView1.DataKeys(intRiga).Value
            ''   ViewState("idconcess") =
GridView1.Rows(intRiga).Cells(1).Text
            txtRagioneSociale.Text =
Me.GridView1.Rows(intRiga).Cells(1).Text
 
        End If
        If e.CommandName = "Page" Then
        End If
    End Sub
    Private Sub insertConcess()
    End Sub
    Private Sub modifica()
 
    End Sub
    Private Sub DeleteId_concessionario()
 
    End Sub
    Protected Sub cmdUpdate_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cmdUpdate.Click
        lbl_idconcessionario.Text = ""
        Dim objCon As OleDbConnection
        If txtRagioneSociale.Text <> "" Then
            Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
            objCon = New OleDbConnection(connectionstring)
            Dim mm As DateTime
            mm = Date.Now
            Dim sql1
            objCon.Open()
            Dim trans As OleDbTransaction
            trans = objCon.BeginTransaction()
            Try
                DeleteId_concessionario()
                sql1 = "UPDATE Tbt_IdentificativoChiamata SET Descrizione=
'" & DoQuotes(txtRagioneSociale.Text) & " ' where id_motivo =" &
(ViewState("idconcess")) & ""
                Dim comm As OleDbCommand = New OleDbCommand
                comm.Connection = objCon
                'Inizia la transazione
                comm.Transaction = trans
                'prima query
                comm.CommandText = sql1
                comm.ExecuteNonQuery()
                'eseguo la transazione
                trans.Commit()
            Catch ex As SqlException
                trans.Rollback()
                Response.Write(ex.ToString())
            Finally
                objCon.Close()
            End Try
            EseguiRicerca()
        Else
            lbl_idconcessionario.Text = "Eseguire una selezione"
        End If
    End Sub
    Protected Sub cmdInsert_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cmdInsert.Click
        lbl_idconcessionario.Text = ""
        If txtRagioneSociale.Text <> "" Then
            Dim objCon As OleDbConnection
            Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
            objCon = New OleDbConnection(connectionstring)
            Dim sql2 As String
            Dim mm As DateTime
            mm = Date.Now
            '' mm.Replace(".", ":")
            objCon.Open()
            Dim trans As OleDbTransaction
            trans = objCon.BeginTransaction()
            Try
                sql2 = "INSERT INTO Tbt_IdentificativoChiamata (
Descrizione)values('" & txtRagioneSociale.Text & "')"
                Dim comm As OleDbCommand = New OleDbCommand
                comm.Connection = objCon
                'Inizia la transazione
                comm.Transaction = trans
                'prima query
                comm.CommandText = sql2
                comm.ExecuteNonQuery()
                'eseguo la transazione
                trans.Commit()
            Catch ex As SqlException
                'se si sono verificati errori faccio il rollback
                trans.Rollback()
                Response.Write(ex.ToString())
            Finally
                objCon.Close()
            End Try
            EseguiRicerca()
        Else
            lbl_idconcessionario.Text = "Inserire una descrizione"
        End If
    End Sub
    Protected Sub BtnAnnulla_Click1(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnAnnulla.Click
        Response.Redirect("Default.aspx")
    End Sub
End Class
Imports System.Data
Imports System.Data.OleDb
Imports System.Data.SqlClient
Imports System.Diagnostics
Imports System.Configuration
Imports Utility
Partial Class GestConcessRicerca
    Inherits 
System.Web.UI.Page
    Public Data As String
    Public Ora As String
    Public CodConcess As Integer
    Public punto1 As Integer
    Public punto2 As Integer
    Public P1 As Integer
    Public P2 As Integer
    Public punto3 As Integer
    Public setparam As Integer
    Public id_concessionario As Integer
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
        Page.Title = "Ricerca"
    End Sub
    Protected Sub BtnRicerca_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnRicerca.Click
        bindata()
    End Sub
    Private Sub bindata()
        Dim i As Integer
        Dim DataInizio As String
        Dim DataFine As String
        If (txtStartDate.Text <> "" And txtEndDate.Text = "") Then
            txtEndDate.Text = txtStartDate.Text
        End If
        If (txtStartDate.Text = "" And txtEndDate.Text <> "") Then
            txtStartDate.Text = txtEndDate.Text
        End If
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sql2 As OleDbDataAdapter
 
        'If (txtStartDate.Text = "") And (txtEndDate.Text = "") And
(TxtCodiceConces2.Text = "") Then
        '    lblRicerca.Visible = True
        '    lblRicerca.Text = "Inserire un Parametro per la ricerca"
        '    Exit Sub
        'End If
        If txtStartDate.Text <> "" And txtEndDate.Text <> "" Then
            DataInizio = txtStartDate.Text
            DataFine = txtEndDate.Text
            Format(DataInizio, "dd/MM/yyyy")
            Format(DataFine, "dd/MM/yyyy")
        End If
        Dim TxtCodiceConces As String = Request.QueryString("loginInfoId")
        objCon.Open()
        ''   cod_concessionario like '%" &
Me.TxtCodiceConces.Text.Replace("'", "''") & "%'"
        '
        If (txtStartDate.Text <> "" And txtEndDate.Text <> "" And
TxtCodiceConces2.Text <> "") Then
            sql2 = New OleDbDataAdapter("select
Numerofattura,RagioneSociale,cognomechiamante,CodiceConcessionario,data_chiamata,ora_chiamata,id_concessionario
from Tbt_Concessionario where CodiceConcessionario=('" &
DoQuotes((TxtCodiceConces2.Text)) & "') and Data_Chiamata >=('" &
DateToNumber(DataInizio) & "') and Data_Chiamata <= ('" &
DateToNumber(DataFine) & "')", objCon)
        ElseIf (txtStartDate.Text <> "" And txtEndDate.Text <> "" And
TxtCodiceConces2.Text = "") Then
            sql2 = New OleDbDataAdapter("select
Numerofattura,RagioneSociale,cognomechiamante,CodiceConcessionario,data_chiamata,ora_chiamata,id_concessionario
from Tbt_Concessionario where  Data_Chiamata >=('" &
DateToNumber(DataInizio) & "') and Data_Chiamata <= ('" &
DateToNumber(DataFine) & "')", objCon)
        ElseIf (txtStartDate.Text = "" And txtEndDate.Text = "" And
TxtCodiceConces2.Text <> "") Then
            sql2 = New OleDbDataAdapter("select
Numerofattura,RagioneSociale,cognomechiamante,CodiceConcessionario,data_chiamata,ora_chiamata,id_concessionario
from Tbt_Concessionario where CodiceConcessionario=('" &
DoQuotes(TxtCodiceConces2.Text) & "')", objCon)
        ElseIf (txtStartDate.Text = "" And txtEndDate.Text = "" And
TxtCodiceConces2.Text = "") Then
            sql2 = New OleDbDataAdapter("select
Numerofattura,RagioneSociale,cognomechiamante,CodiceConcessionario,data_chiamata,ora_chiamata,id_concessionario
from Tbt_Concessionario  ", objCon)
        Else
        End If
        Dim querydataset As DataSet = New DataSet()
        Dim a As String
        sql2.Fill(querydataset)
        If querydataset.Tables(0).Rows.Count > 0 Then
            For i = 0 To querydataset.Tables(0).Rows.Count - 1
                querydataset.Tables(0).Rows(i).Item("ora_chiamata") =
NumberToTime(querydataset.Tables(0).Rows(i).Item("ora_chiamata").ToString)
                querydataset.Tables(0).Rows(i).Item("data_chiamata") =
NumberToDate(querydataset.Tables(0).Rows(i).Item("data_chiamata").ToString)
            Next i
            lblRicerca.Text = ""
            GridView1.Visible = True
            GridView1.DataSource = querydataset
            GridView1.DataBind()
        Else
            lblRicerca.Visible = True
            lblRicerca.Text = "Nessuna corrispondenza trovata"
            GridView1.Visible = False
        End If
    End Sub
    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewCommandEventArgs) Handles
GridView1.RowCommand
        GridView1.Visible = True
        If e.CommandName = "Select" Then
            Dim intRiga As Integer = e.CommandArgument
 
            id_concessionario = Me.GridView1.DataKeys(intRiga).Value
            caricaCampi()
        End If
        If e.CommandName = "Page" Then
            bindata()
        End If
    End Sub
    Private Sub caricaCampi()
 
        Dim loginid As Integer
        loginid = 2
 
        Response.Redirect("Default.aspx?loginInfo=" +
Convert.ToString(loginid) + "&id_concessionario=" +
Convert.ToString(id_concessionario))
    End Sub
    Protected Sub BtnAnnulla_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnAnnulla.Click
        Response.Redirect("Default.aspx?")
    End Sub
    Protected Sub TxtConces_TextChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TxtCodiceConces2.TextChanged
    End Sub
    Protected Sub GridView1_PageIndexChanging(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles
GridView1.PageIndexChanging
        GridView1.PageIndex = e.NewPageIndex
        bindata()
    End Sub
    Protected Sub BtnPulisci_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnPulisci.Click
        TxtCodiceConces2.Text = ""
        txtStartDate.Text = ""
        txtEndDate.Text = ""
        GridView1.Columns.Clear()
        GridView1.Visible = False
    End Sub
    Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TxtCodiceConces2.TextChanged
    End Sub
    Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
        Dim bb As String
        bb = Me.GridView1.DataKeyNames(0)
    End Sub
    Protected Sub GridView1_SelectedIndexChanging(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewSelectEventArgs) Handles
GridView1.SelectedIndexChanging
        Dim bb As String
        bb = Me.GridView1.DataKeyNames(0)
    End Sub
End Class
Imports System.Data.OleDb
Imports System.Data.SqlClient
Imports System.Diagnostics
Imports System.Configuration
Imports Utility
Imports System.Data
Imports System.IO
Imports System.DirectoryServices
Partial Class Installazione
    Inherits 
System.Web.UI.Page
    Private Sub CreateVirtualDir(ByVal WebSite As String, ByVal AppName As
String, ByVal Path As String)
        Dim IISSchema As New
System.DirectoryServices.DirectoryEntry("IIS://" & WebSite &
"/Schema/AppIsolated")
        Dim CanCreate As Boolean = Not
IISSchema.Properties("Syntax").Value.ToString.ToUpper() = "BOOLEAN"
        IISSchema.Dispose()
        If CanCreate Then
            Dim PathCreated As Boolean
            Try
                Dim IISAdmin As New
System.DirectoryServices.DirectoryEntry("IIS://" & WebSite &
"/W3SVC/1/Root")
                'make sure folder exists
                If Not System.IO.Directory.Exists(Path) Then
                    System.IO.Directory.CreateDirectory(Path)
                    PathCreated = True
                End If
                'If the virtual directory already exists then delete it
                For Each VD As System.DirectoryServices.DirectoryEntry In
IISAdmin.Children
                    If VD.Name = AppName Then
                        IISAdmin.Invoke("Delete", New String()
{VD.SchemaClassName, AppName})
                        IISAdmin.CommitChanges()
                        Exit For
                    End If
                Next VD
                'Create and setup new virtual directory
                Dim VDir As System.DirectoryServices.DirectoryEntry =
IISAdmin.Children.Add(AppName, "IIsWebVirtualDir")
                VDir.Properties("Path").Item(0) = Path
                VDir.Properties("AppFriendlyName").Item(0) = AppName
                VDir.Properties("EnableDirBrowsing").Item(0) = False
                VDir.Properties("AccessRead").Item(0) = True
                VDir.Properties("AccessExecute").Item(0) = True
                VDir.Properties("AccessWrite").Item(0) = False
                VDir.Properties("AccessScript").Item(0) = True
                VDir.Properties("AuthNTLM").Item(0) = True
                VDir.Properties("EnableDefaultDoc").Item(0) = True
                VDir.Properties("DefaultDoc").Item(0) =
"default.htm,default.aspx,default.asp"
                VDir.Properties("AspEnableParentPaths").Item(0) = True
                VDir.CommitChanges()
                'the following are acceptable params
                'INPROC = 0
                'OUTPROC = 1
                'POOLED = 2
                VDir.Invoke("AppCreate", 1)
            Catch Ex As Exception
                If PathCreated Then
                    System.IO.Directory.Delete(Path)
                End If
                Throw Ex
            End Try
        End If
    End Sub
    Protected Sub Lancia_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Lancia.Click
        CreateVirtualDir(TextBox1.Text, TextBox2.Text, TextBox3.Text)
    End Sub
End Class
Imports System.Data
Imports System.Data.OleDb
Imports System.Diagnostics
Imports System.Configuration
Imports System
Partial Class RicercaConcessionario
    Inherits 
System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
        Page.Title = "Ricerca Codice Concessionario"
 
    End Sub
    Private Sub EseguiRicerca()
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sSQL As String = String.Empty
        Dim sWHERE As String = String.Empty
        Dim sql2 As OleDbDataAdapter
        Dim TxtCodiceConces As String = Request.QueryString("loginInfoId")
        sSQL = "select  RagioneSociale as
CognomeChiamante,cod_concessionario as codiceconcessionario from
AnagraficaConcessionari "
        If Me.TxtCodiceConces.Text.Length > 0 Then
            sWHERE &= " AND cod_concessionario like '%" &
Me.TxtCodiceConces.Text.Replace("'", "''") & "%'"
        End If
        If Me.txtRagioneSociale.Text.Length > 0 Then
            sWHERE &= " AND RagioneSociale like '%" &
Me.txtRagioneSociale.Text.Replace("'", "''") & "%'"
        End If
        If sWHERE.Length > 0 Then
            sWHERE = " WHERE " & sWHERE.Substring(4)
        End If
        objCon.Open()
        sql2 = New OleDbDataAdapter(sSQL & sWHERE, objCon)
        Dim querydataset As DataSet = New DataSet()
        sql2.Fill(querydataset)
        If querydataset.Tables(0).Rows.Count > 0 Then
            GridView1.DataSource = querydataset
            GridView1.DataBind()
        Else
            lblRicerca.Visible = True
            lblRicerca.Text = "Nessuna corrispondenza trovata"
            GridView1.Visible = False
        End If
    End Sub
 
    Protected Sub cmdRicerca_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cmdRicerca.Click
        EseguiRicerca()
    End Sub
    Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.GridViewRowEventArgs) Handles
GridView1.RowDataBound
        Dim oCmd As HtmlInputButton
        Dim oRiga As DataRowView
        Dim sCodice As String = String.Empty
        Dim sDescrizione As String = String.Empty
        oCmd = CType(e.Row.FindControl("cmdSelect"), HtmlInputButton)
        oRiga = CType(e.Row.DataItem, DataRowView)
        If Not oRiga Is Nothing Then
            sCodice = oRiga.Row("codiceconcessionario").ToString
            sDescrizione = oRiga.Row("CognomeChiamante").ToString
        End If
        If Not oCmd Is Nothing Then
            oCmd.Attributes.Add("onclick", "javascript:assegnaRiga('" &
sCodice & "','" & sDescrizione & "');")
        End If
    End Sub
 
    Protected Sub GridView1_SelectedIndexChanging(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewSelectEventArgs) Handles
GridView1.SelectedIndexChanging
        GridView1.PageIndex = e.NewSelectedIndex
        EseguiRicerca()
    End Sub
    Protected Sub GridView1_PageIndexChanging(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles
GridView1.PageIndexChanging
        GridView1.PageIndex = e.NewPageIndex
        EseguiRicerca()
    End Sub
End Class
Imports System.Data
Imports System.Data.OleDb
Imports System.Diagnostics
Imports System.Configuration
Partial Class RicercaConcessionarInserito
    Inherits 
System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
        Page.Title = "Ricerca Codice Concessionario"
    End Sub
    Private Sub EseguiRicerca()
        Dim objCon As OleDbConnection
        Dim connectionstring As String =
System.Configuration.ConfigurationManager.ConnectionStrings("strCon").ConnectionString
        objCon = New OleDbConnection(connectionstring)
        Dim sql2 As OleDbDataAdapter
        Dim sSQL As String = String.Empty
        Dim sWHERE As String = String.Empty
        Dim TxtCodiceConces As String = Request.QueryString("loginInfoId")
        sSQL = "select distinct RagioneSociale as
CognomeChiamante,codiceconcessionario as codiceconcessionario from
Tbt_Concessionario "
        If Me.TxtCodiceConces.Text.Length > 0 Then
            sWHERE &= " AND codiceconcessionario like '%" &
Me.TxtCodiceConces.Text.Replace("'", "''") & "%'"
        End If
        If Me.txtRagioneSociale.Text.Length > 0 Then
            sWHERE &= " AND RagioneSociale like '%" &
Me.txtRagioneSociale.Text.Replace("'", "''") & "%'"
        End If
        If sWHERE.Length > 0 Then
            sWHERE = " WHERE " & sWHERE.Substring(4)
        End If
        objCon.Open()
        sql2 = New OleDbDataAdapter(sSQL & sWHERE, objCon)
        Dim querydataset As DataSet = New DataSet()
        sql2.Fill(querydataset)
        If querydataset.Tables(0).Rows.Count > 0 Then
            GridView1.Visible = True
            GridView1.DataSource = querydataset
            GridView1.DataBind()
        Else
            lblRicerca.Visible = True
            lblRicerca.Text = "Nessuna corrispondenza trovata"
            GridView1.Visible = False
        End If
    End Sub
    Protected Sub cmdRicerca_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cmdRicerca.Click
        EseguiRicerca()
    End Sub
    Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.GridViewRowEventArgs) Handles
GridView1.RowDataBound
        Dim oCmd As HtmlInputButton
        Dim oRiga As DataRowView
        Dim sCodice As String = String.Empty
        Dim sDescrizione As String = String.Empty
        oCmd = CType(e.Row.FindControl("cmdSelect"), HtmlInputButton)
        oRiga = CType(e.Row.DataItem, DataRowView)
        If Not oRiga Is Nothing Then
            sCodice = oRiga.Row("codiceconcessionario").ToString
            sDescrizione = oRiga.Row("CognomeChiamante").ToString
        End If
        If Not oCmd Is Nothing Then
            oCmd.Attributes.Add("onclick", "javascript:assegnaRiga('" &
sCodice & "','" & sDescrizione & "');")
        End If
    End Sub
    Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
    End Sub
    Protected Sub GridView1_SelectedIndexChanging(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewSelectEventArgs) Handles
GridView1.SelectedIndexChanging
        GridView1.PageIndex = e.NewSelectedIndex
        EseguiRicerca()
    End Sub
    Protected Sub GridView1_PageIndexChanging(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles
GridView1.PageIndexChanging
        GridView1.PageIndex = e.NewPageIndex
        EseguiRicerca()
    End Sub
End Class
<?xml version="1.0"?>
<configuration xmlns="
http://schemas.microsoft.com/.NetConfiguration/v2.0
">
	<system.web>
		<authentication mode="Forms"/>
		<compilation debug="true">
			<assemblies>
				<add assembly="System.DirectoryServices, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
		</compilation>
	</system.web>
	<appSettings/>
	<!--
  <connectionStrings>
		<add name="strCon" connectionString="Data Source=PCFrancesco22;Initial
Catalog=Concessionario; Integrated Security=true"/>
	</connectionStrings>
   -->
	<connectionStrings>
		<add name="strCon"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:Concessionario.mdb;"/>
	</connectionStrings>
	<system.web>
		<customErrors mode="Off"/>
	</system.web>
</configuration>
<%@ Page Language="vb" AutoEventWireup="false" Src="CalendarioVB.aspx.vb"
Inherits="PopUp" %>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html>
 <head>
 <title>PopUp</title>
 <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
 <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
 <meta name=vs_defaultClientScript content="JavaScript">
 <meta name=vs_targetSchema
content="
http://schemas.microsoft.com/intellisense/ie5
">
 </head>
 <body MS_POSITIONING="GridLayout">
 <form id="Form1" method="post" runat="server">
 <asp:Calendar ID="calDate" OnSelectionChanged="Change_Date"
Runat="server" />
 <input type="hidden" id="control" runat="server" />
 </form>
 </body>
 </html> 
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
">
<html xmlns="
http://www.w3.org/1999/xhtml
">
<head id="Head1" runat="server">
	<title>Gestione Concessionari</title>
	<link href="css/standard.css" type="text/css" rel="stylesheet" />
 
	<script language="javascript" type="text/javascript">
 
 
 
         function ricercaConcessionario()
        {
           window.open('RicercaConcInserito.aspx');
 
            return false;
        }
 
    </script>
      <script>
function openCalendar()
{
 
window.open('CalendarioVB.aspx?textbox=tbMyDate','cal','width=220,height=200,left=270,top=180')
}
</script>
 <script>
function ricercaConcessionario2()
{
  window.open('RicercaConc.aspx');
 
            return false;
}
</script>
    <style type="text/css">
        .style1
        {
            font-size: 8pt;
            background-color: #FFFFFF;
            border-style: none;
            padding-left: 3;
            padding-right: 3;
            color: #003874;
            font-weight: bold;
            width: 259px;
        }
        .style2
        {
            font-size: 8pt;
            background-color: #FFFFFF;
            border-style: none;
            padding-left: 3;
            padding-right: 3;
            color: #003874;
            font-weight: bold;
        }
        .style3
        {
            font-size: 8pt;
            background-color: #FFFFFF;
            border-style: none;
            padding-left: 3;
            padding-right: 3;
            color: #003874;
            font-weight: bold;
            width: 387px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
	<table class="table_style" width="900px" align="center">
            <tr>
			<td class="td_style" valign="top" style="width: 896px;">
				<img alt="logo" src="images/testata.JPG" style="width: 873px"
/>&nbsp;</td>
            </tr>
            <tr>
			<td class="td_style">
				<asp:Panel ID="pnlEdit" runat="server" Width="100%">
					<table align="center" class="table_style2">
						<tr>
							<td class="td_style" colspan="17">
                                    <asp:Panel ID="Panel3" runat="server"
Font-Bold="True" Font-Size="X-Large" 
                                        Width="100%">
                                        <table align="center"
class="table_background">
                                            <tr>
                                                <td align="center"
atomicselection="True">
                                                    <table border="bold"
class="table_background">
                                                        <tr>
                                                            <td
align="left" class="td_style">
                                                                &nbsp;
                                                            </td>
                                                            <td
align="left" class="td_style" colspan="2">
 
GESTIONE&nbsp;&nbsp; RICERCA&nbsp;&nbsp;&nbsp;&nbsp; SCHEDA
                                                            </td>
                                                            <td
align="left" class="td_style">
                                                                &nbsp;
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td
align="left" class="td_style">
                                                                Codice
Conc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                <br />
                                                            </td>
                                                            <td
align="left" class="td_style">
 
<asp:TextBox ID="TxtCodiceConces2" runat="server"
Width="196px"></asp:TextBox>
                                                            </td>
                                                            <td
align="left" class="td_style">
                                                                <input
ID="cmdRicerca1" runat="server" onclick="ricercaConcessionario();" 
 
type="button" value="Ricerca" />
                                                            </td>
                                                            <td
align="left">
                                                                <table>
                                                                    <tr>
 
<td align="right" class="td_style">
 
 Data Inizio:
 
</td>
 
<td align="left" class="td_style">
 
 <asp:TextBox ID="txtStartDate" runat="server" />
 
</td>
 
<td align="center" class="td_style">
 
 <a href="javascript:;" 
 
 
onclick="window.open('CalendarioVB.aspx?textbox=txtStartDate','cal','width=250,height=225,left=270,top=180')">
 
 <img border="0" src="images/calendario.gif" /></a>
 
</td>
                                                                    </tr>
                                                                    <tr>
 
<td align="right" class="td_style">
 
 Data Fine:
 
</td>
 
<td align="left" class="td_style">
 
 <asp:TextBox ID="txtEndDate" runat="server" />
 
</td>
 
<td align="center" class="td_style">
 
 <a href="javascript:;" 
 
 
onclick="window.open('CalendarioVB.aspx?textbox=txtEndDate','cal','width=250,height=225,left=270,top=180')">
 
 <img border="0" src="images/calendario.gif" /></a>
 
</td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <br />
                                                    <table
class="table_background">
                                                        <tr>
                                                            <td
align="center" atomicselection="True" class="td_style" unselectable="on">
                                                                <asp:Label
ID="lbl_idconcessionario0" runat="server" ForeColor="Red"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td
align="center" atomicselection="True" class="td_style" unselectable="on">
 
<asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
 
AllowSorting="True" AutoGenerateColumns="False"
AutoGenerateSelectButton="True" 
 
BackColor="White" BorderColor="#999999" BorderStyle="None"
BorderWidth="1px" 
 
CellPadding="3" CssClass="rowheader" DataKeyNames="id_concessionario" 
 
Font-Bold="False" Font-Names="Verdana" 
 
Font-Size="14px" GridLines="Vertical" HeaderStyle-BackColor="#ccffff" 
 
Height="16px" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" 
 
Width="100%" EnableTheming="False">
 
 
<RowStyle BackColor="#EEEEEE" CssClass="rowheader" ForeColor="Black" />
 
<Columns>
 
<asp:BoundField DataField="CodiceConcessionario" 
 
 HeaderText="Codice del Conc">
 
 <ControlStyle Font-Underline="False" />
 
 <ItemStyle Font-Bold="False" HorizontalAlign="Center" />
 
</asp:BoundField>
 
<asp:BoundField DataField="CognomeChiamante" HeaderText="Cognome del
Chiamante">
 
 <ItemStyle Font-Bold="False" HorizontalAlign="Center" />
 
</asp:BoundField>
 
<asp:BoundField DataField="RagioneSociale" HeaderText="Nome del Chiamante">
 
 <ItemStyle Font-Bold="False" HorizontalAlign="Center" />
 
</asp:BoundField>
 
<asp:BoundField DataField="NumeroFattura" HeaderText="Numero della
Fattura">
 
 <ItemStyle Font-Bold="False" HorizontalAlign="Center" />
 
</asp:BoundField>
 
<asp:BoundField DataField="data_Chiamata" HeaderText="data della Chiamata">
 
 <ItemStyle Font-Bold="False" HorizontalAlign="Center" />
 
</asp:BoundField>
 
<asp:BoundField DataField="ora_Chiamata" HeaderText="Ora della Chiamata">
 
 <ItemStyle Font-Bold="False" HorizontalAlign="Center" />
 
</asp:BoundField>
 
<asp:TemplateField>
 
 <ItemTemplate>
 
     <asp:HiddenField ID="hdID" runat="server" 
 
         Value='<%# Eval("ID_concessionario") %>' />
 
 </ItemTemplate>
 
</asp:TemplateField>
 
<asp:BoundField DataField="id_concessionario"
HeaderText="id_concessionario" 
 
 Visible="False" />
 
</Columns>
 
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
 
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center"
/>
 
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" Font-Size="15px" 
 
Font-Strikeout="True" ForeColor="White" />
 
<HeaderStyle BackColor="#000066" Font-Bold="True" Font-Size="Smaller" 
 
ForeColor="White" />
 
<AlternatingRowStyle BackColor="#DCDCDC" />
 
</asp:GridView>
                                                                <asp:Label
ID="lblRicerca0" runat="server" Font-Bold="True" Font-Size="Smaller" 
 
ForeColor="Red"></asp:Label>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <table class="style11">
                                                        <tr>
                                                            <td
class="td_style">
                                                                <table
class="style11">
                                                                    <tr>
 
<td class="td_style">
 
 <table align="center" class="style5">
 
     <tr>
 
         <td class="style8">
 
             &nbsp;
 
             <asp:Button ID="BtnRicerca0" runat="server" Font-Bold="True"
Font-Size="Small" 
 
                 Height="26px" Text="Ricerca" Width="82px" />
 
         </td>
 
         <td class="style8">
 
             <asp:Button ID="BtnAnnulla" runat="server" Font-Bold="True"
Font-Size="Small" 
 
                 Height="26px" Text="Indietro" Width="84px"
Visible="False" />
 
         </td>
 
         <td class="style8">
 
             <asp:Button ID="BtnPulisci0" runat="server" Font-Bold="True"
Font-Size="Small" 
 
                 Height="26px" Text="Pulisci Campi" Width="98px"
Visible="False" />
 
         </td>
 
     </tr>
 
 </table>
 
</td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <br />
                                                    <br />
                                                </td>
                                                <td align="center"
atomicselection="True">
                                                    &nbsp;
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:Panel>
                                </td>
                            </tr>
                            <tr>
							<td class="style3">
                                    Data Chiamata
                                    </td>
							    <td class="style2" colspan="2">
                                    &nbsp;</td>
							<td class="td_style">
                                    &nbsp;<asp:TextBox
ID="TxtDataChiamata" runat="server" EnableViewState="False" 
                                        Font-Bold="True" Height="18px"
Style="margin-left: 0px" Width="162px"></asp:TextBox>
&nbsp;</td>
                                <td class="td_style">
                                    <a href="javascript:;" 
 
onclick="window.open('CalendarioVB.aspx?textbox=TxtDataChiamata','cal','width=250,height=225,left=270,top=180')">
                                    <img border="0"
src="images/calendario.gif" /></a></td>
                                <td class="td_style">
                                    &nbsp;</td>
                                <td class="td_style">
                                    &nbsp;</td>
                                <td class="td_style">
                                    &nbsp;</td>
                                <td class="td_style">
                                    &nbsp;</td>
                                <td class="td_style">
                                    &nbsp;</td>
                                <td class="td_style">
                                    &nbsp;</td>
                                <td class="td_style">
                                    &nbsp;</td>
                                <td class="td_style">
                                    &nbsp;</td>
                                <td class="td_style">
                                    &nbsp;</td>
                                <td class="td_style">
                                    &nbsp;</td>
                                <td class="td_style">
                                    &nbsp;</td>
                                <td class="td_style">
                                    &nbsp;</td>
                            </tr>
                           <tr>
							<td class="style1" colspan="2">
                                    Telefono Per Contattare
                                </td>
							<td class="td_style" colspan="14">
								<asp:TextBox ID="TxtTelefono1" runat="server" Width="163px"
Font-Bold="True" 
                                    Height="18px"></asp:TextBox>
                                </td>
                               <td class="td_style">
                                   <asp:TextBox ID="TxtTelefono2"
runat="server" Font-Bold="True" Height="20px" 
                                       Width="194px"></asp:TextBox>
                               </td>
                            </tr>
                             <tr>
							<td class="style1" colspan="2">
                                    Codice Conc</td>
							<td class="td_style" colspan="15">
								<asp:TextBox ID="TxtCodiceConces" runat="server" Width="197px"
Font-Bold="True" 
                                    Height="19px"
ReadOnly="true"></asp:TextBox>
                                <input ID="cmdRicerca2" runat="server"
onclick="ricercaConcessionario2();" 
                                    type="button" value="Ricerca" />
                                <asp:Label ID="Label3" runat="server"
ForeColor="#FF3300"></asp:Label>
                                </td>
                            </tr>
                            <tr>
							<td class="style1" colspan="2">
								Cognome e Nome del Chiamante
                                </td>
							<td class="td_style" colspan="15">
								<asp:TextBox ID="TxtCoDelchiama" runat="server" Width="361px"
Font-Bold="True" 
                                    MaxLength="200" Height="24px"
Style="margin-right: 6px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
							<td class="style1" colspan="2">
                                    Ragione Sociale del Conc<br />
                                    (se differente dal chiamante)
                                </td>
							<td class="td_style" colspan="15">
                                    <asp:TextBox ID="TxtRagSociCoConc"
runat="server" Width="361px" 
                                        Font-Bold="True" Height="21px"
MaxLength="100" ReadOnly="True"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
							<td class="style1" colspan="2">
                                    Relazione del chiamante con il
concessionario
                                </td>
							<td class="td_style" colspan="15">
                                    <asp:TextBox ID="TxtRelChiamante"
runat="server" Width="361px" Font-Bold="True" 
                                        Height="18px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
							<td class="td_style" colspan="3">
                                    Numero Fattura
                                </td>
							<td class="td_style" colspan="14">
                                    <asp:TextBox ID="TxtNumFattura"
runat="server" Font-Bold="True" Height="18px" 
                                        Width="197px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
							<td class="td_style" colspan="3" rowspan="2">
                                    &nbsp;Motivo dalla chiamata: (marcare
uno o pi� elementi della lista)<asp:CheckBoxList 
                                        ID="CheckBoxList1" runat="server"
DataTextField="Descrizione" 
                                        DataValueField="id_motivo"
Font-Size="Smaller">
                                    </asp:CheckBoxList>
                                </td>
                                <td class="td_style" colspan="14">
                                    Nota descrittiva della richiesta:
                                </td>
                            </tr>
                        <tr>
                            <td class="td_style" colspan="14">
                                <asp:TextBox ID="TxtNotaDescrittiva"
runat="server" BackColor="#CCCCCC" 
                                    Font-Bold="True" Font-Overline="False"
Font-Size="Small" ForeColor="Black" 
                                    Height="261px" MaxLength="1000"
TextMode="MultiLine" Width="424px"></asp:TextBox>
                            </td>
                        </tr>
                        </table>
                    </asp:Panel>
				<asp:Panel ID="pnlButton" runat="server" Width="100%" Font-Bold="True"
Font-Size="Large"
					HorizontalAlign="Left">
					<table class="table_background" style="width: 900px;">
                            <tr>
							<td class="td_style">
								&nbsp;
							</td>
							<td class="td_style">
								<table align="center" class="table_background">
                            <tr>
										<td class="td_style" align="center">
											<asp:Button ID="BtnSalva" runat="server" Font-Bold="True"
Font-Size="Small" Height="25px"
												Text="Salva" Width="150px" Style="margin-bottom: 0px" />
										</td>
										<td class="td_style" align="center">
											<asp:Button ID="BtnRicerca" runat="server" Font-Bold="True"
Font-Size="Small" Height="26px"
												Text="Ricerca" Width="150px" />
										</td>
										<td class="td_style" align="center">
											<asp:Button ID="BtnPulisci" runat="server" Font-Bold="True"
Font-Size="Small" Height="26px"
												Text="Pulisci Campi" Width="150px" />
										    <asp:Button ID="BtnSetta" runat="server" Font-Bold="True"
Font-Size="Small" 
                                                Height="26px" Text="Check
Box" Width="150px" />
										</td>
                            </tr>
                        </table>
							</td>
							<td class="td_style">
								&nbsp;
							</td>
						</tr>
                                        <tr>
							<td class="td_style" align="center" colspan="3">
								<asp:Label ID="lblRicerca" runat="server" Font-Bold="True"
ForeColor="#FF3300"></asp:Label>
                                            </td>
                                        </tr>
						<tr>
							<td class="td_style" colspan="3">
								<asp:Label ID="lbl_idconcessionario" runat="server"></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="GestConcRicerca.aspx.vb" Inherits="GestConcessRicerca" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
">
<html xmlns="
http://www.w3.org/1999/xhtml
">
<head id="Head1" runat="server">
	<title>Gestione Concessionari</title>
	<link href="css/standard.css" type="text/css" rel="stylesheet" />
	<script language="javascript" type="text/javascript">
 
 
 
         function ricercaConcessionario()
        {
           window.open('RicercaConc.aspx');
 
            return false;
        }
 
    </script>
</head>
<body>
 <form id="Form1" method="post" runat="server">
	<table class="table_style" width="900px" align="center">
		<tr>
			<td class="td_style" valign="top" style="width: 896px;">
				<img alt="logo" src="images/testata.JPG" />
			</td>
		</tr>
		<tr>
			<td class="td_style">
				<asp:Panel ID="Panel3" runat="server" Width="100%" Font-Bold="True"
Font-Size="X-Large">
					<table class="table_background" align="center">
                            <tr>
                                <td align="center" atomicselection="True">
								<table border="bold" class="table_background">
                                        <tr>
										<td align="left" class="td_style">
											&nbsp;
										</td>
										<td class="td_style" align="left" colspan="2">
											GESTIONE&nbsp;&nbsp; RICERCA&nbsp;&nbsp;&nbsp;&nbsp; SCHEDA
										</td>
										<td class="td_style" align="left">
											&nbsp;
										</td>
                                        </tr>
                                        <tr>
										<td align="left" class="td_style">
                                                Codice
Conc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                <br />
                                            </td>
										<td align="left" class="td_style">
                                                <asp:TextBox
ID="TxtCodiceConces2" runat="server" Width="196px"></asp:TextBox>
                                            </td>
										<td align="left" class="td_style">
											<input id="cmdRicerca" runat="server"
onclick="ricercaConcessionario();" type="button"
												value="Ricerca" />
                                            </td>
                                            <td align="left">
                                                <table>
                                                    <tr>
													<td align="right" class="td_style">
                                                            Data Inizio:
                                                        </td>
													<td align="left" class="td_style">
														<asp:TextBox ID="txtStartDate" runat="server" />
                                                        </td>
													<td align="center" class="td_style">
														<a href="javascript:;"
onclick="window.open('CalendarioVB.aspx?textbox=txtStartDate','cal','width=250,height=225,left=270,top=180')">
                                                            <img
border="0" src="images/calendario.gif" /></a>
                                                        </td>
                                                    </tr>
                                                    <tr>
													<td align="right" class="td_style">
                                                            Data Fine:
                                                        </td>
													<td align="left" class="td_style">
														<asp:TextBox ID="txtEndDate" runat="server" />
                                                        </td>
													<td align="center" class="td_style">
														<a href="javascript:;"
onclick="window.open('CalendarioVB.aspx?textbox=txtEndDate','cal','width=250,height=225,left=270,top=180')">
                                                            <img
border="0" src="images/calendario.gif" /></a>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
								<br />
								<table class="table_background" width="100%">
									<tr>
										<td align="center" atomicselection="True" unselectable="on"
class="td_style">
                                    <asp:Label ID="lbl_idconcessionario"
runat="server" ForeColor="Red"></asp:Label>
										</td>
									</tr>
                                        <tr>
										<td align="center" atomicselection="True" unselectable="on"
class="td_style">
											<asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                                                AllowSorting="True"
AutoGenerateColumns="False" AutoGenerateSelectButton="True" 
                                                BackColor="White"
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" 
                                                CellPadding="3"
CssClass="rowheader" DataKeyNames="id_concessionario" 
 
EnableModelValidation="True" Font-Bold="False" Font-Names="Verdana" 
                                                Font-Size="Smaller"
GridLines="Vertical" HeaderStyle-BackColor="#ccffff" 
                                                Height="16px"
OnSelectedIndexChanged="GridView1_SelectedIndexChanged" 
                                                Width="100%">
                                                <RowStyle
BackColor="#EEEEEE" CssClass="rowheader" ForeColor="Black" />
                                                <Columns>
                                                    <asp:BoundField
DataField="CodiceConcessionario" 
                                                        HeaderText="Codice
del Conc">
                                                        <ControlStyle
Font-Underline="False" />
                                                        <ItemStyle
Font-Bold="False" Font-Size="Smaller" HorizontalAlign="Center" />
                                                    </asp:BoundField>
                                                    <asp:BoundField
DataField="CognomeChiamante" HeaderText="Cognome del Chiamante">
                                                        <ItemStyle
Font-Bold="False" Font-Size="Smaller" HorizontalAlign="Center" />
                                                    </asp:BoundField>
                                                    <asp:BoundField
DataField="RagioneSociale" HeaderText="Nome del Chiamante">
                                                        <ItemStyle
Font-Bold="False" Font-Size="Smaller" HorizontalAlign="Center" />
                                                    </asp:BoundField>
                                                    <asp:BoundField
DataField="NumeroFattura" HeaderText="Numero della Fattura">
                                                        <ItemStyle
Font-Bold="False" Font-Size="Smaller" HorizontalAlign="Center" />
                                                    </asp:BoundField>
                                                    <asp:BoundField
DataField="data_Chiamata" HeaderText="data della Chiamata">
                                                        <ItemStyle
Font-Bold="False" Font-Size="Smaller" HorizontalAlign="Center" />
                                                    </asp:BoundField>
                                                    <asp:BoundField
DataField="ora_Chiamata" HeaderText="Ora della Chiamata">
                                                        <ItemStyle
Font-Bold="False" Font-Size="Smaller" HorizontalAlign="Center" />
                                                    </asp:BoundField>
 
                                                    <asp:TemplateField>
                                                    <ItemTemplate>
                                                    <asp:HiddenField
ID="hdID" runat="server" Value='<%# Eval("ID_concessionario") %>' />
 
</ItemTemplate></asp:TemplateField>
                                                    <asp:BoundField
DataField="id_concessionario" HeaderText="id_concessionario" 
                                                        Visible="False" />
                                                </Columns>
                                                <FooterStyle
BackColor="#CCCCCC" ForeColor="Black" />
                                                <PagerStyle
BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                                                <SelectedRowStyle
BackColor="#008A8C" Font-Bold="True" Font-Size="Smaller" 
                                                    ForeColor="White" />
                                                <HeaderStyle
BackColor="#000066" Font-Bold="True" Font-Size="Smaller" 
                                                    ForeColor="White" />
                                                <AlternatingRowStyle
BackColor="#DCDCDC" />
                                            </asp:GridView>
											<asp:Label ID="lblRicerca" runat="server" Font-Size="Smaller"
ForeColor="Red" Font-Bold="True"></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                    <table class="style11">
                                        <tr>
										<td class="td_style">
                                                <table class="style11">
                                                    <tr>
													<td class="td_style">
                                                            <table
align="center" class="style5">
                                                                <tr>
                                                                    <td
class="style8">
 
&nbsp;
																	<asp:Button ID="BtnRicerca" runat="server"
Font-Bold="True" Font-Size="Small" Height="26px"
																		Text="Ricerca" Width="82px" />
																</td>
																<td class="style8">
																	<asp:Button ID="BtnAnnulla" runat="server"
Font-Bold="True" Font-Size="Small" Height="26px"
																		Text="Indietro" Width="84px" />
																</td>
																<td class="style8">
																	<asp:Button ID="BtnPulisci" runat="server"
Font-Bold="True" Font-Size="Small" Height="26px"
																		Text="Pulisci Campi" Width="98px" />
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                    <br />
                                    <br />
                                </td>
                                <td align="center" atomicselection="True">
								&nbsp;
							</td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <br />
                    <br />
                    <br />
                    <br />
                </td>
			<td class="td_style">
				&nbsp;
			</td>
			<td class="td_style">
				&nbsp;
			</td>
            </tr>
        </table>  
    </form>
</body>
</html>
-- 
questo articolo e` stato inviato via web dal servizio gratuito 
http://www.newsland.it/news
 segnala gli abusi ad 
ab...@newsland.it

 				�


SONO LAUREATO IN INFORMATICA, HO LE CONOSCENZE DI DIRITTO PUBBLICO,
PRIVATO, FANZIONARIO, LEGGI DI EDONOMIA.,...FRANCESCE E INGLESE...
UNA SCRIVANIA IN UN ENTE....PUBBLICO.....SILVIO....
quando vi dicono quello � cosi e quello � coli....e la rogna,....
buttateli dalla finestra....
Tom22 ha scritto:


Quello � cosi e quello � coli....ti azzecano tutte le persone
ignoranti..
addosoo.in
 nessun posto dell'universo  si vedono queste cose...
giocare con un dottore...in nessun posto dell'universo...
Tom22 ha scritto:


mi manca solo greco, latino...


Tom22 ha scritto:
