コード例 #1
0
        private void FormProjectSettings_Load(object sender, EventArgs e)
        {
            this.Text = "Project settings";
            string sqlString = null;
            Baza   db        = new Baza();

            labRepozName.Text  = db.GetRepozName();
            labLoggedUser.Text = glob.loggedUser;
            labProjName.Text   = glob.ProjectName;
            sqlString          = @"SELECT username FROM t_members;";
            db.LoadCombo(comboUsers, "username", sqlString);
            listProjectTeam.Items.Clear();
            sqlString = string.Format(@"SELECT username FROM t_team WHERE project like'{0}';", glob.ProjectName);
            db.LoadTextList(listProjectTeam, "username", sqlString);
            sqlString = string.Format(@"SELECT filename FROM t_doc WHERE project like'{0}';", glob.ProjectName);

            db.LoadTextList(listBoxDoc, "filename", sqlString);
        }
コード例 #2
0
        private void btnSettings_Click(object sender, EventArgs e)
        {
            FormSettings FrmSet = new FormSettings();

            this.Hide();
            FrmSet.ShowDialog();
            this.Show();

            //Refresh does not work, so....manualy :)
            Baza db = new Baza();

            labRepozName.Text = db.GetRepozName(); //show repository name in label on the form(if repository is created and in t_repoz table).
            labProjName.Text  = glob.ProjectName;
            db.GetProjectsInCombo(comboProjects);
            if (!String.IsNullOrEmpty(glob.ProjectName))
            {
                comboProjects.Text = glob.ProjectName;
            }
        }
コード例 #3
0
 private void btnProjSet_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(glob.ProjectName) && glob.passLevel > 8)
     {
         FormProjectSettings FrmProjSet = new FormProjectSettings();
         FrmProjSet.ShowDialog();
         //Refresh does not work, so....manualy :)
         Baza db = new Baza();
         labRepozName.Text = db.GetRepozName(); //show repository name in label on the form(if repository is created and in t_repoz table).
         labProjName.Text  = glob.ProjectName;
         db.GetProjectsInCombo(comboProjects);
         listViewProjDoc.Items.Clear(); //Clear list, and load all file names from db (Query is hardcoded)
         db.LoadVeiwListProjectDocuments(listViewProjDoc);
     }
     else
     {
         MessageBox.Show("No active project or access level < 9");
     }
 }