示例#1
0
        public SqlParameter SqlAddMac()
        {
            sqlConnection.Open();
            cmd = new SqlCommand("INSERT INTO user_Codes(Mac) VALUES(@Mac)", sqlConnection);
            var add = cmd.Parameters.AddWithValue("@Mac", InternetAndSecurity.ShowNetworkInterfaces());

            cmd.ExecuteNonQuery();
            return(add);
        }
示例#2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            //Form1 form = new Form1();
            //Login login = new Login();

            InternetAndSecurity internet = new InternetAndSecurity();

            internet.Run();

            SQL.SqlConnect();



            Login         login = new Login();
            Formelsamling form  = new Formelsamling();

            TreeNode[] treeNodes = new TreeNode[] { new MathFormulary().treeNode, new PhysicsFormulary().treeNode, };
            form.funcList.Nodes.AddRange(treeNodes);
            Application.Run(login);
            string email = login.EmailField.Text.ToLower();

            if (SQL.SqlReader(email, email, "Mac", SQL.sqlConnection))
            {
                Print("yeet");
            }
            else
            {
                Print("no yeet");
            }



            /*
             * switch (form.funcList.SelectedNode.ToString())
             * {
             *  case "cirkelomkreds":
             *
             *      break;
             *
             *
             * }*/
        }