示例#1
0
        void btnUpdate_Click(object sender, EventArgs e)
        {
            NewsInfo ni = db.GetEntityV2 <NewsInfo>("select * from NewsInfo where idx=7");

            ni.Title   = "this is the new title";
            ni.Indate  = DateTime.Now;
            ni.Content = "asdasdasdsadasasd";

            db.UpdateV2 <NewsInfo>(ni);
            Response.Write("update suc");
        }
示例#2
0
        void btnInsert_Click(object sender, EventArgs e)
        {
            NewsInfo ni = new NewsInfo()
            {
                Title = "title" + DateTime.Now
                 ,
                Content = "mysql is a greate db",
                img1 = "/uploads/aaa.jpg",
                Indate = DateTime.Now,
                IsTop = 1,
                Price = 44M
            };

            db.InsertV2(ni);
            Response.Write("insert suc");
        }
示例#3
0
        void btnInsert_Click(object sender, EventArgs e)
        {
            NewsInfo ni = new NewsInfo()
            {
                Title = "title" + DateTime.Now
                ,
                Content = "mysql is a greate db",
                img1    = "/uploads/aaa.jpg",
                Indate  = DateTime.Now,
                IsTop   = 1,
                Price   = 44M
            };

            db.InsertV2(ni);
            Response.Write("insert suc");
        }