Beispiel #1
0
 //ajout-------------------------------------------------------------------------------------------------------------------
 private void metroButton1_Click(object sender, EventArgs e)
 {
     try
     {
         string    ch = txtBox1.Text + "." + nom.Substring(nom.Length - 3, 3);
         PERSONNEL p  = new PERSONNEL();
         p.CIN     = txtBox1.Text;
         p.NOM     = txtBox2.Text;
         p.PRENOM  = txtBox3.Text;
         p.ADRESSE = txtBox4.Text;
         p.NUMTEL  = int.Parse(txtBox5.Text);
         MessageBox.Show(ch);
         p.image = ch;
         File.Copy(textBox2.Text, Application.StartupPath + @"\images\" + ch);
         dc.PERSONNELs.InsertOnSubmit(p);
         dc.SubmitChanges();
         data_load();
         MessageBox.Show("Ajouter Avec Succes");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Beispiel #2
0
 partial void DeletePERSONNEL(PERSONNEL instance);
Beispiel #3
0
 partial void UpdatePERSONNEL(PERSONNEL instance);
Beispiel #4
0
 partial void InsertPERSONNEL(PERSONNEL instance);