Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            home hm = new home();

            this.Hide();
            hm.Show();
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var dbn   = new DataClasses2DataContext();
            var query = from c in dbn.users
                        where c.username == textBox1.Text &&
                        c.pas == textBox2.Text
                        select c;

            foreach (var c in query)
            {
                bool ismodir;
                userid = c.id;
                // MessageBox.Show(c.ismodir);
                if (c.ismodir.Contains("yes"))
                {
                    //     MessageBox.Show("in yes");
                    ismodir = true;
                }
                else
                {
                    //     MessageBox.Show("in no");
                    ismodir = false;
                }
                this.Hide();
                home a = new home(userid, ismodir);
                a.Show();
                a.userid = userid;
            }
        }
Esempio n. 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            home ss = new home();

            ss.Show();
        }
Esempio n. 4
0
        private void button2_Click(object sender, EventArgs e)
        {
            var home = new home();

            MessageBox.Show("Logging you out.");
            home.Show();
            this.Hide();
        }
Esempio n. 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            String res;
            home   tr = new home();
            int    a, b, c = 0;

            a   = Convert.ToInt32(tr.bal);
            b   = Convert.ToInt32(textBox2.Text);
            c   = a - b;
            res = c + " ";

            MessageBox.Show("success!" + "\n" + "account no. " + textBox1.Text + "\n amount:" + textBox2.Text + "\n Current balance :" + res);
        }
Esempio n. 6
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == user && textBox2.Text == pass)
            {
                home frm = new home();

                //this.Close();
                frm.Show();
            }
            else
            {
                MessageBox.Show("Try again");
            }
        }
Esempio n. 7
0
        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection  con = new SqlConnection(@"Data Source=(LocalDB)\v11.0; AttachDbFilename=c:\users\dulanjali\documents\visual studio 2013\Projects\WindowsFormsApplication1\WindowsFormsApplication1\lodindb.mdf;Integrated Security=True;Connect Timeout=30");
            string         Qry = "select * from login where Username='******' and Password = '******'";
            SqlDataAdapter sda = new SqlDataAdapter(Qry, con);
            DataTable      dt  = new DataTable();

            try
            {
                sda.Fill(dt);
            }
            catch (Exception)
            {
                throw;
            }
            if (string.IsNullOrEmpty(textusername.Text))
            {
                MessageBox.Show("Please enter your Username!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                textusername.Focus();
                return;
            }

            if (string.IsNullOrEmpty(textpassword.Text))
            {
                MessageBox.Show("Please enter your Password!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                textpassword.Focus();
                return;
            }

            if (dt.Rows.Count == 1)
            {
                MessageBox.Show("UserName and Password are correct", "Message", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                home hm = new home();
                this.Hide();


                hm.Show();
            }
            else
            {
                MessageBox.Show("UserName and Password are Incorrect", "Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            textusername.Clear();
            textpassword.Clear();
        }
Esempio n. 8
0
        private void button1_Click(object sender, EventArgs e)
        {
            string[] lines = File.ReadAllLines(@"C:\Users\MAHE\documents\visual studio 2015\Projects\WindowsFormsApplication1\WindowsFormsApplication1\user.txt");

            for (int i = 0; i < lines.Length; i++)
            {
                line = lines[i];
                if (line.Equals(login_name))
                {
                    i = lines.Length;

                    if (flag == 1)
                    {
                        flag = 0; f = 1;
                        MessageBox.Show("Authenticated for player 1, now login/signup for player 2.");
                        var home = new home();
                        home.Show();
                        this.Hide();
                    }
                    else
                    {
                        MessageBox.Show("Authenticated for both players, now let the games begin");
                        var khelshuru = new khelshuru();
                        f = 0;
                        khelshuru.Show();
                        this.Hide();
                    }
                }
            }
            if (f == 1 && flag != 0)
            {
                MessageBox.Show("Not Authenticated,try again");
                var login = new login();
                login.Show();
                this.Hide();
            }
        }
Esempio n. 9
0
 private void button5_Click(object sender, EventArgs e)
 {
     Form f = new home();
     f.Show();
 }
Esempio n. 10
0
        private void button5_Click(object sender, EventArgs e)
        {
            Form f = new home();

            f.Show();
        }