/// <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); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Maticsoft.Model.FuWuTypeInfo model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Maticsoft.Model.FuWuTypeInfo model) { return(dal.Add(model)); }