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

            if (rowsCount > 0)
            {
                tdps.Model.SBXXSLGXB model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new tdps.Model.SBXXSLGXB();
                    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());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.SBXXSLGXB model, object trans)
 {
     dal.Add(model, trans);
 }
Exemple #3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(tdps.Model.SBXXSLGXB model)
 {
     dal.Update(model);
 }
Exemple #4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(tdps.Model.SBXXSLGXB model)
 {
     dal.Add(model);
 }