Exemplo n.º 1
0
 private void pepButton1_Click(object sender, EventArgs e)
 {
     try
     {
         MySqlConnection myDataBase = DBUtils.GetDBConnection(pepTextbox1.Text, pepTextbox2.Text);
         myDataBase.Open();
         Customer obj = new Customer(myDataBase, this, pepTextbox1.Text, pepTextbox2.Text);
         obj.Show();
         this.Visible = false;
     }
     catch (Exception ex)
     {
         CustomPopup obj = new CustomPopup("Unable to connect to the database : " + ex.Message);
         obj.Show(this);
     }
     pepTextbox1.Text = "";
     pepTextbox2.Text = "";
 }
 private void BtnShowPopup_Clicked(object sender, EventArgs e)
 {
     CustomPopup.Show();
 }