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

            if (rowsCount > 0)
            {
                tdps.Model.DM_HY model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model         = new tdps.Model.DM_HY();
                    model.hy_dm   = dt.Rows[n]["hy_dm"].ToString();
                    model.hy_mc   = dt.Rows[n]["hy_mc"].ToString();
                    model.hy_jc   = dt.Rows[n]["hy_jc"].ToString();
                    model.hydl_dm = dt.Rows[n]["hydl_dm"].ToString();
                    model.xybz    = dt.Rows[n]["xybz"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Beispiel #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.DM_HY model)
 {
     dal.Update(model);
 }
Beispiel #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.DM_HY model)
 {
     dal.Add(model);
 }