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