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