IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

ASP.NET Discussion :

Submit plusieurs formulaires à la fois


Sujet :

ASP.NET

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Inscrit en
    Avril 2006
    Messages
    45
    Détails du profil
    Informations forums :
    Inscription : Avril 2006
    Messages : 45
    Par défaut Submit plusieurs formulaires à la fois
    Salut tout le monde,

    je code une page ASP, dans laquelle j'ai :

    Une boucle, qui iter sur chaque enregistrement ds la BD, et à chaque iteration je crée un form pour chaque enregistrement. donc dans ma page j'aurai autant de formulaire (= nbr d'enregisrtement)

    et pour chaque form, j'ai un bouton submit "qui met à jour les enregistrement" grace à une fct().

    Mon Probleme,
    c'est que si j'ai 100000 enregistrement, et que je modifie quelques (20taine enregistrement ) je dois cliquer 20 fois sur le button "UpDate" de chaque enregistrement que j'ai modifié.


    Donc,
    Pourriez vous me dire si c'est possible de mettre un bouton en exterieur de ma boucle, par exp "Sauvgarder Tout" qui met à jour toute mes enregistrements.

    voici mon code :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    
    <!--#include file="Connections/vip.asp" -->
    <!--#include file="Connections/dates.asp" -->
    <%
    Dim ISview__MMColParam
    ISview__MMColParam = "%"
    If (Request.Querystring("Reg") <> "") Then 
      ISview__MMColParam = Request.Querystring("Reg")
    End If
    %>
    <%
    Dim ISview__MMColParam2
    ISview__MMColParam2 = "%"
    If (Request.Querystring("Moda")   <> "") Then 
      ISview__MMColParam2 = Request.Querystring("Moda")  
    End If
    %>
    <%
    Dim ISview__MMColParam3
    ISview__MMColParam3 = "%"
    If (Request.Querystring("IS")   <> "") Then 
      ISview__MMColParam3 = Request.Querystring("IS")  
    End If
    %>
    <%
    Dim ISview__MMColParam4
    ISview__MMColParam4 = "%"
    If (Request.Querystring("LCT")   <> "") Then 
      ISview__MMColParam4 = Request.Querystring("LCT")  
    End If
    %>
    <%
    Dim ISview__MMColParam5
    ISview__MMColParam5 = "%"
    If (Request.Querystring("SO")   <> "") Then 
      ISview__MMColParam5 = Request.Querystring("SO")  
    End If
    %>
    <%
    Dim ISview
    Dim ISview_numRows
    
    Set ISview = Server.CreateObject("ADODB.Recordset")
    ISview.ActiveConnection = MM_vip_STRING
    ISview.Source = "SELECT *  FROM AffichageIS  WHERE Region = '" + Replace(ISview__MMColParam, "'", "''") + "' and [IS Name clean] like '" + Replace(ISview__MMColParam3, "'", "''") + "' and Modality like  '" + Replace(ISview__MMColParam2, "'", "''") + "' and [Sales Area] like '" + Replace(ISview__MMColParam4, "'", "''") + "' and SO like'" + Replace(ISview__MMColParam5, "'", "''") + "'  ORDER BY ROSD ASC"
    ISview.CursorType = 0
    ISview.CursorLocation = 2
    ISview.LockType = 1
    ISview.Open()
    
    ISview_numRows = 0
    %>
    <%
    Dim Installspe
    Dim Installspe_numRows
    
    Set Installspe = Server.CreateObject("ADODB.Recordset")
    Installspe.ActiveConnection = MM_vip_STRING
    Installspe.Source = "SELECT [IS Name clean]  FROM AffichageIS  WHERE Region = '" + Replace(ISview__MMColParam, "'", "''") + "'  group by [IS Name clean]  ORDER BY [IS Name clean] ASC"
    Installspe.CursorType = 0
    Installspe.CursorLocation = 2
    Installspe.LockType = 1
    Installspe.Open()
    
    Installspe_numRows = 0
    %>
    <%
    Dim moda__MMColParam
    moda__MMColParam = "1"
    If (Request.QueryString("Reg") <> "") Then 
      moda__MMColParam = Request.QueryString("Reg")
    End If
    %>
    <%
    Dim LCT__MMColParam
    LCT__MMColParam = "1"
    If (Request.QueryString("Reg") <> "") Then 
      LCT__MMColParam = Request.QueryString("Reg")
    End If
    %>
    <%
    Dim LCT
    Dim LCT_numRows
    
    Set LCT = Server.CreateObject("ADODB.Recordset")
    LCT.ActiveConnection = MM_vip_STRING
    LCT.Source = "SELECT distinct [Sales Area]  FROM AffichageIS  WHERE Region = '" + Replace(LCT__MMColParam, "'", "''") + "'  ORDER BY [Sales Area] ASC"
    LCT.CursorType = 0
    LCT.CursorLocation = 2
    LCT.LockType = 1
    LCT.Open()
    
    LCT_numRows = 0
    %>
    <%
    Dim moda
    Dim moda_numRows
    
    Set moda = Server.CreateObject("ADODB.Recordset")
    moda.ActiveConnection = MM_vip_STRING
    moda.Source = "SELECT distinct Modality  FROM AffichageIS  WHERE Region = '" + Replace(moda__MMColParam, "'", "''") + "'  ORDER BY Modality ASC"
    moda.CursorType = 0
    moda.CursorLocation = 2
    moda.LockType = 1
    moda.Open()
    
    moda_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index
    
    Repeat1__numRows = -1
    Repeat1__index = 0
    ISview_numRows = ISview_numRows + Repeat1__numRows
    %>
    <%
    ' *** Edit Operations: declare variables
    
    Dim MM_editAction
    Dim MM_abortEdit
    Dim MM_editQuery
    Dim MM_editCmd
    
    Dim MM_editConnection
    Dim MM_editTable
    Dim MM_editRedirectUrl
    Dim MM_editColumn
    Dim MM_recordId
    
    Dim MM_fieldsStr
    Dim MM_columnsStr
    Dim MM_fields
    Dim MM_columns
    Dim MM_typeArray
    Dim MM_formVal
    Dim MM_delim
    Dim MM_altVal
    Dim MM_emptyVal
    Dim MM_i
    
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
      MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
    End If
    
    ' boolean to abort record edit
    MM_abortEdit = false
    
    ' query string to execute
    MM_editQuery = ""
    %>
    <%
    ' *** Insert Record: set variables
    
    If (CStr(Request("MM_insert")) = "InsertISinfo") Then
    
      MM_editConnection = MM_vip_STRING
      MM_editTable = "CommentsIS"
      MM_editRedirectUrl = "ISview.asp"
      MM_fieldsStr  = "City|value|textarea2|value|Newinstall|value|Probatory|value|Sitevisited|value|Site ready|value|Broadband|value|Deinstallation|value|Deinstalled|value|so|value|Eset|value"
      MM_columnsStr = "City|',none,''|[Application start date]|',none,''|[New installation or renewal]|',none,''|[Probatory period]|',none,''|[Site visited]|',none,''|[Site ready]|',none,''|Broadband|',none,''|[Desinstallation required]|',none,''|[Deinstalled system]|',none,''|SO|none,none,NULL|Eset|none,none,NULL"
    
      ' create the MM_fields and MM_columns arrays
      MM_fields = Split(MM_fieldsStr, "|")
      MM_columns = Split(MM_columnsStr, "|")
      
      ' set the form values
      For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
        MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
      Next
    
      ' append the query string to the redirect URL
      If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
        If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
          MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
        Else
          MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
        End If
      End If
    
    End If
    %>
    <%
    ' *** Insert Record: construct a sql insert statement and execute it
    
    Dim MM_tableValues
    Dim MM_dbValues
    
    If (CStr(Request("MM_insert")) <> "") Then
    
      ' create the sql insert statement
      MM_tableValues = ""
      MM_dbValues = ""
      For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
        MM_formVal = MM_fields(MM_i+1)
        MM_typeArray = Split(MM_columns(MM_i+1),",")
        MM_delim = MM_typeArray(0)
        If (MM_delim = "none") Then MM_delim = ""
        MM_altVal = MM_typeArray(1)
        If (MM_altVal = "none") Then MM_altVal = ""
        MM_emptyVal = MM_typeArray(2)
        If (MM_emptyVal = "none") Then MM_emptyVal = ""
        If (MM_formVal = "") Then
          MM_formVal = MM_emptyVal
        Else
          If (MM_altVal <> "") Then
            MM_formVal = MM_altVal
          ElseIf (MM_delim = "'") Then  ' escape quotes
            MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
          Else
            MM_formVal = MM_delim + MM_formVal + MM_delim
          End If
        End If
        If (MM_i <> LBound(MM_fields)) Then
          MM_tableValues = MM_tableValues & ","
          MM_dbValues = MM_dbValues & ","
        End If
        MM_tableValues = MM_tableValues & MM_columns(MM_i)
        MM_dbValues = MM_dbValues & MM_formVal
      Next
      MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"
    
      If (Not MM_abortEdit) Then
        ' execute the insert
        Set MM_editCmd = Server.CreateObject("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_editConnection
        MM_editCmd.CommandText = MM_editQuery
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
    
        If (MM_editRedirectUrl <> "") Then
          Response.Redirect(MM_editRedirectUrl)
        End If
      End If
    
    End If
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    								
    <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>					
    function DoDateTime(str, nNamedFormat, nLCID)				
    	dim strRet								
    	dim nOldLCID								
    										
    	strRet = str								
    	If (nLCID > -1) Then							
    		oldLCID = Session.LCID						
    	End If									
    										
    	On Error Resume Next							
    										
    	If (nLCID > -1) Then							
    		Session.LCID = nLCID						
    	End If									
    										
    	If ((nLCID < 0) Or (Session.LCID = nLCID)) Then				
    		strRet = FormatDateTime(str, nNamedFormat)			
    	End If									
    										
    	If (nLCID > -1) Then							
    		Session.LCID = oldLCID						
    	End If									
    										
    	DoDateTime = strRet							
    End Function									
    </SCRIPT>									
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>IS view</title>
    <style type="text/css">
    <!--
    .Style6 {
    	font-size: xx-large;
    	font-family: "GE Inspira", "GE Inspira Pitch", "GE Inspira Small Caps";
    	font-weight: bold;
    	color: #CC0000;
    }
    .Style7 {
    	font-family: "GE Inspira", "GE Inspira Pitch", "GE Inspira Small Caps";
    	font-weight: bold;
    	color: #333333;
    	font-size: 16px;
    }
    .Style10 {
    	font-family: "GE Inspira", "GE Inspira Pitch", "GE Inspira Small Caps";
    	font-weight: bold;
    	font-size: 16px;
    }
    .Style14 {
    	font-size: x-large;
    	color: #000000;
    }
    .Style16 {font-family: "GE Inspira", "GE Inspira Pitch", "GE Inspira Small Caps"; font-weight: bold;}
    .Style20 {font-size: x-small; font-family: "GE Inspira", "GE Inspira Pitch", "GE Inspira Small Caps"; color: #CC0033; }
    .Style21 {font-size: x-small}
    .Style23 {font-size: x-small; font-family: "GE Inspira", "GE Inspira Pitch", "GE Inspira Small Caps"; }
    .Style26 {color: #3399FF}
    -->
    </style>
    <script type="text/javascript">
    <!--
    function MM_jumpMenu(targ,selObj,restore){ //v3.0
      eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
      if (restore) selObj.selectedIndex=0;
    }
    //-->
    </script>
    </head>
    
    <body>
    <p align="center" class="Style6 Style26">Installation Specialists  view- <%= Request.QueryString("reg") %></p>
    
    <form action="ISview.asp" method="get" name="is" class="Style7" id="is">
    
     <label> IS:
    <select name="IS" id="IS">
    		      <option value="%">All</option>
                <%
    While (NOT Installspe.EOF)
    %>
                <option value="<%=(Installspe.Fields.Item("IS Name clean").Value)%>"><%=(Installspe.Fields.Item("IS Name clean").Value)%></option>
                <%
      Installspe.MoveNext()
    Wend
    If (Installspe.CursorType > 0) Then
      Installspe.MoveFirst
    Else
      Installspe.Requery
    End If
    %>
      </select>
              Modality:
              <select name="Moda" id="Moda">
                <option value="%">All</option>
                <%
    While (NOT moda.EOF)
    %>
                <option value="<%=(moda.Fields.Item("Modality").Value)%>"><%=(moda.Fields.Item("Modality").Value)%></option>
                <%
      moda.MoveNext()
    Wend
    If (moda.CursorType > 0) Then
      moda.MoveFirst
    Else
      moda.Requery
    End If
    %>
      </select>
              LCT : 
              <select name="lct" id="lct">
                <option value="%">All</option>
                <%
    While (NOT LCT.EOF)
    %>
                <option value="<%=(LCT.Fields.Item("Sales Area").Value)%>"><%=(LCT.Fields.Item("Sales Area").Value)%></option>
                <%
      LCT.MoveNext()
    Wend
    If (LCT.CursorType > 0) Then
      LCT.MoveFirst
    Else
      LCT.Requery
    End If
    %>
      </select>
              <input type="submit" name="Submit2" value="Choose" />
    </label>
     <input name="reg" type="hidden" id="reg" value="<%= Request.QueryString("reg") %>" />
    </form>
    <p><a href="index.asp" class="Style7">Back</a> <a href="ISviewXLS.asp?reg=<%= Request.QueryString("reg") %>&amp;is=<%= Request.QueryString("is") %>&amp;Moda=<%= Request.QueryString("Moda") %>&amp;LCT=<%= Request.QueryString("LCT") %>" class="Style16">Download filters selection </a> <span class="Style10 Style14"><a href="ISviewXLSglobal.asp?reg=<%= Request.QueryString("reg") %>">Download <span class="Style16"><%= Request.QueryString("reg") %></span></a><span class="Style16"></span></span></p>
    <table width="100%" border="2">
      <tr bgcolor="#66CCFF">
        <td width="2%"><div align="center" class="Style20">IS name</div></td>
        <td width="1%"><div align="center" class="Style20">LCT</div></td>
        <td width="3%"><div align="center" class="Style20">Modality</div></td>
        <td width="3%"><div align="center" class="Style20">PSI description</div></td>
        <td width="1%"><div align="center" class="Style20">SO</div></td>
        <td width="1%"><div align="center" class="Style20">E-set</div></td>
        <td width="1%"><div align="center" class="Style20">F-set</div></td>
        <td width="2%"><div align="center" class="Style20">Eset status</div></td>
        <td width="4%"><div align="center" class="Style20">Customer ship to Name</div></td>
        <td width="2%"><div align="center" class="Style20">PjM</div></td>
        <td width="3%"><div align="center" class="Style20">Credit approval</div></td>
        <td width="3%"><div align="center" class="Style20">NEOV</div></td>
        <td width="3%"><div align="center" class="Style20">NEVTT</div></td>
        <td width="3%"><div align="center" class="Style20">CRD</div></td>
        <td width="3%"><div align="center" class="Style20">CAD</div></td>
        <td width="3%"><div align="center" class="Style20">ROSD</div></td>
        <td width="3%"><div align="center" class="Style20">SOSD</div></td>
        <td width="3%"><div align="center" class="Style20">RISD</div></td>
        <td width="3%"><div align="center" class="Style20">Apps start date</div></td>
        <td width="3%"><div align="center" class="Style20">CTD2</div></td>
        <td width="7%"><div align="center" class="Style20">Acceptance comments</div></td>
        <td width="6%"><div align="center" class="Style20">Customer ship to address</div></td>
        <td width="6%"><div align="center" class="Style20">New installation or renewal</div></td>
        <td width="6%"><div align="center" class="Style20">IS comments</div></td>
        <td width="2%"><div align="center" class="Style20">Site Visited</div></td>
        <td width="2%"><div align="center" class="Style20">Site Ready</div></td>
        <td width="6%"><div align="center" class="Style20">Broadband</div></td>
        <td width="5%"><div align="center" class="Style20">Deinstallation required</div></td>
        <td width="6%"><div align="center" class="Style20">Deinstalled system</div></td>
        <td width="2%"><div align="center" class="Style20">FE planned </div></td>
        <td width="5%"><div align="center" class="Style20">Last update</div></td>
        <td width="5%"><div align="center" class="Style20">Submit info</div></td>
      </tr>
      <% 
    While ((Repeat1__numRows <> 0) AND (NOT ISview.EOF)) 
    %>
        <tr valign="top" class="Style23" align="center">
    	      <form action="<%=MM_editAction%>" method="POST" name="InsertISinfo" id="InsertISinfo">
          <td ><%=(ISview.Fields.Item("IS Name clean").Value)%>&nbsp;</td>
          <td><%=(ISview.Fields.Item("Sales Area").Value)%>  </td>
          <td><%=(ISview.Fields.Item("Modality").Value)%>&nbsp;</td>
          <td><%=(ISview.Fields.Item("PSI Description").Value)%>&nbsp;</td>
      	  <td><%=(ISview.Fields.Item("SO").Value)%>&nbsp;</td>
          <td><%=(ISview.Fields.Item("E-Set").Value)%>&nbsp;</td>
          <td><%=(ISview.Fields.Item("F-Set").Value)%>&nbsp;</td>
          <td><%=(ISview.Fields.Item("ESet Status").Value)%>&nbsp;</td>
          <td><%=(ISview.Fields.Item("Customer Ship To Name").Value)%>&nbsp;</td>
          <td><%=(ISview.Fields.Item("PMC (Project Manager)").Value)%></td>
          <td><%=(ISview.Fields.Item("Credit Approval Code").Value)%>&nbsp;</td>
          <td><%= FormatNumber((ISview.Fields.Item("NEOV").Value), -1, -2, -2, -1) %>&nbsp;</td>
          <td><%= FormatNumber((ISview.Fields.Item("NEVTT").Value), -1, -2, -2, -1) %>&nbsp;</td>
          <td><%= format_date(ISview.Fields.Item("CRD").Value)%>&nbsp;</td>
          <td><%= format_date(ISview.Fields.Item("CAD").Value)%>&nbsp;</td>
          <td><%= format_date(ISview.Fields.Item("ROSD").Value)%>&nbsp;</td>
          <td><%= format_date(ISview.Fields.Item("SOSD").Value)%>&nbsp;</td>
          <td><%= format_date(ISview.Fields.Item("RISD").Value)%>&nbsp;</td>
          <td><input name="textarea2" type="text" class="Style23" value="<%= (ISview.Fields.Item("Application start date").Value) %>" /></td>
          <td><%= format_date(ISview.Fields.Item("CTD2").Value)%>&nbsp;</td>
          <td nowrap="nowrap"><textarea name="textarea"  class="Style23" ><%=(ISview.Fields.Item("Acceptance Comments").Value)%></textarea></td>
          <td><label>
            <textarea name="textarea3" class="Style23" ><%=(ISview.Fields.Item("Customer ship to address").Value)%></textarea>
          </label></td>
          <td><select name="Newinstall" class="Style23" id="Newinstall">
                  <option value="New installation" <%If (Not isNull((ISview.Fields.Item("New installation or renewal").Value))) Then If ("New installation" = CStr((ISview.Fields.Item("New installation or renewal").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>>New installation</option>
                  <option value="Renewal" <%If (Not isNull((ISview.Fields.Item("New installation or renewal").Value))) Then If ("Renewal" = CStr((ISview.Fields.Item("New installation or renewal").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>>Renewal</option></select></td>
          <td><textarea name="Probatory" cols="20" rows="2" class="Style23" id="Probatory"><%=(ISview.Fields.Item("Probatory period").Value)%></textarea></td>
          <td><select name="Sitevisited" class="Style23" id="Sitevisited">
                  <option value="no" <%If (Not isNull((ISview.Fields.Item("Site visited").Value))) Then If ("no" = CStr((ISview.Fields.Item("Site visited").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>>no</option>
                  <option value="yes" <%If (Not isNull((ISview.Fields.Item("Site visited").Value))) Then If ("yes" = CStr((ISview.Fields.Item("Site visited").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>>yes</option>
                </select>           </td>
    		   <td>
    		   <select name="Site ready" class="Style23" id="Site ready">
                <option value="no" <%If (Not isNull((ISview.Fields.Item("Site ready").Value))) Then If ("no" = CStr((ISview.Fields.Item("Site ready").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>>no</option>
                <option value="yes" <%If (Not isNull((ISview.Fields.Item("Site ready").Value))) Then If ("yes" = CStr((ISview.Fields.Item("Site ready").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>>yes</option>
                <option value=""  <%If (Not isNull((ISview.Fields.Item("Site ready").Value))) Then If ("" = CStr((ISview.Fields.Item("Site ready").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>></option>
              </select>        </td>
          <td><textarea name="Broadband" cols="20" rows="2" class="Style23" id="Broadband"><%=(ISview.Fields.Item("Broadband").Value)%></textarea>     </td>
          <td>
            <select name="Deinstallation" class="Style23" id="Deinstallation">
              <option value="no" <%If (Not isNull((ISview.Fields.Item("Desinstallation required").Value))) Then If ("no" = CStr((ISview.Fields.Item("Desinstallation required").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>>no</option>
              <option value="yes" <%If (Not isNull((ISview.Fields.Item("Desinstallation required").Value))) Then If ("yes" = CStr((ISview.Fields.Item("Desinstallation required").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>>yes</option>
            </select>   </td>
          <td>
            <textarea name="Deinstalled" cols="20" rows="2" class="Style23" id="Deinstalled"><%=(ISview.Fields.Item("Deinstalled system").Value)%></textarea>      </td>
          <td <%if (ISview.Fields.Item("FE").Value) ="no" then %> 
    		bgcolor="#FF0000" 
    		<%elseif (ISview.Fields.Item("FE").Value) ="yes" then%> 
    		bgcolor="#00FF00"
    		<%end if%>>
    	  <a href="FE_names.asp?SO=<%=(ISview.Fields.Item("SO").Value)%>"><%=(ISview.Fields.Item("FE").Value)%></a>&nbsp;</td>
          <td bgcolor="#ECE9D8"><%=format_date(ISview.Fields.Item("Moment").Value)%>&nbsp;</td>
          <td>
            <input name="so" type="hidden" id="so" value="<%=(ISview.Fields.Item("SO").Value)%>" />
            <input name="Eset" type="hidden" id="Eset" value="<%=(ISview.Fields.Item("E-Set").Value)%>" />
            &nbsp;
              <input name="Submit" type="submit" value="Update" />      
              <input type="hidden" name="MM_insert" value="InsertISinfo" />          </td>
          </form>    </tr>
        <% 
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      ISview.MoveNext()
    Wend
    %>
    </table>
    
    </body>
    </html>
    <%
    ISview.Close()
    Set ISview = Nothing
    %>
    <%
    Installspe.Close()
    Set Installspe = Nothing
    %>
    <%
    moda.Close()
    Set moda = Nothing
    %>
    <%
    LCT.Close()
    Set LCT = Nothing
    %>

  2. #2
    Membre confirmé
    Profil pro
    UN
    Inscrit en
    Février 2007
    Messages
    92
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : Allemagne

    Informations professionnelles :
    Activité : UN
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Février 2007
    Messages : 92
    Par défaut
    Si vous travailler en mode déconnecté, la mise a jour de +ieurs enregistrement dans la base de données est effectuer par un seul click permettant de modifier la base de données par la copie memoire de la nouvelle version de la base de données (le dataset)!
    si les registrements sont de la meme table("client" par exp), il vous sera facile de les mettre a jour en mettant a jour le datatable de la table ("client") sur un simple click!

    pourquoi?
    Parce que chaque enregistrement, est, lors de sa modification, est modifier dans son 'datarow', ou ajouter a la collection dataRow de la table, dans ce cas, la table "client"; ou bien bien sur supprimé de cette derniere, si la mise ajour est une suppression!

    si vous n'avez pas une idée sur le code de ce bla bla, vous n'auriez qu'a me faire signe!

    Cordialement

    Alabama song

  3. #3
    Membre expérimenté
    Profil pro
    Inscrit en
    Août 2004
    Messages
    270
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Août 2004
    Messages : 270
    Par défaut
    euh... c'est peut être pas mon rôle mais on est dans la section asp.net ici et pas asp....

    Tu aurais surement plus de conseils dans la rubrique appropriée...

  4. #4
    Membre averti
    Inscrit en
    Avril 2006
    Messages
    45
    Détails du profil
    Informations forums :
    Inscription : Avril 2006
    Messages : 45
    Par défaut


    salut Alabama-song,

    oui, je vois votre astuce. mais je ne le vois pas comment la faire en code.

    Merci d'avance.

Discussions similaires

  1. Ouvrir plusieurs états CR11 à la fois sur un meme formulaire
    Par GodGives dans le forum VB 6 et antérieur
    Réponses: 0
    Dernier message: 13/05/2009, 14h26
  2. Réponses: 3
    Dernier message: 02/07/2008, 19h08
  3. Formulaire qui se submit plusieurs fois
    Par otterley dans le forum Struts 1
    Réponses: 12
    Dernier message: 08/02/2008, 16h49
  4. Plusieurs submit dans formulaire
    Par mattyeux dans le forum ASP
    Réponses: 5
    Dernier message: 26/09/2007, 16h00
  5. Un submit pour plusieurs formulaires
    Par beufa dans le forum Général JavaScript
    Réponses: 3
    Dernier message: 29/11/2005, 15h51

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo