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

            if (rowsCount > 0)
            {
                tdps.Model.DM_HYMX model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model         = new tdps.Model.DM_HYMX();
                    model.hymx_dm = dt.Rows[n]["hymx_dm"].ToString();
                    model.hymx_mc = dt.Rows[n]["hymx_mc"].ToString();
                    model.hymx_jc = dt.Rows[n]["hymx_jc"].ToString();
                    model.hydl_dm = dt.Rows[n]["hydl_dm"].ToString();
                    model.xybz    = dt.Rows[n]["xybz"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Пример #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.DM_HYMX model)
 {
     dal.Update(model);
 }
Пример #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.DM_HYMX model)
 {
     dal.Add(model);
 }