Last active
March 21, 2018 13:51
-
-
Save riccardopirani/45bf73e8f12c1c30b3f80de4ce64c5e0 to your computer and use it in GitHub Desktop.
Error: System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (s.ShowDialog(this) == DialogResult.OK) | |
| { | |
| CodiceDistintaSelezionata = s.CodiceDistintaSELECT; | |
| IdDistintaSelezionata = s.IdDistintaSELECT; | |
| Quantita = s.Quantità; | |
| sc1 = s.sc1; | |
| sc2 = s.sc2; | |
| sc3 = s.sc3; | |
| UnitaMisuraSelezionata = s.UnitaMisuraSelect; | |
| DescrizioneDistintaSelezionata = s.DescrizioneDistintaSELECT; | |
| DescrizioneDistintaEstesaSelezionata = s.DescrizioneEstesaDistintaSELECT; | |
| TotaleDistinta = s.TotaleDistinta; | |
| TotaleDistintaMoltiplicato = (Quantita * TotaleDistinta); | |
| Immagine = s.ImmagineSelect; | |
| if (s.NoteSelect == "") | |
| { | |
| s.NoteSelect = "0"; | |
| } | |
| if (s.RicaricoSelect == "") | |
| { | |
| s.RicaricoSelect = "0"; | |
| } | |
| PrezzoRiservato = s.PrezzoRiservato; | |
| String[] row = { "Distinta".ToString(), sc1, sc2, sc3, IdDistintaSelezionata, DescrizioneDistintaSelezionata, DescrizioneDistintaEstesaSelezionata, Quantita.ToString(), string.Format("{0:0.#####}", TotaleDistinta), string.Format("{0:0.#####}", TotaleDistintaMoltiplicato), UnitaMisuraSelezionata, s.NoteSelect, s.RicaricoSelect, CodiceDistintaSelezionata.ToString(), "", "", "" + s.PrezzoRiservato }; | |
| dataGridViewDistinte.Rows.Add(row); | |
| dataGridViewDistinte.Rows[conta_righe++].Cells["Immagine"].Value = Immagine; | |
| if (s.PrezzoRiservato > 0) | |
| { | |
| dataGridViewDistinte.Rows[conta_righe].DefaultCellStyle.BackColor = Color.Yellow; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment