예제 #1
0
        private void decommisioningDeviceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            Decommision s = new Decommision();

            s.Show();
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string combobox     = comboBox1.Text;
            string eth_address1 = "0x9Aa8694635b49D405D1E1bf8A9C9a26fDc1a987d";

            var privatekey1 = "87eeb49d97be2d1d338b46f27be26252802cade88ebdba741bde895332766d36";
            var url         = "http://127.0.0.1:7545";
            var account     = new Nethereum.Web3.Accounts.Account(privatekey1);
            var web31       = new Web3(account, url);
            var iot         = new Decommision();

            var balanceHandler2 = web31.Eth.GetContractQueryHandler <Decommision>();
            var balance2        = await balanceHandler2.QueryAsync <int>(contractaddress, iot);

            File.AppendAllText(@"C:\Users\C.z\source\repos\BlockChain Project\BlockChain Project\DeployedContract.txt", combobox);
            this.Hide();
            PatientMenu s = new PatientMenu();

            s.Show();
            MessageBox.Show("Device Decommision Successfuly");
        }