Exemplo n.º 1
0
        public List <MemberStore> GetMemberStoreListByMemberId(string memberId)
        {
            List <MemberStore> list    = new List <MemberStore>();
            StringBuilder      builder = new StringBuilder();

            builder.AppendFormat(MemberSqls.SELECT_STORE_BY_MEMBER_ID, memberId);
            string    sql = builder.ToString();
            DataTable dt  = DatabaseOperationWeb.ExecuteSelectDS(sql, "T").Tables[0];

            if (dt != null)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    MemberStore memberStore = new MemberStore
                    {
                        bindDate      = dr["BIND_DATE"].ToString(),
                        cardCode      = dr["CARD_CODE"].ToString(),
                        memberId      = dr["MEMBER_ID"].ToString(),
                        isDefault     = dr["IS_DEFAULT"].ToString() == "1",
                        memberStoreId = dr["MEMBER_STORE_ID"].ToString(),
                        regPhone      = dr["REG_PHONE"].ToString(),
                        storeAddr     = dr["STORE_ADDR"].ToString(),
                        storeCardImg  = dr["STORE_CARD_IMG"].ToString(),
                        storeId       = dr["STORE_ID"].ToString(),
                        storeName     = dr["STORE_NAME"].ToString(),
                    };
                    list.Add(memberStore);
                }
            }
            return(list);
        }
Exemplo n.º 2
0
 public DataFileService(SystemStore systems, MemberStore members, SwitchStore switches, ILogger logger)
 {
     _systems  = systems;
     _members  = members;
     _switches = switches;
     _logger   = logger.ForContext <DataFileService>();
 }
Exemplo n.º 3
0
        async Task ExecuteLoadItemsCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                Members.Clear();
                var members = await MemberStore.GetDatasAsync(true);

                foreach (var item in members)
                {
                    Members.Add(item);
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Exemplo n.º 4
0
 public MemberCommands(SystemStore systems, MemberStore members, EmbedService embeds, ProxyCacheService proxyCache)
 {
     _systems    = systems;
     _members    = members;
     _embeds     = embeds;
     _proxyCache = proxyCache;
 }
Exemplo n.º 5
0
 public EmbedService(SystemStore systems, MemberStore members, IDiscordClient client, SwitchStore switches, MessageStore messages)
 {
     _systems  = systems;
     _members  = members;
     _client   = client;
     _switches = switches;
     _messages = messages;
 }
Exemplo n.º 6
0
 public SystemController(SystemStore systems, MemberStore members, SwitchStore switches, DbConnectionFactory conn, TokenAuthService auth)
 {
     _systems  = systems;
     _members  = members;
     _switches = switches;
     _conn     = conn;
     _auth     = auth;
 }
Exemplo n.º 7
0
 public SystemCommands(SystemStore systems, MemberStore members, SwitchStore switches, EmbedService embeds, ProxyCacheService proxyCache)
 {
     _systems    = systems;
     _members    = members;
     _switches   = switches;
     _embeds     = embeds;
     _proxyCache = proxyCache;
 }
Exemplo n.º 8
0
 public Context(IServiceProvider provider, SocketUserMessage message, int commandParseOffset,
                PKSystem senderSystem)
 {
     _client       = provider.GetRequiredService <IDiscordClient>() as DiscordShardedClient;
     _message      = message;
     _systems      = provider.GetRequiredService <SystemStore>();
     _members      = provider.GetRequiredService <MemberStore>();
     _senderSystem = senderSystem;
     _provider     = provider;
     _parameters   = new Parameters(message.Content.Substring(commandParseOffset));
 }
Exemplo n.º 9
0
 public PeriodicStatCollector(IDiscordClient client, IMetrics metrics, SystemStore systems, MemberStore members, SwitchStore switches, MessageStore messages, ILogger logger, WebhookCacheService webhookCache, DbConnectionCountHolder countHolder)
 {
     _client       = (DiscordShardedClient)client;
     _metrics      = metrics;
     _systems      = systems;
     _members      = members;
     _switches     = switches;
     _messages     = messages;
     _webhookCache = webhookCache;
     _countHolder  = countHolder;
     _logger       = logger.ForContext <PeriodicStatCollector>();
 }
Exemplo n.º 10
0
 public CacheClient(string prefix)
 {
     Prefix           = prefix;
     Channels         = new ChannelStore(this);
     EditableMessages = new EditableMessagesStore(this);
     Emojis           = new EmojiStore(this);
     Guilds           = new GuildStore(this);
     Members          = new MemberStore(this);
     Messages         = new MessageStore(this);
     Roles            = new RoleStore(this);
     Users            = new UserStore(this);
     VoiceStates      = new VoiceStateStore(this);
 }
Exemplo n.º 11
0
        public MemberViewModel()
        {
            Title              = "Member";
            Members            = new ObservableCollection <Member>();
            LoadMembersCommand = new Command(async() => await ExecuteLoadItemsCommand());

            /*TODO: MessagingCenter to register when implemented AddMember*/

            MessagingCenter.Subscribe <NewMemberPage, Member>(this, "AddMember", async(obj, item) =>
            {
                var newItem = item as Member;
                Members.Add(newItem);
                await MemberStore.AddDataAsync(newItem);
            });
        }
Exemplo n.º 12
0
 /// <summary>Initializes a new instance of the <see cref="JsonObject"/> class.</summary>
 public JwtHeader()
     : base(MemberStore.CreateSlowGrowingStore())
 {
 }
Exemplo n.º 13
0
 public MemberController(MemberStore members, DbConnectionFactory conn, TokenAuthService auth)
 {
     _members = members;
     _conn    = conn;
     _auth    = auth;
 }
Exemplo n.º 14
0
 /// <summary>Initializes a new instance of the <see cref="JwtPayload"/> class.</summary>
 public JwtPayload()
     : base(MemberStore.CreateFastGrowingStore())
 {
 }
Exemplo n.º 15
0
 public ViewSystem(SystemStore systems, MemberStore members)
 {
     _systems = systems;
     _members = members;
 }