public void TestSimpleInsert()
        {
            MockSimpleObject obj = new MockSimpleObject();

            obj.CommonName = "testInsert";
            obj.CreateDate = DateTime.Today;
            obj.FullName   = "Test Insert";
            obj.Id         = 99;
            obj.Status     = 4;
            OleDbConnection con = new OleDbConnection(connectString);

            con.Open();
            SimpleDAO.SimpleDAO <MockSimpleObject> dao = new SimpleDAO.SimpleDAO <MockSimpleObject>();
            dao.SimpleInsert(con, obj);
            con.Close();
        }
        public void TestSimpleInsert()
        {
            MockSimpleObject obj = new MockSimpleObject();

            obj.CommonName = "testInsert";
            obj.CreateDate = DateTime.Today;
            obj.FullName   = "Test Insert";
            obj.Id         = 99;
            obj.Status     = 4;
            //SqlConnection con = new SqlConnection(@"Data Source=(local);Initial Catalog=JPAS;User ID=jpas_user;Password=jpas2007");
            OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\dev\SimpleDAO\SimpleDAOTest\SimpleDAO.mdb");

            con.Open();
            SimpleDAO.SimpleDAO <MockSimpleObject> dao = new SimpleDAO.SimpleDAO <MockSimpleObject>();
            dao.SimpleInsert(con, obj);
            con.Close();
        }
 public void TestSimpleInsert()
 {
     MockSimpleObject obj = new MockSimpleObject();
     obj.CommonName = "testInsert";
     obj.CreateDate = DateTime.Today;
     obj.FullName = "Test Insert";
     obj.Id = 99;
     obj.Status = 4;
     OleDbConnection con = new OleDbConnection(connectString);
     con.Open();
     SimpleDAO.SimpleDAO<MockSimpleObject> dao = new SimpleDAO.SimpleDAO<MockSimpleObject>();
     dao.SimpleInsert(con, obj);
     con.Close();
 }
Exemple #4
0
 public void TestSimpleInsert()
 {
     MockSimpleObject obj = new MockSimpleObject();
     obj.CommonName = "testInsert";
     obj.CreateDate = DateTime.Today;
     obj.FullName = "Test Insert";
     obj.Id = 99;
     obj.Status = 4;
     //SqlConnection con = new SqlConnection(@"Data Source=(local);Initial Catalog=JPAS;User ID=jpas_user;Password=jpas2007");
     OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\dev\SimpleDAO\SimpleDAOTest\SimpleDAO.mdb");
     con.Open();
     SimpleDAO.SimpleDAO<MockSimpleObject> dao = new SimpleDAO.SimpleDAO<MockSimpleObject>();
     dao.SimpleInsert(con, obj);
     con.Close();
 }