Esempio n. 1
0
        private void LoadProjects()
        {
            try
            {
                cmdBackup.Enabled = false;

                string GroupName       = string.Empty;
                string IncludeInactive = string.Empty;

                if (cbServers.Text == "")
                {
                    return;
                }

                GroupName = GetServerGroupFromAlias(cbServers.Text);

                IncludeInactive = cActiveOnly.Checked ? "N" : "Y";

                cbProject.Items.Clear();

                using (DataStuff sn = new DataStuff())
                {
                    DataTable dt = sn.GetProjectsByServerGroup(GroupName, IncludeInactive);

                    if (dt.Rows.Count > 0)
                    {
                        foreach (DataRow row in dt.Rows)
                        {
                            cbProject.Items.Add(row["ProjectName"].ToString());
                        }
                    }
                }
            }

            catch
            {
                throw;
            }
        }