Example #1
0
        protected void Widthdrawl_Click(object sender, EventArgs e)
        {
            UserTableAdapters.UsersTableAdapter utp = new UserTableAdapters.UsersTableAdapter();
            var result     = utp.GetUserById(user.Id);
            var newBalance = result[0].Balance - int.Parse(WithdrawlBox.Text);

            utp.UpdateBalance(newBalance, user.Id);
            user.Balance = newBalance;
            Response.Redirect("Default.aspx");
        }
Example #2
0
        protected void nwcPaymentButton_Click(object sender, EventArgs e)
        {
            var amount = int.Parse(nwcPayment.Text);

            UserTableAdapters.UsersTableAdapter uta = new UserTableAdapters.UsersTableAdapter();
            var result     = uta.GetUserById(user.Id);
            var newBalance = result[0].Balance - amount;

            NWCServices.NWCServiceSoapClient nwcsoap = new NWCServices.NWCServiceSoapClient();
            var nwcnewBalance = nwcsoap.GetUserBalance() + amount;

            nwcsoap.updateBalance(user.Id, nwcnewBalance);
            uta.UpdateBalance(newBalance, user.Id);
            user.Balance          = newBalance;
            GV.NwcUser["balance"] = nwcnewBalance;
        }
Example #3
0
        protected void jpsPaymentButton_Click(object sender, EventArgs e)
        {
            var amount = int.Parse(jpsPayment.Text);

            UserTableAdapters.UsersTableAdapter uta = new UserTableAdapters.UsersTableAdapter();
            var result     = uta.GetUserById(user.Id);
            var newBalance = result[0].Balance - amount;

            JPSService.JPSServiceSoapClient jpsopap = new JPSService.JPSServiceSoapClient();

            var jpsnewBalance = jpsopap.GetUserBalance() + amount;

            jpsopap.updateBalance(user.Id, jpsnewBalance);
            uta.UpdateBalance(newBalance, user.Id);
            user.Balance          = newBalance;
            GV.JpsUser["balance"] = jpsnewBalance;
        }