Esempio n. 1
0
        static void Main(string[] args)
        {
            User user = new User();

            SqlserverUser su = new SqlserverUser();
            su.Insert(user);
            su.GetUser(1);

            Console.Read();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            User user = new User();
            //AbstractFactory factory = new SqlServerFactory();
            IFactory factory = new AccessFactory();

            IUser iu = factory.CreateUser();

            iu.Insert(user);
            iu.GetUser(1);

            Console.Read();
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            User user = new User();
            Department dept = new Department();

            IUser iu = DataAccess.CreateUser();

            iu.Insert(user);
            iu.GetUser(1);

            IDepartment id = DataAccess.CreateDepartment();
            id.Insert(dept);
            id.GetDepartment(1);

            Console.Read();
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            User user = new User();
            Department dept = new Department();

            //AbstractFactory factory = new SqlServerFactory();
            IFactory factory = new AccessFactory();
            IUser iu = factory.CreateUser();

            iu.Insert(user);
            iu.GetUser(1);

            IDepartment id = factory.CreateDepartment();
            id.Insert(dept);
            id.GetDepartment(1);

            Console.Read();
        }
Esempio n. 5
0
 public void Insert(User user)
 {
     Console.WriteLine("在Access中给User表增加一条记录");
 }
Esempio n. 6
0
 public void Insert(User user)
 {
     Console.WriteLine("在Sqlserver中给User表增加一条记录");
 }
Esempio n. 7
0
 public void InsertUser(User user)
 {
     //...
 }