Example #1
0
        private void btnKyt_Click(object sender, EventArgs e)
        {
            singletondSql sorgu = singletondSql.getinstance();

            if (txtName.Text != "" && txtAdres.Text != "" && txtEmail.Text != "" && txtUser.Text != "" && txtPass.Text != "")
            {
                label6.Text = DateTime.Now.ToString();
                sorgu.Insert(txtName, txtAdres, txtEmail, txtUser, txtPass, label6);
            }
            else
            {
                MessageBox.Show("Please fill in the blank fields", "Warning !", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            singletondSql sorgu = singletondSql.getinstance();

            try
            {
                lbltarih.Text = DateTime.Now.ToString();
                sorgu.Login(textBox1, textBox2, this);
            }
            catch (Exception)
            {
                MessageBox.Show("The database could not be reached.", "ERROR !", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }