public static bool DealBalanceDrawRequest(int userId, bool agree) { bool flag = MemberProvider.Instance().DealBalanceDrawRequest(userId, agree); if (flag) { Users.ClearUserCache(Users.GetUser(userId)); } return(flag); }
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); }
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); }
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); }
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); }
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); }
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); }
public static DbQueryResult GetBalanceDetailsNoPage(BalanceDetailQuery query) { return(MemberProvider.Instance().GetBalanceDetailsNoPage(query)); }
public static bool InsertClientSet(Dictionary <int, MemberClientSet> clientset) { return(MemberProvider.Instance().InsertClientSet(clientset)); }
public static bool HasSamePointMemberGrade(MemberGradeInfo memberGrade) { return(MemberProvider.Instance().HasSamePointMemberGrade(memberGrade)); }
public static DataTable GetMembersNopage(MemberQuery query, IList <string> fields) { return(MemberProvider.Instance().GetMembersNopage(query, fields)); }
public static DbQueryResult GetMembers(MemberQuery query) { return(MemberProvider.Instance().GetMembers(query)); }
public static IList <MemberGradeInfo> GetMemberGrades() { return(MemberProvider.Instance().GetMemberGrades()); }
public static MemberGradeInfo GetMemberGrade(int gradeId) { return(MemberProvider.Instance().GetMemberGrade(gradeId)); }
public static Dictionary <int, MemberClientSet> GetMemberClientSet() { return(MemberProvider.Instance().GetMemberClientSet()); }
public static DbQueryResult GetBalanceDrawRequests(BalanceDrawRequestQuery query) { return(MemberProvider.Instance().GetBalanceDrawRequests(query)); }
static MemberProvider() { MemberProvider._defaultInstance = (DataProviders.CreateInstance("Hidistro.ControlPanel.Data.MemberData,Hidistro.ControlPanel.Data") as MemberProvider); }
public static void SetDefalutMemberGrade(int gradeId) { MemberProvider.Instance().SetDefalutMemberGrade(gradeId); }