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

            if (rowsCount > 0)
            {
                tdps.Model.NSRXX model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model         = new tdps.Model.NSRXX();
                    model.NSRSBH  = dt.Rows[n]["NSRSBH"].ToString();
                    model.NSRMC   = dt.Rows[n]["NSRMC"].ToString();
                    model.FDDBRMC = dt.Rows[n]["FDDBRMC"].ToString();
                    model.ZCDZ    = dt.Rows[n]["ZCDZ"].ToString();
                    model.YYDZ    = dt.Rows[n]["YYDZ"].ToString();
                    model.DHHM    = dt.Rows[n]["DHHM"].ToString();
                    //if(dt.Rows[n]["YB"].ToString()!="")
                    //{
                    model.YB = dt.Rows[n]["YB"].ToString();
                    //}
                    model.QYHGDM = dt.Rows[n]["QYHGDM"].ToString();
                    //model.SBMM=dt.Rows[n]["SBMM"].ToString();
                    model.FileName = dt.Rows[n]["FileName"].ToString();
                    model.FDQNSR   = dt.Rows[n]["fdqnsr"].ToString();
                    model.TDPSID   = dt.Rows[n]["TDPSID"].ToString();
                    model.NFYDQ    = dt.Rows[n]["NFYDQ"].ToString();
                    model.TSYHLX   = dt.Rows[n]["TSYHLX"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.NSRXX model)
 {
     dal.Update(model);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.NSRXX model, object trans)
 {
     dal.Update(model, trans);
 }
Exemplo n.º 4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.NSRXX model)
 {
     dal.Add(model);
 }
Exemplo n.º 5
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.NSRXX model, object trans)
 {
     dal.Add(model, trans);
 }