private void btn_back_Click(object sender, EventArgs e)
        {
            User_Home ah = new User_Home(true);

            ah.Show();
            this.Visible = false;
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if ((txt_username.Text == "" || txt_username.Text == "Enter Your Username") && (txt_password.Text == "" || txt_password.Text == "Enter Your Password"))
            {
                MessageBox.Show("Please Enter Username and Password");
            }
            else if (txt_username.Text == "" || txt_username.Text == "Enter Your Username")
            {
                MessageBox.Show("Please Enter Username");
            }
            else if (txt_password.Text == "" || txt_password.Text == "Enter Your Password")
            {
                MessageBox.Show("Please Enter Password");
            }
            else if (txt_username.Text != "Enter Your Username" && txt_password.Text != "Enter Your Password")
            {
                SqlCommand cmd;
                Boolean    isAdmin = false;
                try
                {
                    cmd     = new SqlCommand("Select * from Login_Details where username = @username and password = @password and designation = 'admin' ", con);
                    isAdmin = true;
                }
                catch (Exception err)
                {
                    Console.WriteLine(err.Message);
                    cmd     = new SqlCommand("Select * from Login_Details where username = @username and password = @password ", con);
                    isAdmin = false;
                }
                cmd.Parameters.AddWithValue("@username", txt_username.Text);
                cmd.Parameters.AddWithValue("@password", txt_password.Text);
                if (con.State == ConnectionState.Closed)
                {
                    con.Open();
                }

                SqlDataReader dr = cmd.ExecuteReader();

                if (chkbx_isAdmin.Checked == true && isAdmin == false)
                {
                    MessageBox.Show("You are not Admin !!!");
                }
                else if (dr.HasRows)
                {
                    //MessageBox.Show(isAdmin.ToString());
                    User_Home ah = new User_Home(isAdmin);
                    this.Visible = false;
                    ah.Show();
                }
                else
                {
                    MessageBox.Show("Invalid Username or Password !!!");
                }

                con.Close();
            }
            else
            {
                MessageBox.Show("Please Enter Username and Password");
            }
        }