Ejemplo n.º 1
0
        static void Main()
        {
            ReadFile();

            // After the file is read and the data is added to it respective array
            // and the calculations are completed.
            // Next, the elements that are money values are converted
            // before they are displayed.
            emp1.AnnualTax();
            emp1.AnnualNetPay();
            em1[4] = emp1.pay.ToString("C");
            em1[8] = emp1.atax.ToString("C");
            em1[9] = emp1.anet.ToString("C");

            emp2.AnnualTax();
            emp2.AnnualNetPay();
            em2[4] = emp2.pay.ToString("C");
            em2[8] = emp2.atax.ToString("C");
            em2[9] = emp2.anet.ToString("C");

            emp3.AnnualTax();
            emp3.AnnualNetPay();
            em3[4] = emp3.pay.ToString("C");
            em3[8] = emp3.atax.ToString("C");
            em3[9] = emp3.anet.ToString("C");

            emp4.AnnualTax();
            emp4.AnnualNetPay();
            em4[4] = emp4.pay.ToString("C");
            em4[8] = emp4.atax.ToString("C");
            em4[9] = emp4.anet.ToString("C");

            Form1 myform;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            myform = new Form1();
            Application.Run(myform);
        }
Ejemplo n.º 2
0
        static void Main()
        {
            ReadFile();

            Emp1.AnnualTax();
            Emp1.AnnualNetPay();
            em1[4] = Emp1.pay.ToString("C");
            em1.Add(Emp1.a_tax.ToString("C"));
            em1.Add(Emp1.a_net.ToString("C"));

            Emp2.AnnualTax();
            Emp2.AnnualNetPay();
            em2[4] = Emp2.pay.ToString("C");
            em2.Add(Emp2.a_tax.ToString("C"));
            em2.Add(Emp2.a_net.ToString("C"));

            Emp3.AnnualTax();
            Emp3.AnnualNetPay();
            em3[4] = Emp3.pay.ToString("C");
            em3.Add(Emp3.a_tax.ToString("C"));
            em3.Add(Emp3.a_net.ToString("C"));

            Emp4.AnnualTax();
            Emp4.AnnualNetPay();
            em4[4] = Emp4.pay.ToString("C");
            em4.Add(Emp4.a_tax.ToString("C"));
            em4.Add(Emp4.a_net.ToString("C"));



            Form1 myform;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            myform = new Form1();
            Application.Run(myform);
        }