Example #1
0
        private void BindData()
        {
            txtPackageName.Text = Target;

            if (String.IsNullOrEmpty(Target) == false)
            {
                FileInfo packageInfo = AutoUpdateManager.GetPackageInfo(Target);
                txtCreateDate.Text         = Format.DateTime(packageInfo.CreationTime);
                txtLastModifiedDate.Text   = Format.DateTime(packageInfo.LastWriteTime);
                tblPackageContents.Visible = true;
            }
            else
            {
                tblPackageContents.Visible = false;
            }

            var packageGuid = AutoUpdateManager.GetPackageGuid(this.Target);

            List <Lobby> availablePublications = new List <Lobby>();

            foreach (Lobby lobby in AutoUpdateManager.GetPublications())
            {
                foreach (var includedPackageGuid in AutoUpdateManager.GetIncludedPackageGuids(lobby.Id))
                {
                    if (includedPackageGuid == packageGuid && availablePublications.Contains(lobby) == false)
                    {
                        availablePublications.Add(lobby);
                    }
                }
            }

            // Bind the availablePublications to the repeater.
            rptQuickDeploy.DataSource = availablePublications;
            rptQuickDeploy.DataBind();
        }