Пример #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <tdps.Model.DSKHYH> DataTableToList(DataTable dt)
        {
            List <tdps.Model.DSKHYH> modelList = new List <tdps.Model.DSKHYH>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                tdps.Model.DSKHYH model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model        = new tdps.Model.DSKHYH();
                    model.KHZH   = dt.Rows[n]["KHZH"].ToString();
                    model.NSRSBH = dt.Rows[n]["NSRSBH"].ToString();
                    model.KHYHZL = dt.Rows[n]["KHYHZL"].ToString();
                    model.KHYH   = dt.Rows[n]["KHYH"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Пример #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.DSKHYH model)
 {
     dal.Update(model);
 }
Пример #3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.DSKHYH model, object trans)
 {
     dal.Update(model, trans);
 }
Пример #4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.DSKHYH model)
 {
     dal.Add(model);
 }
Пример #5
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.DSKHYH model, object trans)
 {
     dal.Add(model, trans);
 }