private void btnLogin_Click(object sender, EventArgs e)
        {
            con.DataGet("Select * from DBUser where UserName ='******'and Password ='******'");
            DataTable DT = new DataTable();

            con.sda.Fill(DT);

            if (DT.Rows.Count > 0)
            {
                type = DT.Rows[0][5].ToString().Trim();

                if (type == "Admin")
                {
                    this.Hide();
                    MDIControl MDI = new MDIControl();
                    MDI.Show();
                }
                else
                {
                    this.Hide();
                    Guest.FormGuestInfo MDIA = new Guest.FormGuestInfo();
                    MDIA.Show();
                }
            }
            else
            {
                MetroFramework.MetroMessageBox.Show(this, "Invalid user name and password.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btnLogin_Click(object sender, EventArgs e)
        {
            con.DataGet("Select * from DBUser where UserName ='******'and Password ='******'");
            DataTable DT = new DataTable();

            con.sda.Fill(DT);

            if (DT.Rows.Count > 0)
            {
                this.Hide();
                MDIControl MDI = new MDIControl();
                MDI.Show();
            }
            else
            {
                MessageBox.Show("Invalid user name and password.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }