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