示例#1
0
        private void newAccountToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            newAccount newacc = new newAccount();

            newacc.MdiParent = this;
            newacc.Show();
        }
示例#2
0
        private void detailsbutton_Click(object sender, EventArgs e)
        {
            banking_dbEntities context = new banking_dbEntities();
            newAccount         acc     = new newAccount();
            Deposit            dp      = new Deposit();

            dp.Date       = datelbl.Text;
            dp.AccountNo  = Convert.ToDecimal(acctxt.Text);
            dp.Name       = nametxt.Text;
            dp.OldBalance = Convert.ToDecimal(balancetxt.Text);
            dp.Mode       = comboBox1.SelectedItem.ToString();
            dp.DipAmount  = Convert.ToDecimal(depamounttxt.Text);
            context.Deposit.Add(dp);
            context.SaveChanges();
            decimal b    = Convert.ToDecimal(acctxt.Text);
            var     item = (from u in context.userAccount where u.Account_No == b select u).FirstOrDefault();

            item.balance = item.balance + Convert.ToDecimal(depamounttxt.Text);
            context.SaveChanges();
            MessageBox.Show("Deposit Money Sucessfully");
        }