Information

  • Informatik
  • C#
  • Gruppenwechsel

Zurreal.de

Fantasy Art ~ Phantastische Kunst

Fantasy Art ~ Phantastische Kunst

Please click on 'Switch Style'.
The style of the website will change.

Bitte klicken Sie auf 'Switch Style'.
Die Gestaltung der Webseite wird sich ändern.

Gruppenwechsel: Vorlage


                 Anzahl
KdID  ArtID Einzel |
  |      |      |  |
 K00091;100076;240;2
 K00091;100076;240;3__5 Stück
Kd_K00091;500123;1500;1_1 Stück
 K01234;200234;2000;1
 K01234;200234;2000;1_2 Stück
Kd_K01234;200356;1500;1_1 Stück
 K04711;300567;0350;2
 K04711;300567;0350;4
Kd_K04711;300567;0350;3_9 Stück

Kunden-ID, Artikel-ID, Einzelpreise, Anzahl (Stück).


Gruppenwechsel: Ausgabe


KdID:
K00091    |Bezei-|An- |
Pos|ArtID |chnung|zahl|Einzel|Gesamt
 1 |500123| Soft | 5  | 2,40 | 12,00
 2 |200234| Buch | 1  |15,00 | 15,00
                         Netto:27,00

KdID:
K01234    |Bezei-|An- |
Pos|ArtID |chnung|zahl|Einzel|Gesamt
 1 |200356| Kraft| 2  |20,00 | 40,00
 2 |300567| Sauna| 1  |15,00 | 15,00
                         Netto:55,00

KdID:
K04711    |Bezei-|An- |
Pos|ArtID |chnung|zahl|Einzel|Gesamt
 1 |300567| Drink| 9  | 3,50 | 31,50
                         Netto:31,50

...


Gruppenwechsel: Grundgerüst


string Datensatz, Bezeichnung,
       ArtID_Vgl, ArtID,
        KdID_Vgl,  KdID;
double Einzel = 0,
       Gesamt = 0, Netto = 0;
int Anzahl = 0, Pos = 0;

/* FileStream */
/* StreamReader */

while (sr.Peek() != -1)
{
KdID_Vgl = KdID;

  while (sr.Peek() != -1 &&
  KdID == KdID_Vgl)
  {
  ArtID_Vgl = ArtID;

    while (sr.Peek() != -1 &&
     KdID == KdID_Vgl &&
    ArtID == ArtID_Vgl)
    {
    /* ... */
    }
  }
/* ... */
}

...