Пример #1
0
        public void TestDelete()
        {
            DbUtilsNETClient dc = new DbUtilsNETClient(getConnectionString());
            tblFISDataErr data = new tblFISDataErr();
            data.sReason = "ERROR";
            data.nNo = 2;
            var res = dc.Delete<tblFISDataErr>(data);

            Assert.IsNotNull(res);
        }
Пример #2
0
        public void TestUpdate()
        {
            DbUtilsNETClient dc = new DbUtilsNETClient(getConnectionString());
            tblFISDataErr data = new tblFISDataErr(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "LSVN221Z8C2000000", "ERROR2");

            IDictionary<string, Object> things = new Dictionary<String, Object>();
            things.Add("sReason", "ERROR");
            things.Add("nNo", "1");
            var res = dc.Update<tblFISDataErr>(data, things);

            Assert.IsNotNull(res);
        }
Пример #3
0
        public void TestInsert()
        {
            var id2 = -1;

            DbUtilsNETClient dc = new DbUtilsNETClient(getConnectionString());
            tblFISDataErr data = new tblFISDataErr(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "LSVN221Z8C2124094", "ERROR");
            data.nNo = 32;
            //插入单条
            id2 = Convert.ToInt32(dc.Insert(data));

            Assert.IsTrue(id2 != -1);
        }