Esempio n. 1
0
        private void lnkBack_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Designer designer = Designer.GetInstance();

            designer.Show();
            this.Hide();
        }
Esempio n. 2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            Service1 s = new Service1();
            bool     valid;
            bool     check;

            if (rbtnDesigner.Checked)
            {
                s.LoginDesigner(txtUsernsme.Text, txtPassword.Text, out valid, out check);
                if (valid)
                {
                    MessageBox.Show("logged in");
                    Designer d = Designer.GetInstance();
                    d.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("invalid");
                }
            }
            else if (rbtnAdmin.Checked)
            {
                s.LoginAdmin(txtUsernsme.Text, txtPassword.Text, out valid, out check);
                if (valid)
                {
                    MessageBox.Show("logged in");
                    Admin d = Admin.GetInstance();
                    d.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("invalid");
                }
            }
            else
            {
                MessageBox.Show("Select Admin or Designer");
            }
        }