/// <summary> /// 根据条件获取实体集合 /// </summary> /// <param name="pc">pc</param> /// <param name="obc">obc</param> /// <returns>实体</returns> public List <CustomerMemoInfoModel> RetrieveMultiple(ParameterCollection pc, OrderByCollection obc) { List <CustomerMemoInfoModel> customermemoinfos = new List <CustomerMemoInfoModel>(); CustomerMemoInfoModel customermemoinfo = new CustomerMemoInfoModel(); DataTable dt = DbUtil.Current.RetrieveMultiple(customermemoinfo, pc, obc); for (int i = 0; i < dt.Rows.Count; i++) { customermemoinfo = new CustomerMemoInfoModel(); customermemoinfo.ConvertFrom(dt, i); customermemoinfos.Add(customermemoinfo); } return(customermemoinfos); }
/// <summary> /// 根据主键获取实体 /// </summary> /// <param name="memoid"></param> /// <returns>实体</returns> public CustomerMemoInfoModel Retrieve(string memoid) { CustomerMemoInfoModel customermemoinfo = new CustomerMemoInfoModel(); customermemoinfo.MemoId = memoid; DataTable dt = DbUtil.Current.Retrieve(customermemoinfo); if (dt.Rows.Count < 1) { return(null); } customermemoinfo.ConvertFrom(dt); return(customermemoinfo); }