/// <summary> /// 获得数据列表 /// </summary> public List <ERM.MDL.docFormat> GetModelList(string strWhere) { DataSet ds = dal.GetList(strWhere); List <ERM.MDL.docFormat> modelList = new List <ERM.MDL.docFormat>(); int rowsCount = ds.Tables[0].Rows.Count; if (rowsCount > 0) { ERM.MDL.docFormat model; for (int n = 0; n < rowsCount; n++) { model = new ERM.MDL.docFormat(); model.code = ds.Tables[0].Rows[n]["code"].ToString(); model.typename = ds.Tables[0].Rows[n]["typename"].ToString(); modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(ERM.MDL.docFormat model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(ERM.MDL.docFormat model) { dal.Add(model); }