Ejemplo n.º 1
0
        private void PopulateListBox()
        {
            listBoxApps.Items.Clear();
            string    lApplicationName     = "";
            string    lApplicationVersion  = "";
            DataTable lAppDetailsDataTable = new DataTable();

            foreach (int lApplicationId in _selectedApplicationIds)
            {
                lAppDetailsDataTable = lApplicationsDAO.GetApplicationNameAndVersionById(lApplicationId);
                lApplicationName     = lAppDetailsDataTable.Rows[0][0].ToString();
                lApplicationVersion  = lAppDetailsDataTable.Rows[0][1].ToString();

                if (lApplicationVersion == "" || lApplicationName.EndsWith(lApplicationVersion))
                {
                    listBoxApps.Items.Add(lApplicationName);
                }
                else
                {
                    listBoxApps.Items.Add(lApplicationName + " (" + lApplicationVersion + ")");
                }
            }
        }