Exemplo n.º 1
0
        public void RowSetAccess()
        {
            TestDataSet.Table1DataTable dt  = new TestDataSet.Table1DataTable();
            TestDataSet.Table1Row       row = dt.NewTable1Row();
            row.col1 = "foo";
            row.col2 = 2004;

            Assert.AreEqual("foo", DataAccess.GetDataRowColumnValue(row, "col1"), "(1)GetDataRowColumnValue");
            Assert.AreEqual(2004, DataAccess.GetDataRowColumnValue(row, "col2"), "(2)GetDataRowColumnValue");
            DataAccess.SetDataRowColumnValue(row, "col1", "turnip");
            DataAccess.SetDataRowColumnValue(row, "col2", 1969);
            Assert.AreEqual("turnip", DataAccess.GetDataRowColumnValue(row, "col1"), "(3)GetDataRowColumnValue");
            Assert.AreEqual(1969, DataAccess.GetDataRowColumnValue(row, "col2"), "(4)GetDataRowColumnValue");
        }
Exemplo n.º 2
0
        public void RowSetAccess()
        {
            TestDataSet.Table1DataTable dt = new TestDataSet.Table1DataTable();
            TestDataSet.Table1Row row = dt.NewTable1Row();
            row.col1="foo";
            row.col2=2004;

            Assert.AreEqual("foo", DataAccess.GetDataRowColumnValue(row, "col1"), "(1)GetDataRowColumnValue");
            Assert.AreEqual(2004, DataAccess.GetDataRowColumnValue(row, "col2"), "(2)GetDataRowColumnValue");
            DataAccess.SetDataRowColumnValue(row, "col1", "turnip");
            DataAccess.SetDataRowColumnValue(row, "col2", 1969);
            Assert.AreEqual("turnip", DataAccess.GetDataRowColumnValue(row, "col1"), "(3)GetDataRowColumnValue");
            Assert.AreEqual(1969, DataAccess.GetDataRowColumnValue(row, "col2"), "(4)GetDataRowColumnValue");
        }