Ejemplo n.º 1
0
        private void dn_Click(object sender, EventArgs e)
        {
            connectDatabase();

            sqlCmd = new SqlCommand("SELECT MANHANVIEN FROM NHANVIEN", sqlCon);

            SqlDataReader Reader = sqlCmd.ExecuteReader();

            if (Reader.HasRows)
            {
                while (Reader.Read())
                {
                    if (Reader[0].ToString() != "" && this.maNV.Text == Reader[0].ToString())
                    {
                        if (Reader[0].ToString().StartsWith("LT"))
                        {
                            sqlCon.Close();
                            LeTan letan = new LeTan();
                            letan.Show();

                            break;
                        }
                    }
                }
                Home home = (Home)this.Parent;

                home.Close();
            }
        }
Ejemplo n.º 2
0
        private void ok_Click(object sender, EventArgs e)
        {
            Home home = (Home)this.Parent;

            home.Close();
        }