Exemplo n.º 1
0
 private void pictureBox2_Click(object sender, EventArgs e)
 {
     try
     {
         if (passwordtxtbox.Text.Length == 0 || username_txtbox.Text.Length == 0)
         {
             MessageBox.Show("Enter User name and Passward", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
         else
         if (passwordtxtbox.Text.Equals(DataBaseManager.dbmanager.GetPassword(username_txtbox.Text.ToString())))
         {
             this.Hide();
             BookingSystemForm bookingSystem = new BookingSystemForm();
             bookingSystem.ShowDialog();
         }
         else
         {
             MessageBox.Show("User name or Password is incorrect", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
 private void BookingSystemForm_Load(object sender, EventArgs e)
 {
     pictureBox2.Visible = false;
     _obj = this;
 }