Esempio n. 1
0
        private void login_Click(object sender, EventArgs e)
        {
            string         query = "Select * from login Where username = '******' and password = '******'";
            SqlDataAdapter sda   = new SqlDataAdapter(query, sqlcon);
            DataTable      dtbl  = new DataTable();

            sda.Fill(dtbl);
            if (dtbl.Rows.Count == 1)
            {
                frm_main objFrmMain = new frm_main();
                this.Hide();
                objFrmMain.Show();
            }

            else
            {
                MessageBox.Show("اسم المستخدم او كلمة المرور غير صحيحة ", "رسالة", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 2
0
        private void tileItem2_ItemClick_1(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
        {
            frm_main frm = new frm_main();

            frm.Show();
        }