コード例 #1
0
        private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            MyAccount accnt = new MyAccount();

            accnt.Show();
        }
コード例 #2
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            int amnt = 0;

            amnt = int.Parse(addMoney.Text);
            USER cust = context.USERs.Single(c => c.USER_ID == Login.Id);

            cust.Balance -= amnt;

            context.SubmitChanges();
            MessageBox.Show("Adding $" + amnt + " to your account balance");
            this.Refresh();
            this.Hide();
            MyAccount accnt = new MyAccount();

            accnt.Show();
        }