コード例 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Manager");
            Manager mg = new Manager("Testing", "Deepak", 31, 10000);

            Console.WriteLine(mg.Name + "   " + mg.Basic);
            Console.WriteLine("Total sal : " + mg.CalcNetSalary());
            Console.WriteLine("----------------------------------------");
            Console.WriteLine("General Manager");
            GeneralManager gmg = new GeneralManager("Testing", "Testing", "Suraj", 32, 20000);

            Console.WriteLine(gmg.Name + "   " + gmg.Basic);
            Console.WriteLine("Total sal : " + gmg.CalcNetSalary());
            Console.WriteLine("----------------------------------------");
            Console.WriteLine("CEO");
            CEO c = new CEO("Ram", 33, 30000);

            Console.WriteLine(c.Name + "   " + c.Basic);
            Console.WriteLine("Total sal : " + c.CalcNetSalary());



            Console.WriteLine("----------------------------------------");
            IDbfunction i1 = new Manager();

            i1.Delete();
            i1.Update();
            i1.Insert();
            Console.WriteLine("----------------------------------------");
            IDbfunction i2 = new GeneralManager();

            i2.Insert();
            i2.Delete();
            i2.Update();
            Console.WriteLine("----------------------------------------");
            IDbfunction i3 = new CEO();

            i3.Delete();
            i3.Update();
            i3.Insert();
            Console.ReadLine();

            Console.ReadLine();
        }