using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using ZWGXPICK_SYS.DAL; namespace Test_db_dal { class Program { static void Main(string[] args) { ZWGXPICK_SYS.Model.WEIGHT_LOG model = new ZWGXPICK_SYS.Model.WEIGHT_LOG(); model.id = 1; model.product_model = "product_model"; model.product_date = "product_date"; model.product_time = "product_time"; model.weight = "weight"; model.is_qualified = 1; WEIGHT_LOG log = new WEIGHT_LOG(); log.Add(model); bool bExist = log.Exists(1); DataSet ds = log.GetList("1=1"); foreach (DataTable dt in ds.Tables) { foreach (DataRow row in dt.Rows) { model = model = log.DataRowToModel(row); } } ds = log.GetListByPage("1=1", "id", 0, 10); int id = log.GetMaxId(); model = log.GetModel(1); int count = log.GetRecordCount("1=1"); model.product_time = "2"; bExist = log.Update(model); } } }