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 :

affichage de l'enregistrement inserer en asp.net(c#)


Sujet :

ASP.NET

  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    132
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 132
    Par défaut affichage de l'enregistrement inserer en asp.net(c#)
    bjr,

    j'ai deux formulaire, un affichage d'appel et l'autre insertion de nouvel appel.
    lorsque j'inserer un nouvel appel j'aimerai le voir afficher par la suite dans mon formulaire appel. comment faire.
    merci

  2. #2
    Membre Expert
    Avatar de Mehdi Feki
    Profil pro
    Inscrit en
    Décembre 2004
    Messages
    1 113
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France

    Informations forums :
    Inscription : Décembre 2004
    Messages : 1 113
    Par défaut
    T'es en quel version du framework ?

    Les formulaires en question sont de quels types (GridView ? , FormView ? ) ?

  3. #3
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    132
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 132
    Par défaut framework2
    l'affichage des appels c dans une gridview et l'insertion dans une formview





    Citation Envoyé par mehdi_tn
    T'es en quel version du framework ?

    Les formulaires en question sont de quels types (GridView ? , FormView ? ) ?

  4. #4
    Membre Expert
    Avatar de Mehdi Feki
    Profil pro
    Inscrit en
    Décembre 2004
    Messages
    1 113
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France

    Informations forums :
    Inscription : Décembre 2004
    Messages : 1 113
    Par défaut
    Normalement après l'événement inserted tu fais un simple databind sur ton GridView. Elle a un truc en particulier la nouvelle ligne insérée dans le GridView?

  5. #5
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    132
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 132
    Par défaut je ne comprend pas bien
    je ne vois pas bien. peux tu expliquer un peu.
    j'ecris où?



    Citation Envoyé par mehdi_tn
    Normalement après l'événement inserted tu fais un simple databind sur ton GridView. Elle a un truc en particulier la nouvelle ligne insérée dans le GridView?

  6. #6
    Membre Expert
    Avatar de Mehdi Feki
    Profil pro
    Inscrit en
    Décembre 2004
    Messages
    1 113
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France

    Informations forums :
    Inscription : Décembre 2004
    Messages : 1 113
    Par défaut
    Citation Envoyé par hermine
    je ne vois pas bien. peux tu expliquer un peu.
    j'ecris où?
    Dans l'événement ItemInserted de ton FormView. Fais :

    Code C# : Sélectionner tout - Visualiser dans une fenêtre à part
    GridView1.DataBind()

  7. #7
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    132
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 132
    Par défaut même si séparé
    ma gridview et mon formview ne sont pas sur la même page.


    Citation Envoyé par mehdi_tn
    Dans l'événement ItemInserted de ton FormView. Fais :

    Code C# : Sélectionner tout - Visualiser dans une fenêtre à part
    GridView1.DataBind()

  8. #8
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    132
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 132
    Par défaut j'ai une erreur
    j'ai une erreur,
    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
    Erreur du serveur dans l'application '/VueSTC'.
    --------------------------------------------------------------------------------
     
    Erreur de compilation 
    Description : Une erreur s'est produite lors de la compilation d'une ressource requise pour répondre à cette demande. Veuillez consulter ci-dessous les détails relatifs à l'erreur en question, puis modifier votre code source de manière appropriée. 
     
    Message d'erreur du compilateur: CS0103: Le nom 'GridView1' n'existe pas dans le contexte actuel
     
    Erreur source:
     
     
     
    Ligne 23 :     protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
    Ligne 24 :     {
    Ligne 25 :         GridView1.DataBind();
    Ligne 26 :     }
    Ligne 27 : }
     
     
    Fichier source: c:\dev\APPLIWeb\VueSTC\Appels\NouvelAppel.aspx.cs    Ligne: 25







    Citation Envoyé par hermine
    ma gridview et mon formview ne sont pas sur la même page.

  9. #9
    Membre Expert
    Avatar de Mehdi Feki
    Profil pro
    Inscrit en
    Décembre 2004
    Messages
    1 113
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France

    Informations forums :
    Inscription : Décembre 2004
    Messages : 1 113
    Par défaut
    Citation Envoyé par hermine
    ma gridview et mon formview ne sont pas sur la même page.
    Ooops tu as raison. Mais j'ai besoin de plus de précision

    Donc Page1.aspx contient le FormView
    Page2.aspx contient le GridView.

    Tu insére un enregistrement dans le FormView et tu veux qu'il soit affiché dans le GridView ?

    Ca doit se faire automatiquement normalement. Elle est où l'anomalie ?

  10. #10
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    132
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 132
    Par défaut ça ne s'affiche pas
    ça ne s'affiche pas!!!









    Citation Envoyé par mehdi_tn
    Ooops tu as raison. Mais j'ai besoin de plus de précision

    Donc Page1.aspx contient le FormView
    Page2.aspx contient le GridView.

    Tu insére un enregistrement dans le FormView et tu veux qu'il soit affiché dans le GridView ?

    Ca doit se faire automatiquement normalement. Elle est où l'anomalie ?

  11. #11
    Membre Expert
    Avatar de Mehdi Feki
    Profil pro
    Inscrit en
    Décembre 2004
    Messages
    1 113
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France

    Informations forums :
    Inscription : Décembre 2004
    Messages : 1 113
    Par défaut
    Hermine, il faut faire un peu d'efforts si tu veux de l'aide.

    Un peu de code .... Un peu plus de détails.

    Quand tu réponds ca ne s'affiche pas, ça m'aide pas vraiment.

  12. #12
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    132
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 132
    Par défaut desolée
    ce que je voulais dire est que l'insertion s'effectue bien mais lorsque je vais sur ma page qui contient ma gridview,l'enregistrement effectuée n'y est pas. alors que sur le requeteur et dans ma table elle y est.




    Citation Envoyé par mehdi_tn
    Hermine, il faut faire un peu d'efforts si tu veux de l'aide.

    Un peu de code .... Un peu plus de détails.

    Quand tu réponds ca ne s'affiche pas, ça m'aide pas vraiment.

  13. #13
    Membre Expert
    Avatar de Mehdi Feki
    Profil pro
    Inscrit en
    Décembre 2004
    Messages
    1 113
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France

    Informations forums :
    Inscription : Décembre 2004
    Messages : 1 113
    Par défaut
    Montre nous ton code apsx et cs de ta page qui affiche le grid view

  14. #14
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    132
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 132
    Par défaut formview et gridview
    bjr,
    je n'arrive pas tjrs à rafraichir ma gridview.

    voici le code de mon gridview
    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
     <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" CellPadding="2" DataKeyNames="A_NUMEROAPPEL" DataSourceID="ObjectDataSource2"
            ForeColor="#333333" Style="z-index: 100; left: 200px; position: absolute; top: 232px; border-top-style: solid; border-right-style: solid; border-left-style: solid; border-bottom-style: solid;" OnSelectedIndexChanged="Page_Load" CellSpacing="2">
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <Columns>
                <asp:BoundField DataField="A_ETAT" HeaderText="Etat" SortExpression="A_ETAT" />
                <asp:BoundField DataField="A_NUMEROAPPEL" HeaderText="Numero appel" ReadOnly="True"
                    SortExpression="A_NUMEROAPPEL" />
                <asp:BoundField DataField="A_SOCIETECODE" HeaderText="Code societé" SortExpression="A_SOCIETECODE"
                    Visible="False" />
                <asp:BoundField DataField="A_SOCIETELIB" HeaderText="Societé" SortExpression="A_SOCIETELIB" />
                <asp:BoundField DataField="A_URGENCE" HeaderText="Urgence" SortExpression="A_URGENCE" />
                <asp:BoundField DataField="A_PRIORITE" HeaderText="Priorité" SortExpression="A_PRIORITE" />
                <asp:BoundField DataField="A_IMPACT" HeaderText="Impact" SortExpression="A_IMPACT" />
                <asp:BoundField DataField="A_CREATEUR" HeaderText="Créateur" SortExpression="A_CREATEUR" />
                <asp:BoundField DataField="A_DATECREATION" HeaderText="Date création" SortExpression="A_DATECREATION" />
                <asp:BoundField DataField="A_VECTEURAPPEL" HeaderText="Provenance" SortExpression="A_VECTEURAPPEL" />
                <asp:BoundField DataField="A_PRODUITCODE" HeaderText="Code produit" SortExpression="A_PRODUITCODE" />
                <asp:BoundField DataField="A_PRODUITLIB" HeaderText="Produit" SortExpression="A_PRODUITLIB" />
                <asp:BoundField DataField="LIB_VERSION" HeaderText="Version" SortExpression="LIB_VERSION" Visible="False" />
                <asp:BoundField DataField="A_VERSION" HeaderText="Version" SortExpression="A_VERSION" />
                <asp:BoundField DataField="A_EVALUATION" HeaderText="Evaluation" SortExpression="A_EVALUATION" />
                <asp:BoundField DataField="AFF_AFFAIRE2" HeaderText="Contrat" SortExpression="AFF_AFFAIRE2" Visible="False" />
                <asp:BoundField DataField="A_CONTRATCODE" HeaderText="Contrat" SortExpression="A_CONTRATCODE" />
                <asp:BoundField DataField="A_PARTENAIRE" HeaderText="Partenaire" SortExpression="A_PARTENAIRE" />
                <asp:BoundField DataField="A_INTERLCODE" HeaderText="A_INTERLCODE" SortExpression="A_INTERLCODE"
                    Visible="False" />
                <asp:BoundField DataField="A_INTERLLIB" HeaderText="Interlocuteur" SortExpression="A_INTERLLIB" />
                <asp:BoundField DataField="A_INTERLTEL" HeaderText="Tel" SortExpression="A_INTERLTEL" />
                <asp:BoundField DataField="A_INTERLMAIL" HeaderText="Mail" SortExpression="A_INTERLMAIL" />
                <asp:BoundField DataField="A_DESCRIPTION" HeaderText="Description" SortExpression="A_DESCRIPTION" />
                <asp:BoundField DataField="LIB_PRODUIT" HeaderText="LIB_PRODUIT" SortExpression="LIB_PRODUIT"
                    Visible="False" />
                <asp:HyperLinkField DataNavigateUrlFields="A_NUMEROAPPEL" DataNavigateUrlFormatString="DetailsAPPEL.aspx?ID={0}"
                    HeaderText="Détails" Text="Détails" />
            </Columns>
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
     
        <%--connection à la source de donnée et appel de la methode get du dataset--%>
     
        <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" OldValuesParameterFormatString="original_{0}"
            SelectMethod="GetAPPELS" TypeName="DataAccess.DsAPPELSTableAdapters.SP_GET_APPELSTableAdapter">
        </asp:ObjectDataSource>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SocieteConnectionString %>"
            SelectCommand="SELECT APPELS.A_ETAT, APPELS.A_NUMEROAPPEL, APPELS.A_SOCIETECODE, APPELS.A_SOCIETELIB, APPELS.A_URGENCE, APPELS.A_PRIORITE, APPELS.A_IMPACT, APPELS.A_CREATEUR, APPELS.A_DATECREATION, APPELS.A_VECTEURAPPEL, APPELS.A_MODIFIEPAR, APPELS.A_DATEMODIF, APPELS.A_PRODUITCODE, APPELS.A_PRODUITLIB, APPELS.A_VERSION, APPELS.A_EVALUATION, APPELS.A_CONTRATCODE, APPELS.A_PARTENAIRE, APPELS.A_INTERLCODE, APPELS.A_INTERLLIB, APPELS.A_INTERLTEL, APPELS.A_INTERLMAIL, APPELS.A_DESCRIPTION, V_PRODUIT_VERSION.LIB_PRODUIT, V_PRODUIT_VERSION.LIB_VERSION, CONTRATS_VALIDES.AFF_AFFAIRE2 FROM APPELS CROSS JOIN V_PRODUIT_VERSION CROSS JOIN CONTRATS_VALIDES WHERE (APPELS.A_ETAT = 'Non Lu')">
        </asp:SqlDataSource>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" InsertMethod="Insert"
            OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="DataSet2TableAdapters.APPELSTableAdapter">
            <SelectParameters>
                <asp:ControlParameter ControlID="GridView1" DefaultValue="Non Lu" Name="A_ETAT" PropertyName="SelectedValue"
                    Type="String" />
            </SelectParameters>
     
            <%--insertion des parametres --%>
     
            <InsertParameters>
                <asp:Parameter Name="A_NUMEROAPPEL" Type="Decimal" />
                <asp:Parameter Name="A_ETAT" Type="String" />
                <asp:Parameter Name="A_URGENCE" Type="String" />
                <asp:Parameter Name="A_IMPACT" Type="String" />
                <asp:Parameter Name="A_PRIORITE" Type="String" />
                <asp:Parameter Name="A_CREATEUR" Type="String" />
                <asp:Parameter Name="A_DATECREATION" Type="DateTime" />
                <asp:Parameter Name="A_VECTEURAPPEL" Type="String" />
                <asp:Parameter Name="A_MODIFIEPAR" Type="String" />
                <asp:Parameter Name="A_DATEMODIF" Type="DateTime" />
                <asp:Parameter Name="A_PRODUITCODE" Type="String" />
                <asp:Parameter Name="A_PRODUITLIB" Type="String" />
                <asp:Parameter Name="A_VERSION" Type="String" />
                <asp:Parameter Name="A_EVALUATION" Type="String" />
                <asp:Parameter Name="A_CONTRATCODE" Type="String" />
                <asp:Parameter Name="A_SOCIETECODE" Type="String" />
                <asp:Parameter Name="A_SOCIETELIB" Type="String" />
                <asp:Parameter Name="A_PARTENAIRE" Type="String" />
                <asp:Parameter Name="A_INTERLCODE" Type="String" />
                <asp:Parameter Name="A_INTERLLIB" Type="String" />
                <asp:Parameter Name="A_INTERLTEL" Type="String" />
                <asp:Parameter Name="A_INTERLMAIL" Type="String" />
                <asp:Parameter Name="A_DESCRIPTION" Type="String" />
     
            </InsertParameters>
        </asp:ObjectDataSource>
        <br />
        <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Larger" ForeColor="#C04000"
            Style="z-index: 102; left: 316px; position: absolute; top: 212px" Text="LISTE DES APPELS EN COURS DE TRAITEMENT"
            Width="788px"></asp:Label>
     
     
    </asp:Content>

  15. #15
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    132
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 132
    Par défaut ma formview
    voici le code de ma fromview


    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
    <%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="NouvelAppel.aspx.cs" Inherits="Appels_NouvelAppel1" Title="Untitled Page" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
        <asp:FormView ID="FormView1" runat="server" AllowPaging="True"
                DataSourceID="SqlDataSource1" DefaultMode="Insert" 
                Style="z-index: 16; left: 184px; position: absolute; top: 160px" DataKeyNames="A_NUMEROAPPEL" CellPadding="4" ForeColor="#333333"  >
                <EditItemTemplate>
                    A_NUMEROAPPEL:
                    <asp:Label ID="A_NUMEROAPPELLabel1" runat="server" Text='<%# Eval("A_NUMEROAPPEL") %>'>
                    </asp:Label><br />
                    A_ETAT:
                    <asp:TextBox ID="A_ETATTextBox" runat="server" Text='<%# Bind("A_ETAT") %>'>
                    </asp:TextBox><br />
                    A_URGENCE:
                    <asp:TextBox ID="A_URGENCETextBox" runat="server" Text='<%# Bind("A_URGENCE") %>'>
                    </asp:TextBox><br />
                    A_IMPACT:
                    <asp:TextBox ID="A_IMPACTTextBox" runat="server" Text='<%# Bind("A_IMPACT") %>'>
                    </asp:TextBox><br />
                    A_PRIORITE:
                    <asp:TextBox ID="A_PRIORITETextBox" runat="server" Text='<%# Bind("A_PRIORITE") %>'>
                    </asp:TextBox><br />
                    A_CREATEUR:
                    <asp:TextBox ID="A_CREATEURTextBox" runat="server" Text='<%# Bind("A_CREATEUR") %>'>
                    </asp:TextBox><br />
                    A_DATECREATION:
                    <asp:TextBox ID="A_DATECREATIONTextBox" runat="server" Text='<%# Bind("A_DATECREATION") %>'>
                    </asp:TextBox><br />
                    A_VECTEURAPPEL:
                    <asp:TextBox ID="A_VECTEURAPPELTextBox" runat="server" Text='<%# Bind("A_VECTEURAPPEL") %>'>
                    </asp:TextBox><br />
                    A_PRODUITCODE:
                    <asp:TextBox ID="A_PRODUITCODETextBox" runat="server" Text='<%# Bind("A_PRODUITCODE") %>'>
                    </asp:TextBox><br />
                    A_PRODUITLIB:
                    <asp:TextBox ID="A_PRODUITLIBTextBox" runat="server" Text='<%# Bind("A_PRODUITLIB") %>'>
                    </asp:TextBox><br />
                    A_VERSION:
                    <asp:TextBox ID="A_VERSIONTextBox" runat="server" Text='<%# Bind("A_VERSION") %>'>
                    </asp:TextBox><br />
                    A_EVALUATION:
                    <asp:TextBox ID="A_EVALUATIONTextBox" runat="server" Text='<%# Bind("A_EVALUATION") %>'>
                    </asp:TextBox><br />
                    A_CONTRATCODE:
                    <asp:TextBox ID="A_CONTRATCODETextBox" runat="server" Text='<%# Bind("A_CONTRATCODE") %>'>
                    </asp:TextBox><br />
                    A_SOCIETECODE:
                    <asp:TextBox ID="A_SOCIETECODETextBox" runat="server" Text='<%# Bind("A_SOCIETECODE") %>'>
                    </asp:TextBox><br />
                    A_SOCIETELIB:
                    <asp:TextBox ID="A_SOCIETELIBTextBox" runat="server" Text='<%# Bind("A_SOCIETELIB") %>'>
                    </asp:TextBox><br />
                    A_PARTENAIRE:
                    <asp:TextBox ID="A_PARTENAIRETextBox" runat="server" Text='<%# Bind("A_PARTENAIRE") %>'>
                    </asp:TextBox><br />
                    A_INTERLCODE:
                    <asp:TextBox ID="A_INTERLCODETextBox" runat="server" Text='<%# Bind("A_INTERLCODE") %>'>
                    </asp:TextBox><br />
                    A_INTERLLIB:
                    <asp:TextBox ID="A_INTERLLIBTextBox" runat="server" Text='<%# Bind("A_INTERLLIB") %>'>
                    </asp:TextBox><br />
                    A_INTERLTEL:
                    <asp:TextBox ID="A_INTERLTELTextBox" runat="server" Text='<%# Bind("A_INTERLTEL") %>'>
                    </asp:TextBox><br />
                    A_INTERLMAIL:
                    <asp:TextBox ID="A_INTERLMAILTextBox" runat="server" Text='<%# Bind("A_INTERLMAIL") %>'>
                    </asp:TextBox><br />
                    A_DESCRIPTION:
                    <asp:TextBox ID="A_DESCRIPTIONTextBox" runat="server" Text='<%# Bind("A_DESCRIPTION") %>'>
                    </asp:TextBox><br />
                    <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                        Text="Mettre à jour">
                    </asp:LinkButton>
                    <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                        Text="Annuler">
                    </asp:LinkButton>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:Panel ID="Panel1" runat="server" GroupingText="Societé" Height="1px" Style="position: static;" Width="688px">
                        Code societé:<asp:TextBox ID="A_SOCIETECODETextBox" runat="server" Text='<%# Bind("A_SOCIETECODE") %>' style="position: static"></asp:TextBox>
                        <asp:Button ID="Button1" runat="server" Style="position: static" Text="Rechercher"
                            Width="96px" /><br />
                        <br />
                        Contrat:
                    <asp:TextBox ID="A_CONTRATCODETextBox" runat="server" Text='<%# Bind("A_CONTRATCODE") %>' style="position: static" Width="80px"></asp:TextBox>
                        Libellé societé:
                    <asp:TextBox ID="A_SOCIETELIBTextBox" runat="server" Text='<%# Bind("A_SOCIETELIB") %>' style="position: static" Width="152px"></asp:TextBox>
                        &nbsp; &nbsp;&nbsp; Origine:<asp:DropDownList ID="UrgenceDropDownList" runat="server"
                        AppendDataBoundItems="True" AutoPostBack="True" DataSourceID="SqlDataSource4"
                        DataTextField="A_URGENCE" DataValueField="A_NUMEROAPPEL" OnSelectedIndexChanged="Page_Load"
                        SelectedValue='<%# Bind("A_URGENCE") %>' Style="position: static" Width="88px">
                        <asp:ListItem Selected="True"></asp:ListItem>
                        <asp:ListItem>A</asp:ListItem>
                        <asp:ListItem>B</asp:ListItem>
                        <asp:ListItem>C</asp:ListItem>
                    </asp:DropDownList><br />
                        <br />
                        Code interlocuteur:<asp:TextBox ID="A_INTERLCODETextBox" runat="server" Text='<%# Bind("A_INTERLCODE") %>' style="position: static" Width="96px"></asp:TextBox>&nbsp; &nbsp; &nbsp;&nbsp; Nom interlocuteur:
                    <asp:TextBox ID="A_INTERLLIBTextBox" runat="server" Text='<%# Bind("A_INTERLLIB") %>' style="position: static"></asp:TextBox><br />
                        <br />
                        &nbsp; Tel:
                    <asp:TextBox ID="A_INTERLTELTextBox" runat="server" Text='<%# Bind("A_INTERLTEL") %>' style="position: static"></asp:TextBox>
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        &nbsp; &nbsp; &nbsp; Mail:<asp:TextBox ID="A_INTERLMAILTextBox" runat="server" Text='<%# Bind("A_INTERLMAIL") %>' style="position: static"></asp:TextBox><br />
                        <br />
                        Partenaire:&nbsp;<asp:CheckBox ID="CheckBox1" runat="server" Style="position: static"
                            Text="Oui" Checked='<%# Bind("A_PARTENAIRE") %>' OnCheckedChanged="Page_Load" />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;Mail
                        commercial:&nbsp;
                        <asp:TextBox ID="TextBox1" runat="server" Style="position: static;"></asp:TextBox>&nbsp;<br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
                        &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        &nbsp; &nbsp; &nbsp; &nbsp; 
                        <br />
                    </asp:Panel>
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    Numero :
                    <asp:TextBox ID="A_NUMEROAPPELTextBox" runat="server" Text='<%# Bind("A_NUMEROAPPEL") %>' style="position: static"></asp:TextBox>
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Etat:
                    <asp:TextBox ID="A_ETATTextBox" runat="server" Text='<%# Bind("A_ETAT") %>' style="position: static;" AutoPostBack="True"></asp:TextBox>&nbsp;<br />
                    <br />
                    &nbsp; &nbsp;<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:SocieteConnectionString %>"
                        SelectCommand="SELECT [A_URGENCE] FROM [APPELS] WHERE ([A_URGENCE] = @A_URGENCE)">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="FormView1" Name="A_URGENCE" PropertyName="SelectedValue" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Impact:
                    <asp:DropDownList ID="ImpactDropDownList" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                        OnSelectedIndexChanged="Page_Load" Style="position: static" Width="152px" DataSourceID="SqlDataSource2" DataTextField="A_IMPACT" DataValueField="A_NUMEROAPPEL" SelectedValue='<%# Bind("A_IMPACT") %>'>
                        <asp:ListItem Selected="True"></asp:ListItem>
                        <asp:ListItem>Tout bloqué</asp:ListItem>
                        <asp:ListItem>Serveur bloqué</asp:ListItem>
                        <asp:ListItem>un client bloqué</asp:ListItem>
                        <asp:ListItem>1 console bloquée</asp:ListItem>
                    </asp:DropDownList><br />
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:SocieteConnectionString %>"
                        SelectCommand="SELECT [A_IMPACT] FROM [APPELS] WHERE ([A_IMPACT] = @A_IMPACT)">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="FormView1" Name="A_IMPACT" PropertyName="SelectedValue"
                                Type="String" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                    &nbsp;<br />
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
                    Priorité:
                    <asp:DropDownList ID="PrioriteDropDownList" runat="server" AutoPostBack="True" Style="position: static"
                        Width="152px" DataSourceID="SqlDataSource3" DataTextField="A_PRIORITE" DataValueField="A_NUMEROAPPEL" OnSelectedIndexChanged="Page_Load" SelectedValue='<%# Bind("A_PRIORITE") %>' AppendDataBoundItems="True">
                        <asp:ListItem Selected="True"></asp:ListItem>
                        <asp:ListItem>Bloquant</asp:ListItem>
                        <asp:ListItem>Non bloquant</asp:ListItem>
                        <asp:ListItem>Rien</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
                    Créateur:
                    <asp:TextBox ID="A_CREATEURTextBox" runat="server" Text='<%# Bind("A_CREATEUR") %>' AutoPostBack="True" style="position: static"></asp:TextBox><br />
                    <br />
                    &nbsp; &nbsp; Date de création:
                    <asp:TextBox ID="A_DATECREATIONTextBox" runat="server" Text='<%# Bind("A_DATECREATION") %>' style="position: static" AutoPostBack="True" OnTextChanged="Page_Load"></asp:TextBox>
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Provenance:
                    <asp:DropDownList ID="ProvenanceDropDownList" runat="server" AutoPostBack="True" Style="position: static;" Width="152px" AppendDataBoundItems="True" DataSourceID="SqlDataSource3" DataTextField="A_VECTEURAPPEL" DataValueField="A_NUMEROAPPEL" OnSelectedIndexChanged="Page_Load" SelectedValue='<%# Bind("A_VECTEURAPPEL") %>'>
                        <asp:ListItem></asp:ListItem>
                        <asp:ListItem>Mail</asp:ListItem>
                        <asp:ListItem>Tel</asp:ListItem>
                    </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:SocieteConnectionString %>"
                        SelectCommand="SELECT [A_VECTEURAPPEL] FROM [ APPELS]  WHERE ([A_VECTEURAPPEL] = @A_VECTEURAPPEL)
    ">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="FormView1" Name="A_VECTEURAPPEL" PropertyName="SelectedValue" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                    &nbsp;<br />
                    <br />
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Code produit :
                    <asp:TextBox ID="A_PRODUITCODETextBox" runat="server" Text='<%# Bind("A_PRODUITCODE") %>' style="position: static"></asp:TextBox>
                    &nbsp; &nbsp; &nbsp; &nbsp;Libellé produit:
                    <asp:DropDownList ID="LibelleDropDownList" runat="server" Style="position: static" Width="160px" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="A_PRODUITLIB" DataValueField="A_NUMEROAPPEL" AppendDataBoundItems="True" OnSelectedIndexChanged="Page_Load" SelectedValue='<%# Bind("A_PRODUITLIB") %>'>
                        <asp:ListItem Selected="True"></asp:ListItem>
                        <asp:ListItem>MediaContact</asp:ListItem>
                        <asp:ListItem>MediaTransfer</asp:ListItem>
                    </asp:DropDownList><br />
                    <br />
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SocieteConnectionString %>"
                        SelectCommand="SELECT [A_PRODUITLIB] FROM [APPELS] WHERE ([A_PRODUITLIB]=@A_PRODUITLIB)">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="FormView1" Name="A_PRODUITLIB" PropertyName="SelectedValue" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Version:
                    <asp:TextBox ID="A_VERSIONTextBox" runat="server" Text='<%# Bind("A_VERSION") %>' style="position: static"></asp:TextBox>
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Evaluation:
                    <asp:TextBox ID="A_EVALUATIONTextBox" runat="server" Text='<%# Bind("A_EVALUATION") %>' style="position: static" Width="152px"></asp:TextBox><br />
                    <br />
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Description:<br />
                    <asp:TextBox ID="A_DESCRIPTIONTextBox" runat="server" Text='<%# Bind("A_DESCRIPTION") %>' Height="80px" Width="664px"></asp:TextBox><br />
                    <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                         Text="Insérer" ></asp:LinkButton>
                    <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                        Text="Annuler"></asp:LinkButton>
                </InsertItemTemplate>
                <ItemTemplate>
                    A_NUMEROAPPEL:
                    <asp:Label ID="A_NUMEROAPPELLabel" runat="server" Text='<%# Eval("A_NUMEROAPPEL") %>'></asp:Label><br />
                    A_ETAT:
                    <asp:Label ID="A_ETATLabel" runat="server" Text='<%# Bind("A_ETAT") %>'></asp:Label><br />
                    A_URGENCE:
                    <asp:Label ID="A_URGENCELabel" runat="server" Text='<%# Bind("A_URGENCE") %>'></asp:Label><br />
                    A_IMPACT:
                    <asp:Label ID="A_IMPACTLabel" runat="server" Text='<%# Bind("A_IMPACT") %>'></asp:Label><br />
                    A_PRIORITE:
                    <asp:Label ID="A_PRIORITELabel" runat="server" Text='<%# Bind("A_PRIORITE") %>'></asp:Label><br />
                    A_CREATEUR:
                    <asp:Label ID="A_CREATEURLabel" runat="server" Text='<%# Bind("A_CREATEUR") %>'></asp:Label><br />
                    A_DATECREATION:
                    <asp:Label ID="A_DATECREATIONLabel" runat="server" Text='<%# Bind("A_DATECREATION") %>'></asp:Label><br />
                    A_VECTEURAPPEL:
                    <asp:Label ID="A_VECTEURAPPELLabel" runat="server" Text='<%# Bind("A_VECTEURAPPEL") %>'></asp:Label><br />
                    A_PRODUITCODE:
                    <asp:Label ID="A_PRODUITCODELabel" runat="server" Text='<%# Bind("A_PRODUITCODE") %>'></asp:Label><br />
                    A_PRODUITLIB:
                    <asp:Label ID="A_PRODUITLIBLabel" runat="server" Text='<%# Bind("A_PRODUITLIB") %>'></asp:Label><br />
                    A_VERSION:
                    <asp:Label ID="A_VERSIONLabel" runat="server" Text='<%# Bind("A_VERSION") %>'></asp:Label><br />
                    A_EVALUATION:
                    <asp:Label ID="A_EVALUATIONLabel" runat="server" Text='<%# Bind("A_EVALUATION") %>'></asp:Label><br />
                    A_CONTRATCODE:
                    <asp:Label ID="A_CONTRATCODELabel" runat="server" Text='<%# Bind("A_CONTRATCODE") %>'></asp:Label><br />
                    A_SOCIETECODE:
                    <asp:Label ID="A_SOCIETECODELabel" runat="server" Text='<%# Bind("A_SOCIETECODE") %>'></asp:Label><br />
                    A_SOCIETELIB:
                    <asp:Label ID="A_SOCIETELIBLabel" runat="server" Text='<%# Bind("A_SOCIETELIB") %>'></asp:Label><br />
                    A_PARTENAIRE:
                    <asp:Label ID="A_PARTENAIRELabel" runat="server" Text='<%# Bind("A_PARTENAIRE") %>'></asp:Label><br />
                    A_INTERLCODE:
                    <asp:Label ID="A_INTERLCODELabel" runat="server" Text='<%# Bind("A_INTERLCODE") %>'></asp:Label><br />
                    A_INTERLLIB:
                    <asp:Label ID="A_INTERLLIBLabel" runat="server" Text='<%# Bind("A_INTERLLIB") %>'></asp:Label><br />
                    A_INTERLTEL:
                    <asp:Label ID="A_INTERLTELLabel" runat="server" Text='<%# Bind("A_INTERLTEL") %>'></asp:Label><br />
                    A_INTERLMAIL:
                    <asp:Label ID="A_INTERLMAILLabel" runat="server" Text='<%# Bind("A_INTERLMAIL") %>'></asp:Label><br />
                    A_DESCRIPTION:
                    <asp:Label ID="A_DESCRIPTIONLabel" runat="server" Text='<%# Bind("A_DESCRIPTION") %>'></asp:Label><br />
                </ItemTemplate>
                <HeaderTemplate>
                    <strong><span style="font-size: 14pt">NOUVEL APPEL</span></strong>
                </HeaderTemplate>
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            </asp:FormView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SocieteConnectionString %>"
                SelectCommand="SELECT [A_NUMEROAPPEL], [A_ETAT], [A_URGENCE], [A_IMPACT], [A_PRIORITE], [A_CREATEUR], [A_DATECREATION], [A_VECTEURAPPEL], [A_PRODUITCODE], [A_PRODUITLIB], [A_VERSION], [A_EVALUATION], [A_CONTRATCODE], [A_SOCIETECODE], [A_SOCIETELIB], [A_PARTENAIRE], [A_INTERLCODE], [A_INTERLLIB], [A_INTERLTEL], [A_INTERLMAIL], [A_DESCRIPTION] FROM [APPELS]" InsertCommand="INSERT INTO APPELS(A_NUMEROAPPEL, A_ETAT, A_URGENCE, A_IMPACT, A_PRIORITE, A_CREATEUR, A_DATECREATION, A_VECTEURAPPEL, A_PRODUITCODE, A_PRODUITLIB, A_VERSION, A_EVALUATION, A_CONTRATCODE, A_SOCIETECODE, A_SOCIETELIB, A_PARTENAIRE, A_INTERLCODE, A_INTERLLIB, A_INTERLTEL, A_INTERLMAIL, A_DESCRIPTION) VALUES (@A_NUMEROAPPEL, @A_ETAT, @A_URGENCE, @A_IMPACT, @A_PRIORITE, @A_CREATEUR, @A_DATECREATION, @A_VECTEURAPPEL, @A_PRODUITCODE, @A_PRODUITLIB, @A_VERSION, @A_EVALUATION, @A_CONTRATCODE, @A_SOCIETECODE, @A_SOCIETELIB, @A_PARTENAIRE, @A_INTERLCODE, @A_INTERLLIB, @A_INTERLTEL, @A_INTERLMAIL, @A_DESCRIPTION)">
                <InsertParameters>
                    <asp:Parameter Name="A_NUMEROAPPEL" />
                    <asp:Parameter Name="A_ETAT" />
                    <asp:Parameter Name="A_URGENCE" />
                    <asp:Parameter Name="A_IMPACT" />
                    <asp:Parameter Name="A_PRIORITE" />
                    <asp:Parameter Name="A_CREATEUR" />
                    <asp:Parameter Name="A_DATECREATION" />
                    <asp:Parameter Name="A_VECTEURAPPEL" />
                    <asp:Parameter Name="A_PRODUITCODE" />
                    <asp:Parameter Name="A_PRODUITLIB" />
                    <asp:Parameter Name="A_VERSION" />
                    <asp:Parameter Name="A_EVALUATION" />
                    <asp:Parameter Name="A_CONTRATCODE" />
                    <asp:Parameter Name="A_SOCIETECODE" />
                    <asp:Parameter Name="A_SOCIETELIB" />
                    <asp:Parameter Name="A_PARTENAIRE" />
                    <asp:Parameter Name="A_INTERLCODE" />
                    <asp:Parameter Name="A_INTERLLIB" />
                    <asp:Parameter Name="A_INTERLTEL" />
                    <asp:Parameter Name="A_INTERLMAIL" />
                    <asp:Parameter Name="A_DESCRIPTION" />
                </InsertParameters>
            </asp:SqlDataSource>
     
     
     
     
    </asp:Content>
    formview.cs
    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
    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
     
    public partial class Appels_NouvelAppel1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ((TextBox)FormView1.FindControl("A_CREATEURTextBox")).Text = User.Identity.Name;
            ((TextBox)FormView1.FindControl("A_DATECREATIONTextBox")).Text = DateTime.Now.ToString();
            ((TextBox)FormView1.FindControl("A_ETATTextBox")).Text = "Non Lu";
     
        }
     
     
    }

  16. #16
    Membre Expert
    Avatar de Mehdi Feki
    Profil pro
    Inscrit en
    Décembre 2004
    Messages
    1 113
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France

    Informations forums :
    Inscription : Décembre 2004
    Messages : 1 113
    Par défaut
    Bon là ce n'est pas aussi évident que je le pensais :

    Donc si comprends bien tu utilise la méthode GetAPPELS de ta classe DataAccess.DsAPPELSTableAdapters.SP_GET_APPELSTableAdapter pour récupérer les ligne de ton gridView.

    Déjà est-ce que c'est seulement la derniere ligne insérée qui n'est pas affichée ? ou les lignes insérées avec ton FormView ? ou toutes les lignes de ta table ?

  17. #17
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    132
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 132
    Par défaut toutes les lignes de ma table
    en fait c'est toutes les lignes de ma table que je rajoute qui ne sont pas prise en compte.

    Citation Envoyé par mehdi_tn
    Bon là ce n'est pas aussi évident que je le pensais :

    Donc si comprends bien tu utilise la méthode GetAPPELS de ta classe DataAccess.DsAPPELSTableAdapters.SP_GET_APPELSTableAdapter pour récupérer les ligne de ton gridView.

    Déjà est-ce que c'est seulement la derniere ligne insérée qui n'est pas affichée ? ou les lignes insérées avec ton FormView ? ou toutes les lignes de ta table ?

  18. #18
    Membre Expert
    Avatar de Mehdi Feki
    Profil pro
    Inscrit en
    Décembre 2004
    Messages
    1 113
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France

    Informations forums :
    Inscription : Décembre 2004
    Messages : 1 113
    Par défaut
    Citation Envoyé par hermine
    en fait c'est toutes les lignes de ma table que je rajoute qui ne sont pas prise en compte.
    Donc à la base c'est GetAPPELS qui ne retourne pas toutes les lignes. Il faut vérifier pourquoi la requête ne retourne pas toutes les lignes . Peut être un problème de jointure.

  19. #19
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    132
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 132
    Par défaut procédure stockée
    ma procédure est celle-ci dessous.

    je vois pas l'erreur car ma clause where est sur A_ETAT='non lu'
    car par defaut lors de l'insertion son etat est initialisé à non lu.

    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
    ALTER PROCEDURE dbo.SP_GET_APPELS 
     
     
    AS
    	SELECT     APPELS.A_ETAT, APPELS.A_NUMEROAPPEL, APPELS.A_SOCIETECODE, APPELS.A_SOCIETELIB, APPELS.A_URGENCE, APPELS.A_PRIORITE, 
                          APPELS.A_IMPACT, APPELS.A_CREATEUR, APPELS.A_DATECREATION, APPELS.A_VECTEURAPPEL, APPELS.A_PRODUITCODE, 
                          APPELS.A_PRODUITLIB, APPELS.A_VERSION, APPELS.A_EVALUATION, APPELS.A_CONTRATCODE, APPELS.A_PARTENAIRE, APPELS.A_INTERLCODE, 
                          APPELS.A_INTERLLIB, APPELS.A_INTERLTEL, APPELS.A_INTERLMAIL, APPELS.A_DESCRIPTION, CONTRATS_VALIDES.AFF_AFFAIRE2, 
                          V_PRODUIT_VERSION.LIB_PRODUIT, V_PRODUIT_VERSION.LIB_VERSION
    FROM         APPELS INNER JOIN
                          CONTRATS_VALIDES ON APPELS.A_CONTRATCODE = CONTRATS_VALIDES.AFF_AFFAIRE2 INNER JOIN
                          V_PRODUIT_VERSION ON APPELS.A_PRODUITCODE = V_PRODUIT_VERSION.CODE_PRODUIT AND 
                          APPELS.A_VERSION = V_PRODUIT_VERSION.CODE_VERSION
    WHERE     (APPELS.A_ETAT <> 'historisé')
     
    RETURN


    Citation Envoyé par mehdi_tn
    Donc à la base c'est GetAPPELS qui ne retourne pas toutes les lignes. Il faut vérifier pourquoi la requête ne retourne pas toutes les lignes . Peut être un problème de jointure.

  20. #20
    Membre Expert
    Avatar de Mehdi Feki
    Profil pro
    Inscrit en
    Décembre 2004
    Messages
    1 113
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France

    Informations forums :
    Inscription : Décembre 2004
    Messages : 1 113
    Par défaut
    Est-ce qu'on est d'accord que la requête d'insertion de ton formview est la cause du problème.

    Est-ce que toutes sont affichées lorsque dans ta procédure stockée tu change les inner join par des left outer join et tu supprime la clause Where

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. [Débutant] Problème affichage liste déroulante cascade en C# / ASP.NET
    Par anisbenb dans le forum ASP.NET
    Réponses: 6
    Dernier message: 09/06/2014, 12h39
  2. [Débutant] probléme d'affichage d'alerte dans une page asp.net
    Par maria_info dans le forum ASP.NET
    Réponses: 1
    Dernier message: 26/10/2011, 17h38
  3. [C#][ASP.NET 1.1] Datalist et affichage conditionnel
    Par Louis-Guillaume Morand dans le forum ASP.NET
    Réponses: 4
    Dernier message: 20/04/2006, 21h23
  4. enregistrer asp.net 1.1 avec IIS
    Par argv666 dans le forum ASP
    Réponses: 2
    Dernier message: 11/04/2005, 17h31
  5. [CR][ASP.NET] Problème d'affichage du rapport
    Par David.V dans le forum SAP Crystal Reports
    Réponses: 3
    Dernier message: 20/04/2004, 13h39

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