Ejemplo n.º 1
0
        /// <summary>
        /// 获取用户VIP的等级及管理费优惠利率
        /// </summary>
        protected void GetUserVipMsg(Guid userid)
        {
            DynamicParameters param = new DynamicParameters();

            param.Add("@userId", userid);
            param.Add("@Rate", null, DbType.Double, ParameterDirection.Output);
            param.Add("@Level", null, DbType.Int32, ParameterDirection.Output);

            PublicConn.ExecuteVip("P_VipProjectZCRate", ref param, CommandType.StoredProcedure);

            UserVipLevel = param.Get <int?>("@Level");
            if (UserVipLevel == null)
            {
                UserVipLevel = 1;
            }
            ManagerRate = param.Get <double?>("@Rate");
            if (ManagerRate == null)
            {
                ManagerRate = 1;
            }
            if (DateTime.Now < DateTime.Parse("2016/03/12 00:00:00"))
            {
                ManagerRate = 1;
            }
        }