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

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