Beispiel #1
0
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            InputMoney im = new InputMoney();

            im.name.Text      = this.name.Content.ToString();
            im.name.IsEnabled = false;
            string u   = name.Content.ToString();
            double pri = UserPanelController.Handler().DBControllerByName(u).PrincipalRead();

            im.money.Text = pri.ToString();
            im.ShowDialog();
            double now = UserPanelController.Handler().DBControllerByName(u).NowMoneyRead();

            if (im.m == 0)
            {
                return;
            }
            if (pri - im.m > now)
            {
                MessageBox.Show("最低本金设置为:" + (pri - now).ToString());
                return;
            }
            this.pri.Content = "本金:" + im.m;
            UserPanelController.Handler().DBControllerByName(u).PrincipalChange(im.m - pri);
            MainWindow.ShowNotifyMessage("成功修改本金\n账户名:" + u + "本金:" + im.m);
        }
Beispiel #2
0
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            InputMoney im = new InputMoney();
            im.name.Text = this.name.Content.ToString();
            im.name.IsEnabled = false;
            string u = name.Content.ToString();
            double pri = UserPanelController.Handler().DBControllerByName(u).PrincipalRead();
            im.money.Text = pri.ToString();
            im.ShowDialog();
            double now = UserPanelController.Handler().DBControllerByName(u).NowMoneyRead();

            if (im.m == 0)
            {
                return;
            }
            if (pri - im.m > now)
            {
                MessageBox.Show("最低本金设置为:" + (pri - now).ToString());
                return;
            }
            this.pri.Content = "本金:" + im.m;
            UserPanelController.Handler().DBControllerByName(u).PrincipalChange(im.m - pri);
            MainWindow.ShowNotifyMessage("成功修改本金\n账户名:" + u + "本金:" + im.m);
        }