Exemplo n.º 1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <tdps.Model.DYMX> DataTableToList(DataTable dt)
        {
            List <tdps.Model.DYMX> modelList = new List <tdps.Model.DYMX>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                tdps.Model.DYMX model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model        = new tdps.Model.DYMX();
                    model.SPHM   = dt.Rows[n]["SPHM"].ToString();
                    model.JKPZXH = dt.Rows[n]["JKPZXH"].ToString();
                    model.DYSXH  = dt.Rows[n]["DYSXH"].ToString();
                    model.NSRSBH = dt.Rows[n]["NSRSBH"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.DYMX model)
 {
     dal.Add(model);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.DYMX model)
 {
     dal.Update(model);
 }
Exemplo n.º 4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.DYMX model, object trans)
 {
     dal.Add(model, trans);
 }