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

            if (rowsCount > 0)
            {
                tdps.Model.SBCL model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new tdps.Model.SBCL();
                    if (dt.Rows[n]["FID"].ToString() != "")
                    {
                        model.FID = int.Parse(dt.Rows[n]["FID"].ToString());
                    }
                    if (dt.Rows[n]["SBXXID"].ToString() != "")
                    {
                        model.SBXXID = int.Parse(dt.Rows[n]["SBXXID"].ToString());
                    }
                    model.HZLX     = dt.Rows[n]["HZLX"].ToString();
                    model.NSRSBH   = dt.Rows[n]["NSRSBH"].ToString();
                    model.NSRMC    = dt.Rows[n]["NSRMC"].ToString();
                    model.SWJGMC   = dt.Rows[n]["SWJGMC"].ToString();
                    model.SBFSSJ   = dt.Rows[n]["SBFSSJ"].ToString();
                    model.SBCLSJ   = dt.Rows[n]["SBCLSJ"].ToString();
                    model.JYLSH    = dt.Rows[n]["JYLSH"].ToString();
                    model.JMM      = dt.Rows[n]["JMM"].ToString();
                    model.DZYZData = dt.Rows[n]["DZYZData"].ToString();
                    model.SBWJ     = dt.Rows[n]["SBWJ"].ToString();
                    model.SBBZLMC  = dt.Rows[n]["SBBZLMC"].ToString();
                    model.SBZL     = dt.Rows[n]["SBZL"].ToString();
                    if (dt.Rows[n]["SBSE"].ToString() != "")
                    {
                        model.SBSE = decimal.Parse(dt.Rows[n]["SBSE"].ToString());
                    }
                    model.TSXX = dt.Rows[n]["TSXX"].ToString();
                    if (dt.Rows[n]["SBCS"].ToString() != "")
                    {
                        model.SBCS = int.Parse(dt.Rows[n]["SBCS"].ToString());
                    }
                    model.SSQQ     = dt.Rows[n]["SSQQ"].ToString();
                    model.SSQZ     = dt.Rows[n]["SSQZ"].ToString();
                    model.MW       = dt.Rows[n]["MW"].ToString();
                    model.SZ       = dt.Rows[n]["SZ"].ToString();
                    model.FKDM     = dt.Rows[n]["FKDM"].ToString();
                    model.FKXX     = dt.Rows[n]["FKXX"].ToString();
                    model.FKSJ     = dt.Rows[n]["FKSJ"].ToString();
                    model.FileName = dt.Rows[n]["FileName"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Пример #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.SBCL model, object trans)
 {
     dal.Update(model, trans);
 }
Пример #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.SBCL model, object trans)
 {
     dal.Add(model, trans);
 }
Пример #4
0
 /// <summary>
 /// 是否存在该记录
 /// </summary>
 public bool Exists(tdps.Model.SBCL model)
 {
     return(dal.Exists(model));
 }
Пример #5
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.SBCL model)
 {
     dal.Update(model);
 }
Пример #6
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.SBCL model)
 {
     dal.Add(model);
 }