示例#1
0
        private void Supprimer_Cham()
        {
            BS_De.Position = 0;

            foreach (DataRow Dtr_De in DS_bd.Tables["De"].Rows)
            {
                if (DS_bd.Tables["De"].Rows[BS_De.Position]["NoCham"].ToString() == tb_Cham.Text)
                {
                    if (DS_bd.Tables["De"].Rows[BS_De.Position]["Attribuee"].ToString() == "0")
                    {
                        BS_Chambre.RemoveCurrent();
                        BS_Chambre.MoveFirst();

                        TA_Chambre.Update(DS_bd.Chambre);
                        TA_Ayant.Update(DS_bd.Ayant);
                    }
                    else
                    {
                        MessageBox.Show("La chambre est attribuée");
                    }
                    BS_De.Position += 1;
                }
                else
                {
                    BS_De.Position += 1;
                }
            }
            BS_De.Position = 0;
        }
示例#2
0
 private void button3_Click(object sender, EventArgs e)
 {
     BS_Chambre.MoveFirst();
 }
示例#3
0
 private void btn_premier_Click(object sender, EventArgs e)
 {
     BS_Chambre.MoveFirst();
 }