Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            MemberPage mp = new MemberPage();

            mp.Show();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            //going back to home page
            this.Close();
            MemberPage mp = new MemberPage();

            mp.Show();
        }
Esempio n. 3
0
        private void BtnHome_Click(object sender, EventArgs e)
        {
            //going back to home
            this.Hide();
            MemberPage mp = new MemberPage();

            mp.Show();
        }
Esempio n. 4
0
        /**
         * Name:Harsh patel
         * Description: this below even authiticate users
         * */
        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (validateMe())
            {
                string email    = txtEmail.Text.Trim();
                string password = txtPassword.Text.Trim();
                int    role     = ddlRole.SelectedIndex;

                tblLogin = checkLogin.GetDataByLogin(email, password, role);

                if (tblLogin.Count == 1)
                {
                    Program.UserID = email;
                    MessageBox.Show("Welcome " + email);
                    LoginForm f1 = new LoginForm();
                    this.Hide();
                    if (ddlRole.SelectedIndex == 1)
                    {
                        AdminProfile ap = new AdminProfile();
                        ap.Show();
                    }
                    else if (ddlRole.SelectedIndex == 2)
                    {
                        WindowsFormsApp1.LibrarianPage librarianPage = new WindowsFormsApp1.LibrarianPage();
                        librarianPage.Show();
                    }
                    else if (ddlRole.SelectedIndex == 3)
                    {
                        // Open Librarian Members/Students Page
                        MemberPage mp = new MemberPage();
                        mp.Show();
                    }
                }
                else
                {
                    lblErrorMsg.Text      = "UserName or Password not correct.. Please Try Again !!";
                    lblErrorMsg.ForeColor = System.Drawing.Color.Red;
                    txtEmail.Clear();
                    txtPassword.Clear();
                    ddlRole.SelectedIndex = 0;
                    txtEmail.Focus();
                }
            }
        }