示例#1
0
        public static bool DealBalanceDrawRequest(int userId, bool agree)
        {
            bool flag = MemberProvider.Instance().DealBalanceDrawRequest(userId, agree);

            if (flag)
            {
                Users.ClearUserCache(Users.GetUser(userId));
            }
            return(flag);
        }
示例#2
0
        public static bool DeleteMemberGrade(int gradeId)
        {
            ManagerHelper.CheckPrivilege(Privilege.DeleteMemberGrade);
            bool flag = MemberProvider.Instance().DeleteMemberGrade(gradeId);

            if (flag)
            {
                EventLogs.WriteOperationLog(Privilege.DeleteMemberGrade, string.Format(CultureInfo.InvariantCulture, "删除了编号为 “{0}” 的会员等级", new object[] { gradeId }));
            }
            return(flag);
        }
示例#3
0
        public static bool Delete(int userId)
        {
            ManagerHelper.CheckPrivilege(Privilege.DeleteMember);
            IUser user = Users.GetUser(userId);
            bool  flag = MemberProvider.Instance().Delete(userId);

            if (flag)
            {
                Users.ClearUserCache(user);
                EventLogs.WriteOperationLog(Privilege.DeleteMember, string.Format(CultureInfo.InvariantCulture, "删除了编号为 “{0}” 的会员", new object[] { userId }));
            }
            return(flag);
        }
示例#4
0
        public static bool CreateMemberGrade(MemberGradeInfo memberGrade)
        {
            if (null == memberGrade)
            {
                return(false);
            }
            Globals.EntityCoding(memberGrade, true);
            bool flag = MemberProvider.Instance().CreateMemberGrade(memberGrade);

            if (flag)
            {
                EventLogs.WriteOperationLog(Privilege.AddMemberGrade, string.Format(CultureInfo.InvariantCulture, "添加了名为 “{0}” 的会员等级", new object[] { memberGrade.Name }));
            }
            return(flag);
        }
示例#5
0
        public static bool AddBalance(BalanceDetailInfo balanceDetails)
        {
            if (null == balanceDetails)
            {
                return(false);
            }
            bool flag = MemberProvider.Instance().InsertBalanceDetail(balanceDetails);

            if (flag)
            {
                Users.ClearUserCache(Users.GetUser(balanceDetails.UserId));
            }
            EventLogs.WriteOperationLog(Privilege.MemberAccount, string.Format(CultureInfo.InvariantCulture, "给会员\"{0}\"添加预付款\"{1}\"", new object[] { balanceDetails.UserName, balanceDetails.Balance }));
            return(flag);
        }
示例#6
0
        public static bool UpdateMemberGrade(MemberGradeInfo memberGrade)
        {
            bool result;

            if (null == memberGrade)
            {
                result = false;
            }
            else
            {
                Globals.EntityCoding(memberGrade, true);
                bool flag;
                if (flag = MemberProvider.Instance().UpdateMemberGrade(memberGrade))
                {
                    EventLogs.WriteOperationLog(Privilege.EditMemberGrade, string.Format(CultureInfo.InvariantCulture, "修改了编号为 “{0}” 的会员等级", new object[]
                    {
                        memberGrade.GradeId
                    }));
                }
                result = flag;
            }
            return(result);
        }
示例#7
0
        public static bool AddBalance(BalanceDetailInfo balanceDetails, decimal money)
        {
            bool result;

            if (null == balanceDetails)
            {
                result = false;
            }
            else
            {
                bool flag;
                if (flag = MemberProvider.Instance().InsertBalanceDetail(balanceDetails))
                {
                    Users.ClearUserCache(Users.GetUser(balanceDetails.UserId));
                }
                EventLogs.WriteOperationLog(Privilege.MemberAccount, string.Format(CultureInfo.InvariantCulture, "给会员\"{0}\"添加预付款\"{1}\"", new object[]
                {
                    balanceDetails.UserName,
                    money
                }));
                result = flag;
            }
            return(result);
        }
示例#8
0
 public static DbQueryResult GetBalanceDetailsNoPage(BalanceDetailQuery query)
 {
     return(MemberProvider.Instance().GetBalanceDetailsNoPage(query));
 }
示例#9
0
 public static bool InsertClientSet(Dictionary <int, MemberClientSet> clientset)
 {
     return(MemberProvider.Instance().InsertClientSet(clientset));
 }
示例#10
0
 public static bool HasSamePointMemberGrade(MemberGradeInfo memberGrade)
 {
     return(MemberProvider.Instance().HasSamePointMemberGrade(memberGrade));
 }
示例#11
0
 public static DataTable GetMembersNopage(MemberQuery query, IList <string> fields)
 {
     return(MemberProvider.Instance().GetMembersNopage(query, fields));
 }
示例#12
0
 public static DbQueryResult GetMembers(MemberQuery query)
 {
     return(MemberProvider.Instance().GetMembers(query));
 }
示例#13
0
 public static IList <MemberGradeInfo> GetMemberGrades()
 {
     return(MemberProvider.Instance().GetMemberGrades());
 }
示例#14
0
 public static MemberGradeInfo GetMemberGrade(int gradeId)
 {
     return(MemberProvider.Instance().GetMemberGrade(gradeId));
 }
示例#15
0
 public static Dictionary <int, MemberClientSet> GetMemberClientSet()
 {
     return(MemberProvider.Instance().GetMemberClientSet());
 }
示例#16
0
 public static DbQueryResult GetBalanceDrawRequests(BalanceDrawRequestQuery query)
 {
     return(MemberProvider.Instance().GetBalanceDrawRequests(query));
 }
示例#17
0
 static MemberProvider()
 {
     MemberProvider._defaultInstance = (DataProviders.CreateInstance("Hidistro.ControlPanel.Data.MemberData,Hidistro.ControlPanel.Data") as MemberProvider);
 }
示例#18
0
 public static void SetDefalutMemberGrade(int gradeId)
 {
     MemberProvider.Instance().SetDefalutMemberGrade(gradeId);
 }