Exemple #1
0
 /// <summary>
 /// Actualizeaza un proiect.
 /// </summary>
 /// <param name="p">Proiectul de actualizat</param>
 public static void UpdateProject(Project p)
 {
     string query = string.Format("UPDATE {0} SET name = @name, status = @status WHERE id = @id", Globals.TABLE_PROJECT);
     MySqlCommand command = new MySqlCommand(query, connection);
     command.Parameters.AddWithValue("@name", p.Name);
     command.Parameters.AddWithValue("@status", p.Status);
     command.Parameters.AddWithValue("@id", p.Id);
     command.ExecuteNonQuery();
     Destroy(command);
 }
Exemple #2
0
 //Alege proiect
 private void chooseButton_Click(object sender, EventArgs e)
 {
     ProjectsWindow ps = new ProjectsWindow();
     DialogResult result = ps.ShowDialog();
     if (result == DialogResult.OK)
     {
         selectedProject = ps.SelectedProject;
         if (selectedProject != null)
         {
             startActivityButton.Enabled = true;
             projectNameLabel.Text = selectedProject.Name;
             projectNameLabel.ForeColor = blueUnclicked;
             myActivitySearchButton.Enabled = chooseProjectButton.Enabled;
         }
     }
 }