mercredi 25 avril 2018

How to break out of a nested loop (FOR and IF) and assign values to text boxes (text boxes end up blank)?

Why are the text boxes blank even though it looks like they are being filled at run time? Should I use something besides break?

           List<Obj> abc = ABC_BLL.GetABC();

            for (int i = 0; i < abc.Count; i++)
            {
                int a= abc [i].A;
                string b= abc[i].B;
                string c= abc[i].C;
                string d= abc[i].D;
                decimal e= abc[i].E;
                decimal f= abc[i].F;

                if (i == rowIndex)
                {
                    txtA.Text = a.ToString();
                    txtB.Text = b;
                    txtC.Text = c;
                    txtD.Text = d;
                    txtE.Text = e.ToString();
                    txtF.Text = f.ToString();

                    break;
                }


            }

Aucun commentaire:

Enregistrer un commentaire