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(); }
static void DBFunctions(IDbFunctions oIDb) { oIDb.Insert(); oIDb.Delete(); oIDb.Update(); }
// general purpose method this will work for all classes which impliments IDbFunctions interface static void InsertMethod(IDbFunctions oIDb) { oIDb.Insert(); }
static void CallInsert(IDbFunctions objIDb) { objIDb.Insert(); }
static void InsertIntoDb(IDbFunctions oIDb) { oIDb.Insert(); }
static void InsertMethod(IDbFunctions oIDb) //Call From Different Assembly { oIDb.Insert(); oIDb.Delete(); }