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

            if (rowsCount > 0)
            {
                Maticsoft.Model.FuWuTypeInfo model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Maticsoft.Model.FuWuTypeInfo();
                    if (dt.Rows[n]["FuwuTypeID"].ToString() != "")
                    {
                        model.FuwuTypeID = int.Parse(dt.Rows[n]["FuwuTypeID"].ToString());
                    }
                    model.FuwuTypeName = dt.Rows[n]["FuwuTypeName"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
コード例 #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Maticsoft.Model.FuWuTypeInfo model)
 {
     return(dal.Update(model));
 }
コード例 #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(Maticsoft.Model.FuWuTypeInfo model)
 {
     return(dal.Add(model));
 }