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

            if (rowsCount > 0)
            {
                tdps.Model.JKPZ model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model           = new tdps.Model.JKPZ();
                    model.JKPZXH    = dt.Rows[n]["JKPZXH"].ToString();
                    model.NSRSBH    = dt.Rows[n]["NSRSBH"].ToString();
                    model.NSRMC     = dt.Rows[n]["NSRMC"].ToString();
                    model.NSRSWJGDM = dt.Rows[n]["NSRSWJGDM"].ToString();
                    model.NSRSWJGMC = dt.Rows[n]["NSRSWJGMC"].ToString();
                    model.ZSSWJGDM  = dt.Rows[n]["ZSSWJGDM"].ToString();
                    model.ZSSWJGMC  = dt.Rows[n]["ZSSWJGMC"].ToString();
                    model.PZDYFS    = dt.Rows[n]["PZDYFS"].ToString();
                    model.DYSJ      = dt.Rows[n]["DYSJ"].ToString();
                    if (dt.Rows[n]["HJJE"].ToString() != "")
                    {
                        model.HJJE = decimal.Parse(dt.Rows[n]["HJJE"].ToString());
                    }
                    model.FWM      = dt.Rows[n]["FWM"].ToString();
                    model.DZYZDATA = dt.Rows[n]["DZYZDATA"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
示例#2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.JKPZ model, object trans)
 {
     dal.Update(model, trans);
 }
示例#3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.JKPZ model, object trans)
 {
     dal.Add(model, trans);
 }
示例#4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.JKPZ model)
 {
     dal.Update(model);
 }
示例#5
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.JKPZ model)
 {
     dal.Add(model);
 }