Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #8
0
 public static DbQueryResult GetBalanceDetailsNoPage(BalanceDetailQuery query)
 {
     return(MemberProvider.Instance().GetBalanceDetailsNoPage(query));
 }
Exemple #9
0
 public static bool InsertClientSet(Dictionary <int, MemberClientSet> clientset)
 {
     return(MemberProvider.Instance().InsertClientSet(clientset));
 }
Exemple #10
0
 public static bool HasSamePointMemberGrade(MemberGradeInfo memberGrade)
 {
     return(MemberProvider.Instance().HasSamePointMemberGrade(memberGrade));
 }
Exemple #11
0
 public static DataTable GetMembersNopage(MemberQuery query, IList <string> fields)
 {
     return(MemberProvider.Instance().GetMembersNopage(query, fields));
 }
Exemple #12
0
 public static DbQueryResult GetMembers(MemberQuery query)
 {
     return(MemberProvider.Instance().GetMembers(query));
 }
Exemple #13
0
 public static IList <MemberGradeInfo> GetMemberGrades()
 {
     return(MemberProvider.Instance().GetMemberGrades());
 }
Exemple #14
0
 public static MemberGradeInfo GetMemberGrade(int gradeId)
 {
     return(MemberProvider.Instance().GetMemberGrade(gradeId));
 }
Exemple #15
0
 public static Dictionary <int, MemberClientSet> GetMemberClientSet()
 {
     return(MemberProvider.Instance().GetMemberClientSet());
 }
Exemple #16
0
 public static DbQueryResult GetBalanceDrawRequests(BalanceDrawRequestQuery query)
 {
     return(MemberProvider.Instance().GetBalanceDrawRequests(query));
 }
Exemple #17
0
 static MemberProvider()
 {
     MemberProvider._defaultInstance = (DataProviders.CreateInstance("Hidistro.ControlPanel.Data.MemberData,Hidistro.ControlPanel.Data") as MemberProvider);
 }
Exemple #18
0
 public static void SetDefalutMemberGrade(int gradeId)
 {
     MemberProvider.Instance().SetDefalutMemberGrade(gradeId);
 }