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

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