private void btn_Login_GV_Click(object sender, EventArgs e)
        {
            bool checkVal = CheckValidateLogin(cmb_Brand_GV.SelectedIndex, txt_UserName.Text, txt_Password.Text);

            if (!checkVal)
            {
                return;
            }

            //Start login
            Program.mlogin = txt_UserName.Text; Program.password = txt_Password.Text;
            if (Program.KetNoi() == 0)
            {
                return;
            }

            Program.mChinhanh = ((DataRowView)cmb_Brand_GV.SelectedItem).Row.ItemArray[0].ToString();

            Program.mloginDN   = Program.mlogin;
            Program.passwordDN = Program.password;
            string strLenh = "EXEC SP_THONGTINDANGNHAPGV '" + Program.mloginDN + "'";

            Program.myReader = SqlRequestFunction.ExecSqlDataReader(strLenh);
            if (Program.myReader == null)
            {
                return;
            }
            Program.myReader.Read();


            Program.username = Program.myReader.GetString(0);     // Lay user name
            if (Convert.IsDBNull(Program.username))
            {
                MessageBox.Show("Giáo viên không tồn tại.", "", MessageBoxButtons.OK);
                return;
            }
            Program.mHoten = Program.myReader.GetString(1);
            Program.mGroup = Program.myReader.GetString(2);
            Program.myReader.Close();
            Program.conn.Close();
            MessageBox.Show("Nhân viên - Nhóm : " + Program.mHoten + " - " + Program.mGroup
                            , "Đăng nhập thành công!"
                            , MessageBoxButtons.OK, MessageBoxIcon.Information);


            //Application.Run(new Frm_TN_CSDLPT());
            //this.Dispose();
            Frm_TN_CSDLPT frm_Tn_csdlpt = new Frm_TN_CSDLPT();

            frm_Tn_csdlpt.Show();
            //this.Visible = false;
        }
        private void btn_Login_SV_Click(object sender, EventArgs e)
        {
            bool checkVal = CheckValidateLogin(cmb_Brand_SV.SelectedIndex, txt_StudentCode.Text);

            if (!checkVal)
            {
                return;
            }

            //Start login
            Program.studentCode = txt_StudentCode.Text;
            Program.mlogin      = "******"; Program.password = "******";
            if (Program.KetNoi() == 0)
            {
                return;
            }

            Program.mChinhanh = ((DataRowView)cmb_Brand_SV.SelectedItem).Row.ItemArray[0].ToString();

            Program.mloginDN   = Program.mlogin;
            Program.passwordDN = Program.password;
            string strLenh = "EXEC SP_THONGTINDANGNHAPSV '" + Program.studentCode + "'";

            Program.myReader = SqlRequestFunction.ExecSqlDataReader(strLenh);
            if (Program.myReader == null)
            {
                return;
            }
            Program.myReader.Read();


            Program.username = Program.myReader.GetString(0);     // Lay name
            if (Convert.IsDBNull(Program.username))
            {
                MessageBox.Show("Sinh viên không tồn tại.", "", MessageBoxButtons.OK);
                return;
            }
            Program.mHoten = Program.myReader.GetString(1);
            Program.mGroup = Program.myReader.GetString(2);
            Program.myReader.Close();
            Program.conn.Close();
            MessageBox.Show("Sinh Viên " + Program.mHoten
                            , "Đăng nhập thành công!"
                            , MessageBoxButtons.OK
                            , MessageBoxIcon.Information);

            Frm_TN_CSDLPT frm_Tn_csdlpt = new Frm_TN_CSDLPT();

            frm_Tn_csdlpt.Show();
        }