Exemplo n.º 1
0
        private void button12_Click(object sender, EventArgs e)
        {
            HomeForm hf = new HomeForm();

            this.Hide();
            hf.ShowDialog();
            this.Close();
        }
Exemplo n.º 2
0
        private void lgnBtn_Click(object sender, EventArgs e)
        {
            DataSet.ReturnValues rv = new DataSet.ReturnValues();

            rv = DataSet.getUserID(loginTB.Text, passwordTB.Text);
            if (rv.usrId != 0)
            {
                Cursor.Current = Cursors.WaitCursor;
                WindowsFormsApplication5.Properties.Settings.Default.drId     = rv.usrId;
                WindowsFormsApplication5.Properties.Settings.Default.drAccess = rv.usrAccess;
                WindowsFormsApplication5.Properties.Settings.Default.drName   = loginTB.Text;
                HomeForm f1 = new HomeForm();
                this.Hide();
                f1.ShowDialog();
                Cursor.Current = Cursors.Default;
                this.Close();
            }
            else
            {
                MessageBox.Show("Wrong Username or Password");
            }
        }