//SELECTION ---------------------------------------------------------------- // VALIDER CONGE ----------------------------------------------------------- private void button1_Click(object sender, EventArgs e) { try { if (MessageBox.Show("voulez-vous validez ce congé ?", "validé!", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { CONGE c = new CONGE(); var q = (from x in dc.CONGEs where x.CIN == textBox1.Text && x.DATE_CONGE == DateTime.Parse(textBox2.Text.ToString()) select x).Single(); q.DUREE = int.Parse(textBox3.Text); q.ETAT = "EN COURS"; dc.SubmitChanges(); radioButton3_CheckedChanged(sender, e); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
partial void DeleteCONGE(CONGE instance);
partial void UpdateCONGE(CONGE instance);
partial void InsertCONGE(CONGE instance);
private void detach_CONGEs(CONGE entity) { this.SendPropertyChanging(); entity.PERSONNEL = null; }
private void attach_CONGEs(CONGE entity) { this.SendPropertyChanging(); entity.PERSONNEL = this; }