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