Esempio n. 1
0
        private void AdminPanel_Load(object sender, EventArgs e)
        {
            comboBox1.SelectedIndex = 0;
            label1.Visible          = false;
            LoginQueries a = new LoginQueries();

            a.Displaydb(listView1);
        }
Esempio n. 2
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         if (textBox1.Text != "" && textBox2.Text == textBox3.Text)
         {
             LoginQueries a = new LoginQueries();
             a.Updatedb(textBox1.Text, textBox2.Text, comboBox1.Text);
             a.Displaydb(listView1);
             button2_Click(sender, e);
         }
         else
         {
             MessageBox.Show("Select an Entry from List to Update", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Check it again!");
     }
 }
Esempio n. 3
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            try
            {
                if (textBox2.Text == textBox3.Text && textBox2.Text != "" && textBox1.Text != "")
                {
                    LoginQueries a = new LoginQueries();
                    a.Insertdb(textBox1.Text, textBox2.Text, comboBox1.Text);
                    a.Displaydb(listView1);
                    button2_Click(sender, e);
                }

                if (textBox1.Text == String.Empty || textBox2.Text == String.Empty)
                {
                    MessageBox.Show("Please fill required fields", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }