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

            if (rowsCount > 0)
            {
                tdps.Model.DM_HYZL model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model         = new tdps.Model.DM_HYZL();
                    model.hyzl_dm = dt.Rows[n]["hyzl_dm"].ToString();
                    model.hyzl_mc = dt.Rows[n]["hyzl_mc"].ToString();
                    model.hyzl_jc = dt.Rows[n]["hyzl_jc"].ToString();
                    model.hydl_dm = dt.Rows[n]["hydl_dm"].ToString();
                    model.xybz    = dt.Rows[n]["xybz"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.DM_HYZL model)
 {
     dal.Update(model);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.DM_HYZL model)
 {
     dal.Add(model);
 }