Example #1
0
        static void Main(string[] args)
        {
            GeneralManager e1 = new GeneralManager("kajol", 10, 12000.0m, "HR", "hhhh");

            Console.WriteLine(e1.EmpNo);
            Console.WriteLine(e1.Name);
            Console.WriteLine(e1.DeptNo);
            Console.WriteLine(e1.Basic);
            Console.WriteLine(e1.CalcNetSalary());
            Console.WriteLine(e1.Designation);
            Console.WriteLine(e1.Perks);
            IDbFunctions oi = e1;

            oi.Delete();
            oi.Insert();
            oi.Update();
            Console.WriteLine("==================");
            GeneralManager e2 = new GeneralManager("ram", 20, 13000.0m, "cs", "hhhh");

            Console.WriteLine(e2.EmpNo);
            Console.WriteLine(e2.Name);
            Console.WriteLine(e2.DeptNo);
            Console.WriteLine(e2.Basic);
            Console.WriteLine(e2.CalcNetSalary());
            Console.WriteLine(e2.Designation);
            Console.WriteLine(e2.Perks);

            //Console.WriteLine(e1.EmpNo);
            //Console.WriteLine(e2.EmpNo);
            Console.ReadLine();
        }
Example #2
0
 static void DBFunctions(IDbFunctions oIDb)
 {
     oIDb.Insert();
     oIDb.Delete();
     oIDb.Update();
 }
Example #3
0
 // general purpose method this will work for all classes which impliments IDbFunctions interface
 static void InsertMethod(IDbFunctions oIDb)
 {
     oIDb.Insert();
 }
Example #4
0
 static void CallInsert(IDbFunctions objIDb)
 {
     objIDb.Insert();
 }
Example #5
0
 static void InsertIntoDb(IDbFunctions oIDb)
 {
     oIDb.Insert();
 }
Example #6
0
 static void InsertMethod(IDbFunctions oIDb) //Call From Different Assembly
 {
     oIDb.Insert();
     oIDb.Delete();
 }