private void create_Click(object sender, RoutedEventArgs e)
        {
            double amount       = Double.Parse(number.Text);
            string inOrOut      = selector.SelectedValue.ToString();
            string checkmessage = "";

            if (number.Text == "0.00")
            {
                checkmessage += "请填写金额!\n";
            }
            if (source == "")
            {
                checkmessage += "请选择标签!\n";
            }
            if (details.Text == "")
            {
                checkmessage += "请添加描述信息!\n";
            }
            if (checkmessage != "")
            {
                var i = new MessageDialog(checkmessage).ShowAsync();
                return;
            }
            incomesList.addIncome(kind, details.Text, amount, OfficialDate, inOrOut);
            App.upload();
            Frame.Navigate(typeof(Details));
        }
Example #2
0
        private void createBtn_Click(object sender, RoutedEventArgs e)
        {
            string result = CheckItemValidation();

            if (result != "")
            {
                var message = new MessageDialog(result).ShowAsync();
            }
            else
            {
                goalsList.addGoal(name.Text, Convert.ToDouble(price.Text), OfficialDate, description.Text, imageName, bitmapImageSource);
                App.upload();
                Frame.Navigate(typeof(GoalsPage));
            }
        }
Example #3
0
 private void delete_PointerPressed(object sender, PointerRoutedEventArgs e)
 {
     goalsList.removeGoal((sender as SymbolIcon).Tag.ToString());
     App.upload();
     Frame.Navigate(typeof(GoalsPage));
 }