Migration vb6 -> vs 2005 .NET

itsmyslurp Messages postés 15 Date d'inscription lundi 18 juin 2007 Statut Membre Dernière intervention 4 juillet 2007 - 28 juin 2007 à 14:28
cs_drahcir Messages postés 745 Date d'inscription mardi 30 novembre 2004 Statut Membre Dernière intervention 15 septembre 2009 - 28 juin 2007 à 15:33
hello  

Je fais une migration de vb6 vb .NET
En vb6, il y avait des tas de tableaux (donc avec des index) que j'ai "tranformé" en datatables. Seulement, lorsqu'il y a une instruction précisant un index bien précis... comment je dois faire pour pouvoir retrouver le même résultat en .NET ??

ex :affint (sepla(k) + 1)>  affInt = pCalculRow.nbIntHor'(resultatcalculrow.nbSepLo + 1)

je suis sur la bonne voie ? je me plante complètement ? aidez-moi ... c'est pour la fin de mon stage ...

merci d'avance   

  *** in Ze Move *** 

7 réponses

cs_drahcir Messages postés 745 Date d'inscription mardi 30 novembre 2004 Statut Membre Dernière intervention 15 septembre 2009 4
28 juin 2007 à 14:54
Salut,

commence par nous dire ce que sont tes variables parce que c'est un peu flou tout ça.

<hr />
@+  
0
itsmyslurp Messages postés 15 Date d'inscription lundi 18 juin 2007 Statut Membre Dernière intervention 4 juillet 2007
28 juin 2007 à 15:03
voilà toutes les variables de mes datatables :

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <ConnectionRefs>
        </ConnectionRefs>
        <Connections>
        </Connections>
        <TableRefs>
          <DesignTableRef Name="Intercalaires">
            <ColumnRefs>
            </ColumnRefs>
            <SourceRefs>
            </SourceRefs>
          </DesignTableRef>
          <DesignTableRef Name="Cartons">
            <ColumnRefs>
            </ColumnRefs>
            <SourceRefs>
            </SourceRefs>
          </DesignTableRef>
          <DesignTableRef Name="ResultatCalcul">
            <ColumnRefs>
            </ColumnRefs>
            <SourceRefs>
            </SourceRefs>
          </DesignTableRef>
        </TableRefs>
        <Tables>
        </Tables>
        <RelationRefs>
        </RelationRefs>
        <SourceRefs>
        </SourceRefs>
        <Sources>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="NewDataSet" msprop:Generator_DataSetName="NewDataSet">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Intercalaires" msprop:Generator_UserTableName="Intercalaires" msprop:Generator_RowDeletedName="IntercalairesRowDeleted" msprop:Generator_TableClassName="IntercalairesDataTable" msprop:Generator_RowChangedName="IntercalairesRowChanged" msprop:Generator_RowClassName="IntercalairesRow" msprop:Generator_RowChangingName="IntercalairesRowChanging" msprop:Generator_RowEvArgName="IntercalairesRowChangeEvent" msprop:Generator_RowEvHandlerName="IntercalairesRowChangeEventHandler" msprop:Generator_TablePropName="Intercalaires" msprop:Generator_TableVarName="tableIntercalaires" msprop:Generator_RowDeletingName="IntercalairesRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="nom" msprop:Generator_UserColumnName="nom" msprop:Generator_ColumnPropNameInRow="nom" msprop:Generator_ColumnVarNameInTable="columnnom" msprop:Generator_ColumnPropNameInTable="nomColumn" type="xs:string" minOccurs="0" />
              <xs:element name="longueur" msprop:Generator_UserColumnName="longueur" msprop:Generator_ColumnPropNameInRow="longueur" msprop:Generator_ColumnVarNameInTable="columnlongueur" msprop:Generator_ColumnPropNameInTable="longueurColumn" type="xs:int" minOccurs="0" />
              <xs:element name="largeur" msprop:Generator_UserColumnName="largeur" msprop:Generator_ColumnPropNameInRow="largeur" msprop:Generator_ColumnVarNameInTable="columnlargeur" msprop:Generator_ColumnPropNameInTable="largeurColumn" type="xs:int" minOccurs="0" />
              <xs:element name="epaisseur" msprop:Generator_UserColumnName="epaisseur" msprop:Generator_ColumnPropNameInRow="epaisseur" msprop:Generator_ColumnVarNameInTable="columnepaisseur" msprop:Generator_ColumnPropNameInTable="epaisseurColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="cout" msprop:Generator_UserColumnName="cout" msprop:Generator_ColumnPropNameInRow="cout" msprop:Generator_ColumnVarNameInTable="columncout" msprop:Generator_ColumnPropNameInTable="coutColumn" type="xs:decimal" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Cartons" msprop:Generator_UserTableName="Cartons" msprop:Generator_RowDeletedName="CartonsRowDeleted" msprop:Generator_TableClassName="CartonsDataTable" msprop:Generator_RowChangedName="CartonsRowChanged" msprop:Generator_RowClassName="CartonsRow" msprop:Generator_RowChangingName="CartonsRowChanging" msprop:Generator_RowEvArgName="CartonsRowChangeEvent" msprop:Generator_RowEvHandlerName="CartonsRowChangeEventHandler" msprop:Generator_TablePropName="Cartons" msprop:Generator_TableVarName="tableCartons" msprop:Generator_RowDeletingName="CartonsRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="nom" msprop:Generator_UserColumnName="nom" msprop:Generator_ColumnPropNameInRow="nom" msprop:Generator_ColumnVarNameInTable="columnnom" msprop:Generator_ColumnPropNameInTable="nomColumn" type="xs:string" minOccurs="0" />
              <xs:element name="codeCart" msprop:Generator_UserColumnName="codeCart" msprop:Generator_ColumnPropNameInRow="codeCart" msprop:Generator_ColumnVarNameInTable="columncodeCart" msprop:Generator_ColumnPropNameInTable="codeCartColumn" type="xs:string" minOccurs="0" />
              <xs:element name="longueur" msprop:Generator_UserColumnName="longueur" msprop:Generator_ColumnPropNameInRow="longueur" msprop:Generator_ColumnVarNameInTable="columnlongueur" msprop:Generator_ColumnPropNameInTable="longueurColumn" type="xs:int" minOccurs="0" />
              <xs:element name="largeur" msprop:Generator_UserColumnName="largeur" msprop:Generator_ColumnPropNameInRow="largeur" msprop:Generator_ColumnVarNameInTable="columnlargeur" msprop:Generator_ColumnPropNameInTable="largeurColumn" type="xs:int" minOccurs="0" />
              <xs:element name="epaisseur" msprop:Generator_UserColumnName="epaisseur" msprop:Generator_ColumnPropNameInRow="epaisseur" msprop:Generator_ColumnVarNameInTable="columnepaisseur" msprop:Generator_ColumnPropNameInTable="epaisseurColumn" type="xs:int" minOccurs="0" />
              <xs:element name="nbCartFPM" msprop:Generator_UserColumnName="nbCartFPM" msprop:Generator_ColumnPropNameInRow="nbCartFPM" msprop:Generator_ColumnVarNameInTable="columnnbCartFPM" msprop:Generator_ColumnPropNameInTable="nbCartFPMColumn" type="xs:int" minOccurs="0" />
              <xs:element name="nbCartCP2" msprop:Generator_UserColumnName="nbCartCP2" msprop:Generator_ColumnPropNameInRow="nbCartCP2" msprop:Generator_ColumnVarNameInTable="columnnbCartCP2" msprop:Generator_ColumnPropNameInTable="nbCartCP2Column" type="xs:int" minOccurs="0" />
              <xs:element name="coutCart" msprop:Generator_UserColumnName="coutCart" msprop:Generator_ColumnPropNameInRow="coutCart" msprop:Generator_ColumnVarNameInTable="columncoutCart" msprop:Generator_ColumnPropNameInTable="coutCartColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="embTypeChop" msprop:Generator_UserColumnName="embTypeChop" msprop:Generator_ColumnPropNameInRow="embTypeChop" msprop:Generator_ColumnVarNameInTable="columnembTypeChop" msprop:Generator_ColumnPropNameInTable="embTypeChopColumn" type="xs:string" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ResultatCalcul" msprop:Generator_UserTableName="ResultatCalcul" msprop:Generator_RowDeletedName="ResultatCalculRowDeleted" msprop:Generator_TableClassName="ResultatCalculDataTable" msprop:Generator_RowChangedName="ResultatCalculRowChanged" msprop:Generator_RowClassName="ResultatCalculRow" msprop:Generator_RowChangingName="ResultatCalculRowChanging" msprop:Generator_RowEvArgName="ResultatCalculRowChangeEvent" msprop:Generator_RowEvHandlerName="ResultatCalculRowChangeEventHandler" msprop:Generator_TablePropName="ResultatCalcul" msprop:Generator_TableVarName="tableResultatCalcul" msprop:Generator_RowDeletingName="ResultatCalculRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="codeCart" msprop:Generator_UserColumnName="codeCart" msprop:Generator_ColumnPropNameInRow="codeCart" msprop:Generator_ColumnVarNameInTable="columncodeCart" msprop:Generator_ColumnPropNameInTable="codeCartColumn" type="xs:string" minOccurs="0" />
              <xs:element name="longueurSep" msprop:Generator_UserColumnName="longueurSep" msprop:Generator_ColumnPropNameInRow="longueurSep" msprop:Generator_ColumnVarNameInTable="columnlongueurSep" msprop:Generator_ColumnPropNameInTable="longueurSepColumn" type="xs:double" minOccurs="0" />
              <xs:element name="largeurSep" msprop:Generator_UserColumnName="largeurSep" msprop:Generator_ColumnPropNameInRow="largeurSep" msprop:Generator_ColumnVarNameInTable="columnlargeurSep" msprop:Generator_ColumnPropNameInTable="largeurSepColumn" type="xs:double" minOccurs="0" />
              <xs:element name="nbSepCart" msprop:Generator_UserColumnName="nbSepCart" msprop:Generator_ColumnPropNameInRow="nbSepCart" msprop:Generator_ColumnVarNameInTable="columnnbSepCart" msprop:Generator_ColumnPropNameInTable="nbSepCartColumn" type="xs:int" minOccurs="0" />
              <xs:element name="refInt" msprop:Generator_UserColumnName="refInt" msprop:Generator_ColumnPropNameInRow="refInt" msprop:Generator_ColumnVarNameInTable="columnrefInt" msprop:Generator_ColumnPropNameInTable="refIntColumn" type="xs:string" minOccurs="0" />
              <xs:element name="longueurInt" msprop:Generator_UserColumnName="longueurInt" msprop:Generator_ColumnPropNameInRow="longueurInt" msprop:Generator_ColumnVarNameInTable="columnlongueurInt" msprop:Generator_ColumnPropNameInTable="longueurIntColumn" type="xs:int" minOccurs="0" />
              <xs:element name="largeurInt" msprop:Generator_UserColumnName="largeurInt" msprop:Generator_ColumnPropNameInRow="largeurInt" msprop:Generator_ColumnVarNameInTable="columnlargeurInt" msprop:Generator_ColumnPropNameInTable="largeurIntColumn" type="xs:int" minOccurs="0" />
              <xs:element name="nbIntVer" msprop:Generator_UserColumnName="nbIntVer" msprop:Generator_ColumnPropNameInRow="nbIntVer" msprop:Generator_ColumnVarNameInTable="columnnbIntVer" msprop:Generator_ColumnPropNameInTable="nbIntVerColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="nbIntHor" msprop:Generator_UserColumnName="nbIntHor" msprop:Generator_ColumnPropNameInRow="nbIntHor" msprop:Generator_ColumnVarNameInTable="columnnbIntHor" msprop:Generator_ColumnPropNameInTable="nbIntHorColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="nbIntCart" msprop:Generator_UserColumnName="nbIntCart" msprop:Generator_ColumnPropNameInRow="nbIntCart" msprop:Generator_ColumnVarNameInTable="columnnbIntCart" msprop:Generator_ColumnPropNameInTable="nbIntCartColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="nbCartPal" msprop:Generator_UserColumnName="nbCartPal" msprop:Generator_ColumnPropNameInRow="nbCartPal" msprop:Generator_ColumnVarNameInTable="columnnbCartPal" msprop:Generator_ColumnPropNameInTable="nbCartPalColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="coutEmballage" msprop:Generator_UserColumnName="coutEmballage" msprop:Generator_ColumnPropNameInRow="coutEmballage" msprop:Generator_ColumnVarNameInTable="columncoutEmballage" msprop:Generator_ColumnPropNameInTable="coutEmballageColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="coutIntercalaire" msprop:Generator_UserColumnName="coutIntercalaire" msprop:Generator_ColumnPropNameInRow="coutIntercalaire" msprop:Generator_ColumnVarNameInTable="columncoutIntercalaire" msprop:Generator_ColumnPropNameInTable="coutIntercalaireColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="coutTotalCart" msprop:Generator_UserColumnName="coutTotalCart" msprop:Generator_ColumnPropNameInRow="coutTotalCart" msprop:Generator_ColumnVarNameInTable="columncoutTotalCart" msprop:Generator_ColumnPropNameInTable="coutTotalCartColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="coutTotalPal" msprop:Generator_UserColumnName="coutTotalPal" msprop:Generator_ColumnPropNameInRow="coutTotalPal" msprop:Generator_ColumnVarNameInTable="columncoutTotalPal" msprop:Generator_ColumnPropNameInTable="coutTotalPalColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="coutTotalMetre" msprop:Generator_UserColumnName="coutTotalMetre" msprop:Generator_ColumnPropNameInRow="coutTotalMetre" msprop:Generator_ColumnVarNameInTable="columncoutTotalMetre" msprop:Generator_ColumnPropNameInTable="coutTotalMetreColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="sens" msprop:Generator_UserColumnName="sens" msprop:Generator_ColumnPropNameInRow="sens" msprop:Generator_ColumnVarNameInTable="columnsens" msprop:Generator_ColumnPropNameInTable="sensColumn" type="xs:string" minOccurs="0" />
              <xs:element name="surfSepCart" msprop:Generator_UserColumnName="surfSepCart" msprop:Generator_ColumnPropNameInRow="surfSepCart" msprop:Generator_ColumnVarNameInTable="columnsurfSepCart" msprop:Generator_ColumnPropNameInTable="surfSepCartColumn" type="xs:string" minOccurs="0" />
              <xs:element name="surfPal" msprop:Generator_UserColumnName="surfPal" msprop:Generator_ColumnPropNameInRow="surfPal" msprop:Generator_ColumnVarNameInTable="columnsurfPal" msprop:Generator_ColumnPropNameInTable="surfPalColumn" type="xs:string" minOccurs="0" />
              <xs:element name="longueurCart" msprop:Generator_UserColumnName="longueurCart" msprop:Generator_ColumnPropNameInRow="longueurCart" msprop:Generator_ColumnVarNameInTable="columnlongueurCart" msprop:Generator_ColumnPropNameInTable="longueurCartColumn" type="xs:string" minOccurs="0" />
              <xs:element name="largeurCart" msprop:Generator_UserColumnName="largeurCart" msprop:Generator_ColumnPropNameInRow="largeurCart" msprop:Generator_ColumnVarNameInTable="columnlargeurCart" msprop:Generator_ColumnPropNameInTable="largeurCartColumn" type="xs:string" minOccurs="0" />
              <xs:element name="nbSepLa" msprop:Generator_UserColumnName="nbSepLa" msprop:Generator_ColumnPropNameInRow="nbSepLa" msprop:Generator_ColumnVarNameInTable="columnnbSepLa" msprop:Generator_ColumnPropNameInTable="nbSepLaColumn" type="xs:string" minOccurs="0" />
              <xs:element name="nbSepLo" msprop:Generator_UserColumnName="nbSepLo" msprop:Generator_ColumnPropNameInRow="nbSepLo" msprop:Generator_ColumnVarNameInTable="columnnbSepLo" msprop:Generator_ColumnPropNameInTable="nbSepLoColumn" type="xs:string" minOccurs="0" />
              <xs:element name="epaisseurSep" msprop:Generator_UserColumnName="epaisseurSep" msprop:Generator_ColumnPropNameInRow="epaisseurSep" msprop:Generator_ColumnVarNameInTable="columnepaisseurSep" msprop:Generator_ColumnPropNameInTable="epaisseurSepColumn" type="xs:string" minOccurs="0" />
              <xs:element name="epaisseurCart" msprop:Generator_UserColumnName="epaisseurCart" msprop:Generator_ColumnPropNameInRow="epaisseurCart" msprop:Generator_ColumnVarNameInTable="columnepaisseurCart" msprop:Generator_ColumnPropNameInTable="epaisseurCartColumn" type="xs:string" minOccurs="0" />
              <xs:element name="epaisseurInt" msprop:Generator_UserColumnName="epaisseurInt" msprop:Generator_ColumnPropNameInRow="epaisseurInt" msprop:Generator_ColumnVarNameInTable="columnepaisseurInt" msprop:Generator_ColumnPropNameInTable="epaisseurIntColumn" type="xs:string" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>

  *** in Ze Move *** 
0
itsmyslurp Messages postés 15 Date d'inscription lundi 18 juin 2007 Statut Membre Dernière intervention 4 juillet 2007
28 juin 2007 à 15:06
les variables équivalentes en vb6 ont été créées lorsqu'il y avait besoin ...

  *** in Ze Move *** 
0
cs_drahcir Messages postés 745 Date d'inscription mardi 30 novembre 2004 Statut Membre Dernière intervention 15 septembre 2009 4
28 juin 2007 à 15:16
Euh..... oui ok......

Ce que je voulais, c'est la déclaration (dans ton code vb) des variables citées dans ton premier post.....

<hr />
@+  
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
itsmyslurp Messages postés 15 Date d'inscription lundi 18 juin 2007 Statut Membre Dernière intervention 4 juillet 2007
28 juin 2007 à 15:20
en vb6 : dim affint       'il n'y a rien de plus | intégré dans un module
en VS 2005 .NET : private affInt          'dans une classe

  *** in Ze Move *** 
0
itsmyslurp Messages postés 15 Date d'inscription lundi 18 juin 2007 Statut Membre Dernière intervention 4 juillet 2007
28 juin 2007 à 15:23
Public




Sub
New(ByRef ResultatCalculRow As Emballage_DS.ResultatCalculRow)pCalculRow = ResultatCalculRow

EndSub

Private  nbSepLo As System.Decimal

nbIntHor : dans la table resultatCalcul et Intercalaire

  *** in Ze Move *** 
0
cs_drahcir Messages postés 745 Date d'inscription mardi 30 novembre 2004 Statut Membre Dernière intervention 15 septembre 2009 4
28 juin 2007 à 15:33
affint = nbintla(sepla(k) + 1)
>  affInt = pCalculRow.nbIntHor'(resultatcalculrow.nbSepLo + 1)


nBIntHor c'est quoi?
resultatcalculrow c'est quoi? la même chose que pCalculRow (cf ton constructeur)?
Tu veux faire quoi exactement?

C'est pas trés clair....

<hr />
@+  
0
Rejoignez-nous