Exemplo n.º 1
0
        public void MemberStructHandle(MemberStruct memberStruct)
        {
            string select_str = "select l9,l8,l7,companyId from [lottery].[dbo].[member] with(nolock) ";
            string where_str  = " Where id = @id ";
            var    e          = conn.Query <member>(select_str + where_str,
                                                    new { id = memberStruct.AgentId }).FirstOrDefault();

            select_str = "select defaultBetSetting from [lottery].[dbo].[company] with(nolock) ";
            where_str  = " Where principalId = @principalId ";
            var c = conn.Query <company>(select_str + where_str,
                                         new { principalId = memberStruct.AgentId }).FirstOrDefault();

            member m = new member()
            {
                username       = Guid.NewGuid().ToString("N"),
                password       = null,
                levelId        = Define.MemberLevels.Member,
                companyId      = e.companyId,
                externalId     = memberStruct.ExternalId,
                nickname       = memberStruct.ExternalId,
                parentId       = memberStruct.AgentId,
                createDateTime = DateTime.Now,
                l9             = e.l9,
                l8             = e.l8,
                l7             = e.l7,
                betSetting     = c.defaultBetSetting,
                status         = Define.MemberStauts.Enable
            };

            dcdc.members.InsertOnSubmit(m);
            dcdc.SubmitChanges();
            int a = m.id;

            m.l1 = a;
            dcdc.SubmitChanges();
        }
Exemplo n.º 2
0
 public static ModifyReply UpdateMemberInfo(MemberStruct member)
 {
     return(_client.UpdateMemberInfo(member));
 }
Exemplo n.º 3
0
 public static ModifyReplyForCreateMember CreateMemberInfo(MemberStruct member)
 {
     return(_client.CreateMemberInfo(member));
 }