Пример #1
0
        private void Reportbutton_Click(object sender, EventArgs e)
        {
            double PV      = double.Parse(貸款金額應繳金額textBox.Text);
            double NPer    = double.Parse(分期數textBox.Text);
            double Rate    = double.Parse(利息textBox.Text);
            double answera = Financial.Pmt(
                Rate * 0.01 / 12,
                NPer,
                -PV
                );
            FrmLoanReport f2 = new FrmLoanReport();



            FrmLoanReport.anl1 = (answera.ToString("F0"));
            double answerb = Financial.Pmt(
                Rate * 0.01 / 12,
                NPer,
                -PV
                ) * NPer;

            FrmLoanReport.anl2 = (answerb.ToString("F0"));
            FrmLoanReport.anl5 = 貸款金額應繳金額textBox.Text;
            FrmLoanReport.anl3 = 分期數textBox.Text;
            FrmLoanReport.anl4 = 利息textBox.Text;
            f2.Show();
        }
Пример #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            double PV      = double.Parse(textBox1.Text);
            double NPer    = double.Parse(textBox2.Text);
            double Rate    = double.Parse(textBox3.Text);
            double answera = Financial.Pmt(
                Rate * 0.01 / 12,
                NPer,
                -PV
                );
            FrmLoanReport f2 = new FrmLoanReport();



            FrmLoanReport.anl1 = (answera.ToString("F0"));
            double answerb = Financial.Pmt(
                Rate * 0.01 / 12,
                NPer,
                -PV
                ) * NPer;

            FrmLoanReport.anl2 = (answerb.ToString("F0"));
            FrmLoanReport.anl5 = textBox1.Text;
            FrmLoanReport.anl3 = textBox2.Text;
            FrmLoanReport.anl4 = textBox3.Text;
            f2.Show();
        }
Пример #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            FrmLoanReport f = new FrmLoanReport();

            f.TopLevel        = false;
            f.Dock            = DockStyle.Fill;
            f.FormBorderStyle = FormBorderStyle.Sizable;

            f.Show();

            this.splitContainer3.Panel1.Controls.Clear();
            this.splitContainer3.Panel1.Controls.Add(f);
            this.textBox1.Text = f.Text;
        }
Пример #4
0
        private void button2_Click(object sender, EventArgs e)
        {
            FrmLoanReport f = new FrmLoanReport();

            f.TopLevel        = false;
            f.Dock            = DockStyle.Fill;
            f.FormBorderStyle = FormBorderStyle.Sizable;

            f.Show();

            this.splitContainer3.Panel1.Controls.Clear();
            this.splitContainer3.Panel1.Controls.Add(f);

            StreamReader sr = new StreamReader(@"02.FrmLoanReport", Encoding.Default);

            this.textBox1.Text = sr.ReadToEnd();
            sr.Close();
        }