private void btnShowMembers_Click(object sender, EventArgs e)
        {
            AdminProfile ap = new AdminProfile();

            this.Hide();
            ViewMembers vm = new ViewMembers();

            vm.Show();
        }
        private void btnViewBooks_Click(object sender, EventArgs e)
        {
            AdminProfile ap = new AdminProfile();

            this.Hide();
            ViewBooks vb = new ViewBooks();

            vb.Show();
        }
        private void btnAddBook_Click(object sender, EventArgs e)
        {
            AdminProfile ap = new AdminProfile();

            this.Hide();
            AddBook abs = new AddBook();

            abs.Show();
        }
        private void btnAddRole_Click(object sender, EventArgs e)
        {
            AdminProfile ap = new AdminProfile();

            this.Hide();
            Register re = new Register();

            re.Show();
        }
        private void btnHomePage_Click(object sender, EventArgs e)
        {
            ViewMembers vb = new ViewMembers();

            this.Hide();
            AdminProfile ap = new AdminProfile();

            ap.Show();
        }
示例#6
0
        private void btnCancel_Click(object sender, EventArgs e)
        {
            AddBook ap = new AddBook();

            this.Close();
            AdminProfile ab = new AdminProfile();

            ab.Show();
        }
示例#7
0
        private void btnCancel_Click(object sender, EventArgs e)
        {
            Register r = new Register();

            this.Hide();
            AdminProfile ap = new AdminProfile();

            ap.Show();
        }
示例#8
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();
                }
            }
        }