Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {

           
            admin.adminId = adminid.Text;
            admin.adminPassword = adminpassword.Text;

            try
            {

                if (adlogin.AdminValid(admin))
                {
                    AdminManage.AdminMain am = new AdminManage.AdminMain(admin);
                    am.Show();
                    this.Parent.Parent.Visible = false;


                }
                else
                {

                    MessageBox.Show(" Wrong Credentials");
                }

            }

            catch(Exception exc)
            {

                MessageBox.Show("Error "+exc.Message);
            }
            }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            admin.adminId       = adminid.Text;
            admin.adminPassword = adminpassword.Text;

            try
            {
                if (adlogin.AdminValid(admin))
                {
                    AdminManage.AdminMain am = new AdminManage.AdminMain(admin);
                    am.Show();
                    this.Parent.Parent.Visible = false;
                }
                else
                {
                    MetroMessageBox.Show(this, "Please Check Your Credentials", "Hey there!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }

            catch (Exception exc)
            {
                MetroMessageBox.Show(this, $"Something went wrong {exc.Message}", "Oops!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            admin.adminId       = adminid.Text;
            admin.adminPassword = adminpassword.Text;

            try
            {
                if (adlogin.AdminValid(admin))
                {
                    AdminManage.AdminMain am = new AdminManage.AdminMain(admin);
                    am.Show();
                    this.Parent.Parent.Visible = false;
                }
                else
                {
                    MessageBox.Show(" Wrong Credentials");
                }
            }

            catch (Exception exc)
            {
                MessageBox.Show("Error " + exc.Message);
            }
        }