Пример #1
0
        public TaxResultForm()
        {
            InitializeComponent();

            this.count = TaxpayerList.MainTaxpayerData.Count;
            TaxpayerData data = TaxpayerList.MainTaxpayerData[index];

            this.tfFullName.Text       = (data.GetFirstName() + " " + data.GetLastName());
            this.tfSSN2.Text           = data.GetSSN();
            this.tfAdjustedGross.Text  = data.GetAdjustedGross().ToString("c2");
            this.tfAmountCalc.Text     = data.GetTaxCalc().ToString("c2");
            this.tfAmountWithheld.Text = data.GetFedTaxWithheld().ToString("c2");
            this.tfPenalty.Text        = data.GetPenalty().ToString("c2");
            this.tfTaxOwed.Text        = data.GetTaxOwed().ToString("c2");
            this.tfRefund.Text         = data.GetRefund().ToString("c2");
            index++;
        }
Пример #2
0
        private void btNextData_Click(object sender, EventArgs e)
        {
            if (index < count)
            {
                TaxpayerData data = TaxpayerList.MainTaxpayerData[index];
                this.tfFullName.Text       = (data.GetFirstName() + " " + data.GetLastName());
                this.tfSSN2.Text           = data.GetSSN();
                this.tfAdjustedGross.Text  = data.GetAdjustedGross().ToString("c2");
                this.tfAmountCalc.Text     = data.GetTaxCalc().ToString("c2");
                this.tfAmountWithheld.Text = data.GetFedTaxWithheld().ToString("c2");
                this.tfPenalty.Text        = data.GetPenalty().ToString("c2");
                this.tfTaxOwed.Text        = data.GetTaxOwed().ToString("c2");
                this.tfRefund.Text         = data.GetRefund().ToString("c2");

                index++;
            }
            else
            {
                //show summary of all taxpayer in third form
                Form summaryForm = new SummaryForm();
                summaryForm.ShowDialog();
            }
        }