Beispiel #1
0
        private void servicesAnnuler_Click(object sender, EventArgs e)
        {
            Bienvenue monMenu = new Bienvenue();

            monMenu.Show();
            this.Close();
        }
Beispiel #2
0
        private void demandeAnnuler_Click(object sender, EventArgs e)
        {
            this.Close();
            Bienvenue monMenu = new Bienvenue();

            monMenu.Show();
        }
Beispiel #3
0
        private void recuValider_Click(object sender, EventArgs e)
        {
            this.Close();
            Bienvenue monMenu = new Bienvenue();

            monMenu.Show();
        }
Beispiel #4
0
        private void archivesEnvoyer_Click(object sender, EventArgs e)
        {
            this.Close();
            Bienvenue monMenu = new Bienvenue();

            monMenu.Show();
        }
Beispiel #5
0
        private void sortiesSortie_Click(object sender, EventArgs e)
        {
            this.Close();
            Bienvenue monMenu = new Bienvenue();

            monMenu.Show();
        }
Beispiel #6
0
        private void home_Click(object sender, EventArgs e)
        {
            this.Close();
            selection.Width = home.Width;
            selection.Left  = home.Left;
            Bienvenue monMenu = new Bienvenue();

            monMenu.Show();
        }
Beispiel #7
0
        private void pertesValider_Click(object sender, EventArgs e)
        {
            Perte p = new Perte();

            p.Article = pertesArticles1.Text;
            C.insertPertes(p);
            Bienvenue monMenu = new Bienvenue();

            monMenu.Show();
            this.Close();
        }
Beispiel #8
0
        private void hotelValider_Click(object sender, EventArgs e)
        {
            hotel h = new hotel();

            h.Nom     = hotelNom1.Text;
            h.Contact = Convert.ToInt32(hotelContacts1.Text);
            h.Adresse = hotelAdresse1.Text;
            h.Mail    = hotelMail1.Text;
            h.Site    = hotelWeb1.Text;
            h.Chambre = Convert.ToInt32(hotelChambre1.Text);
            h.Logo    = hotelLogo1.Text;
            C.insertHotel(h);
            this.Close();
            Bienvenue monMenu = new Bienvenue();

            monMenu.Show();
        }
 private void authValider_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(authLogin1.Text))
     {
         MessageBox.Show("Please enter your username and password", "Message", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         authLogin1.Focus();
         authLogin1.Text = "";
         authPass1.Text  = "";
         return;
     }
     try
     {
         AppDataTableAdapters.AdministrateurTableAdapter admin = new AppDataTableAdapters.AdministrateurTableAdapter();
         AppData.AdministrateurDataTable dt = admin.GetDataByUserPass(authLogin1.Text, authPass1.Text);
         if (dt.Rows.Count > 0)
         {
             Bienvenue monMenu = new Bienvenue();
             monMenu.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show("Your username or password is incorrect", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
             authLogin1.Text = "";
             authPass1.Text  = "";
             return;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
         authLogin1.Text = "";
         authPass1.Text  = "";
         return;
     }
 }