private void bfbtn_Eav_Click(object sender, EventArgs e)
        {
            Eav eav = new Eav();

            eav.Show();
            this.Hide();
        }
        private void bunifuImageButton3_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("Program Tamamen Kapatılacaktır", "Emin Misiniz ?", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                Eav eb = new Eav();
                this.Close();
                Application.Exit();
            }
        }
Exemple #3
0
        void LogInW()
        {
            connection = new SqlConnection("server=DESKTOP-RLBGONE\\SQLEXPRESS; Initial Catalog=libraryoto;Integrated Security=SSPI");
            command    = new SqlCommand();
            connection.Open();
            command.Connection  = connection;
            command.CommandText = "SELECT * FROM dbt_admin where kullanicino='" + bfmTxt_username.Text + "' AND sifre='" + bfmTxt_Password.Text + "'";
            dr = command.ExecuteReader();
            bool   conresult = dr.Read();
            string statu;

            if (conresult)
            {
                while (conresult)
                {
                    statu = dr["statu"].ToString();
                    if (statu == "1")
                    {
                        MainWindow mw = new MainWindow();
                        mw.Show();
                        this.Hide();
                        break;
                    }
                    else if (statu == "2")
                    {
                        LibPanel lp = new LibPanel();
                        lp.Show();
                        this.Hide();

                        break;
                    }
                    else if (statu == "3")
                    {
                        status = true;
                        Eav eav = new Eav();
                        eav.Show();
                        this.Hide();
                        break;
                    }
                }
            }
            else
            {
                MessageBox.Show("Hatalı Giriş Yaptınız");
            }
            connection.Close();
        }