//获取用户道具 public List <UserPropInfo> getUserHaveProp(int userId, int pageIndex, int pageSize, out int recordCount) { List <Model.UserPropInfo> list = new List <UserPropInfo>(); SqlParameter[] parm = new SqlParameter[] { new SqlParameter("@pageIndex", pageIndex), new SqlParameter("@pageSize", pageSize), new SqlParameter("@UserId", userId), new SqlParameter("@recordCount", SqlDbType.Int, 4) }; parm[3].Direction = ParameterDirection.Output; using (SqlDataReader dr = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, "getUserProp", parm)) { while (dr.Read()) { Model.UserPropInfo item = new UserPropInfo(); item.PropId = Convert.ToInt32(dr["PropId"]); item.userID = Convert.ToInt32(dr["userID"]); item.userPropNumber = Convert.ToInt32(dr["userPropNumber"]); item.PropName = dr["PropName"].ToString(); item.PropIntroduction = dr["PropIntroduction"].ToString(); item.PropImage = dr["PropImage"].ToString(); item.PropPrice = Convert.ToDecimal(dr["PropPrice"]); list.Add(item); } } recordCount = Convert.ToInt32(parm[3].Value); return(list); }
private void Start() { _userPropInfo = new UserPropInfo(); _userPropInfo.nickName = "成功"; _text = GetComponentInChildren <UnityEngine.UI.Text>(); _text.text = _userPropInfo.nickName; }