Professional Documents
Culture Documents
comboBox1.DataSource = ctx.clients.ToList();
comboBox1.DisplayMember = "nom";
comboBox1.ValueMember = "id_c";
//comboBox1.DataSource = ado.das.client;
//comboBox1.DisplayMember = ado.das.client.nomColumn.ColumnName;
//comboBox1.ValueMember = ado.das.client.id_cColumn.ColumnName;
try
int id = int.Parse(comboBox1.SelectedValue.ToString());
client c = ctx.clients.Find(id);
lbphone.Text = c.telclient.ToString();
lb_nom.Text = c.nom.ToString();
catch { }
int id = int.Parse(comboBox1.SelectedValue.ToString());
res.C_id_cl = id;
res.date_res = Convert.ToDateTime(dateTimePicker1.Value.ToString());
if(radioButton1.Checked==true)
res.pensienCom = true;
if (radioButton2.Checked == true)
res.pensienCom = false;
ctx.reservations.Add(res);
MessageBox.Show("bien ajouter");