1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
| using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data;
namespace Accueil
{
public partial class Oeuvres : Form
{
private Label listOeuvres;
private DataGridViewTextBoxColumn Titre_Morceau;
private DataGridViewTextBoxColumn Type_Morceau;
private DataGridViewTextBoxColumn Nom_Auteur;
private DataGridViewTextBoxColumn Durée;
private DataGridViewTextBoxColumn Epoque;
private Button Ajouter;
private Button Supprimer;
private Button Retour;
private Button Groupe2;
private DataGridView dgvOeuvre;
Persistance persistance = new Persistance();
public Oeuvres()
{
InitializeComponent();
persistance.Connection();
persistance.Requette();
}
private void InitializeComponent()
{
this.listOeuvres = new System.Windows.Forms.Label();
this.dgvOeuvre = new System.Windows.Forms.DataGridView();
this.Titre_Morceau = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Type_Morceau = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Nom_Auteur = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Durée = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Epoque = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Ajouter = new System.Windows.Forms.Button();
this.Supprimer = new System.Windows.Forms.Button();
this.Retour = new System.Windows.Forms.Button();
this.Groupe2 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dgvOeuvre)).BeginInit();
this.SuspendLayout();
//
// listOeuvres
//
this.listOeuvres.AutoSize = true;
this.listOeuvres.Font = new System.Drawing.Font("Verdana", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listOeuvres.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.listOeuvres.Location = new System.Drawing.Point(277, 83);
this.listOeuvres.Name = "listOeuvres";
this.listOeuvres.Size = new System.Drawing.Size(216, 25);
this.listOeuvres.TabIndex = 4;
this.listOeuvres.Text = "Liste des oeuvres";
//
// dgvOeuvre
//
this.dgvOeuvre.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvOeuvre.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Titre_Morceau,
this.Type_Morceau,
this.Nom_Auteur,
this.Durée,
this.Epoque});
this.dgvOeuvre.Location = new System.Drawing.Point(64, 131);
this.dgvOeuvre.Name = "dgvOeuvre";
this.dgvOeuvre.Size = new System.Drawing.Size(650, 337);
this.dgvOeuvre.TabIndex = 5;
//
// Titre_Morceau
//
this.Titre_Morceau.HeaderText = "Titre morceau";
this.Titre_Morceau.Name = "Titre morceau";
this.Titre_Morceau.Width = 130;
//
// Type_Morceau
//
this.Type_Morceau.HeaderText = "Type morceau";
this.Type_Morceau.Name = "Type morceau";
this.Type_Morceau.Width = 130;
//
// Nom_Auteur
//
this.Nom_Auteur.HeaderText = "Nom Auteur";
this.Nom_Auteur.Name = "Nom Auteur";
this.Nom_Auteur.Width = 130;
//
// Durée
//
this.Durée.HeaderText = "Durée";
this.Durée.Name = "Durée";
this.Durée.Width = 130;
//
// Epoque
//
this.Epoque.HeaderText = "Epoque";
this.Epoque.Name = "Epoque";
this.Epoque.Width = 130;
//
// Ajouter
//
this.Ajouter.Location = new System.Drawing.Point(468, 529);
this.Ajouter.Name = "Ajouter";
this.Ajouter.Size = new System.Drawing.Size(101, 25);
this.Ajouter.TabIndex = 10;
this.Ajouter.Text = "Ajouter";
this.Ajouter.UseVisualStyleBackColor = true;
this.Ajouter.Click += new System.EventHandler(this.Ajouter_Click);
//
// Supprimer
//
this.Supprimer.Location = new System.Drawing.Point(575, 529);
this.Supprimer.Name = "Supprimer";
this.Supprimer.Size = new System.Drawing.Size(101, 25);
this.Supprimer.TabIndex = 12;
this.Supprimer.Text = "Supprimer";
this.Supprimer.UseVisualStyleBackColor = true;
this.Supprimer.Click += new System.EventHandler(this.Supprimer_Click);
//
// Retour
//
this.Retour.Location = new System.Drawing.Point(682, 529);
this.Retour.Name = "Retour";
this.Retour.Size = new System.Drawing.Size(98, 25);
this.Retour.TabIndex = 13;
this.Retour.Text = "Retour";
this.Retour.UseVisualStyleBackColor = true;
this.Retour.Click += new System.EventHandler(this.Retour_Click);
//
// Groupe2
//
this.Groupe2.BackColor = System.Drawing.Color.GreenYellow;
this.Groupe2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Groupe2.ForeColor = System.Drawing.Color.DarkGreen;
this.Groupe2.Location = new System.Drawing.Point(705, 28);
this.Groupe2.Name = "Groupe2";
this.Groupe2.Size = new System.Drawing.Size(75, 23);
this.Groupe2.TabIndex = 14;
this.Groupe2.Text = "Groupe";
this.Groupe2.UseVisualStyleBackColor = false;
this.Groupe2.Click += new System.EventHandler(this.Groupe2_Click);
//
// Oeuvres
//
this.ClientSize = new System.Drawing.Size(792, 566);
this.Controls.Add(this.Groupe2);
this.Controls.Add(this.Retour);
this.Controls.Add(this.Supprimer);
this.Controls.Add(this.Ajouter);
this.Controls.Add(this.dgvOeuvre);
this.Controls.Add(this.listOeuvres);
this.Name = "Oeuvres";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.Ouevres_Load);
((System.ComponentModel.ISupportInitialize)(this.dgvOeuvre)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
private void Ouevres_Load(object sender, EventArgs e)
{
}
private void Groupe2_Click(object sender, EventArgs e)
{
persistance.Deconnection();
Groupes fntgroupe = new Groupes();
fntgroupe.MdiParent = (Accueil) MdiParent;
fntgroupe.Show();
this.Close();
}
private void Ajouter_Click(object sender, EventArgs e)
{
dgvOeuvre.Rows.Add();
}
private void Supprimer_Click(object sender, EventArgs e)
{
dgvOeuvre.Rows.Remove(dgvOeuvre.CurrentRow);
}
private void Retour_Click(object sender, EventArgs e)
{
persistance.Deconnection();
Accueil fntprincipale;
fntprincipale = (Accueil)this.MdiParent;
fntprincipale.strEtat = "Connecter";
fntprincipale.Afficher();
this.Close();
}
}
} |
Partager