Beispiel #1
0
        public static Member Create(AddMember action)
        {
            Member member = new Member();

            member.MemberId = action.MemberId;
            member.UserId = action.UserId;
            member.GroupId = action.GroupId;
            member.MemberGroup = action.MemberGroup;
            member.CreateBy = action.CreateBy;
            member.CreateAt = action.CreateAt;
            member.UpdateBy = action.CreateBy;
            member.UpdateAt = action.CreateAt;
            return member;
        }
Beispiel #2
0
        private void ImportWorker(IncludeStatus statusToImport, AddAssembly addAssembly, AddType addType, AddTypeForwarder addTypeForwarder, AddMember addMember)
        {
            foreach (ThinAssembly assembly in _thinModel.Assemblies.Values)
            {
                if (assembly.IncludeStatus == statusToImport)
                    addAssembly(assembly);

                foreach (ThinTypeForwarder typeForwarder in assembly.TypeForwarders.Values)
                {
                    if (typeForwarder.IncludeStatus == statusToImport)
                    {
                        // Assembly may not have already been added because they might not have the correct IncludedStatus.
                        addAssembly(assembly);
                        addTypeForwarder(typeForwarder);
                    }
                }

                foreach (ThinType type in assembly.Types.Values)
                {
                    if (type.IncludeStatus == statusToImport)
                    {
                        // Assembly may not have already been added because they might not have the correct IncludedStatus.
                        addAssembly(assembly);
                        addType(type);
                    }

                    foreach (ThinMember member in type.Members.Values)
                    {
                        if (member.IncludeStatus == statusToImport)
                        {
                            // Assembly and Type may not have already been added because they might not have the correct IncludedStatus.
                            addAssembly(assembly);
                            addType(type);
                            addMember(member);
                        }
                    }
                }
            }
        }
Beispiel #3
0
 public async Task UpdateGroupMember(AddMember model)
 {
     await _httpService.Put("/api/Group/update", model);
 }
Beispiel #4
0
 public async Task AddGroupMember(AddMember model)
 {
     await _httpService.Post("/api/Group/add", model);
 }
Beispiel #5
0
        public bool Forward(AddMember message)
        {
            ClubActorRef.Forward(message);

            return(true);
        }
Beispiel #6
0
        private void ImportWorker(IncludeStatus statusToImport, AddAssembly addAssembly, AddType addType, AddTypeForwarder addTypeForwarder, AddMember addMember)
        {
            foreach (ThinAssembly assembly in _thinModel.Assemblies.Values)
            {
                if (assembly.IncludeStatus == statusToImport)
                {
                    addAssembly(assembly);
                }

                foreach (ThinTypeForwarder typeForwarder in assembly.TypeForwarders.Values)
                {
                    if (typeForwarder.IncludeStatus == statusToImport)
                    {
                        // Assembly may not have already been added because they might not have the correct IncludedStatus.
                        addAssembly(assembly);
                        addTypeForwarder(typeForwarder);
                    }
                }

                foreach (ThinType type in assembly.Types.Values)
                {
                    if (type.IncludeStatus == statusToImport)
                    {
                        // Assembly may not have already been added because they might not have the correct IncludedStatus.
                        addAssembly(assembly);
                        addType(type);
                    }

                    foreach (ThinMember member in type.Members.Values)
                    {
                        if (member.IncludeStatus == statusToImport)
                        {
                            // Assembly and Type may not have already been added because they might not have the correct IncludedStatus.
                            addAssembly(assembly);
                            addType(type);
                            addMember(member);
                        }
                    }
                }
            }
        }
        /// <summary>
        /// Add Window Method
        /// </summary>
        public void AddMethod()
        {
            AddMember add = new AddMember();

            add.Show();
        }
Beispiel #8
0
 public AddMemberView()
 {
     InitializeComponent();
     DataContext    = new AddMember();
     this.Unloaded += (sender, e) => Messenger.Default.Unregister(this);
 }
Beispiel #9
0
        public List<member> ReadCSV()
        {
            int intline = 0;
            System.Collections.Generic.List<member> results = new List<member>();
            var reader = new StreamReader(OFDialog.FileName);
            while (!reader.EndOfStream)
            {
                var line = reader.ReadLine();

                if (!line.Contains("FirstName"))
                {
                    var values = line.Split(',');

                    foreach (var value in values)
                    {
                        if (value.Length == 0)
                        {
                            throw new Exception("Line number " + intline + " is incorrect and cannot be used. The program has stopped and no accounts have been created.");
                        }
                    }


                    ValidateCSVData(values, intline); 
                    AddMember mem = new AddMember();
                    mem.member_given_name = values[0];
                    mem.member_surname = values[1];
                    mem.member_email = values[2];
                    mem.send_welcome_email = Convert.ToBoolean(values[3]);
                    results.Add(mem);
                }

                intline += 1;
               
            }

            return results;
        }