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

            if (rowsCount > 0)
            {
                tdps.Model.YJSCL model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new tdps.Model.YJSCL();
                    if (dt.Rows[n]["FID"].ToString() != "")
                    {
                        model.FID = int.Parse(dt.Rows[n]["FID"].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.YHDM     = dt.Rows[n]["YHDM"].ToString();
                    model.YHZH     = dt.Rows[n]["YHZH"].ToString();
                    model.YJFSSJ   = dt.Rows[n]["YJFSSJ"].ToString();
                    model.YJCLSJ   = dt.Rows[n]["YJCLSJ"].ToString();
                    model.JYLSH    = dt.Rows[n]["JYLSH"].ToString();
                    model.DZYZData = dt.Rows[n]["DZYZData"].ToString();
                    model.ZSXM_DM  = dt.Rows[n]["ZSXM_DM"].ToString();
                    model.ZSXM_MC  = dt.Rows[n]["ZSXM_MC"].ToString();
                    model.ZSPM_DM  = dt.Rows[n]["ZSPM_DM"].ToString();
                    model.ZSPM_MC  = dt.Rows[n]["ZSPM_MC"].ToString();
                    if (dt.Rows[n]["SL"].ToString() != "")
                    {
                        model.SL = decimal.Parse(dt.Rows[n]["SL"].ToString());
                    }
                    model.TSXX = dt.Rows[n]["TSXX"].ToString();
                    model.ZT   = dt.Rows[n]["ZT"].ToString();
                    if (dt.Rows[n]["YJJE"].ToString() != "")
                    {
                        model.YJJE = decimal.Parse(dt.Rows[n]["YJJE"].ToString());
                    }
                    model.SSQQ     = dt.Rows[n]["SSQQ"].ToString();
                    model.SSQZ     = dt.Rows[n]["SSQZ"].ToString();
                    model.SBFKYZM  = dt.Rows[n]["SBFKYZM"].ToString();
                    model.FKDM     = dt.Rows[n]["FKDM"].ToString();
                    model.FKXX     = dt.Rows[n]["FKXX"].ToString();
                    model.FileName = dt.Rows[n]["FileName"].ToString();
                    model.MW       = dt.Rows[n]["MW"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Beispiel #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.YJSCL model, object trans)
 {
     dal.Update(model, trans);
 }
Beispiel #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.YJSCL model, object trans)
 {
     dal.Add(model, trans);
 }
Beispiel #4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.YJSCL model)
 {
     dal.Update(model);
 }
Beispiel #5
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.YJSCL model)
 {
     dal.Add(model);
 }