// Load members from the database
        // TODO: Add listview filler to GlobalVariables
        private void LoadMembers()
        {
            string  sqlCommandText = "Select * from [Member]";
            DataSet ds             = Database.SqlQueryDataSet(sqlCommandText);

            MembersList.Clear();

            if (ds.Tables.Count > 0)
            {
                for (int index = 0; index < ds.Tables[0].Rows.Count; ++index)
                {
                    DataRow row = ds.Tables[0].Rows[index];
                    if (row.RowState != DataRowState.Deleted)
                    {
                        MembersList.Add(new MemberModel()
                        {
                            Firstname   = (string)row["firstname"],
                            Lastname    = (string)row["lastname"],
                            Partner     = (bool)row["partner"],
                            MemberSince = (DateTime)row["memberSince"]
                        });
                    }
                }
            }
        }
        public async System.Threading.Tasks.Task Init()
        {
            if (FunctionalFieldsList.Count == 0)
            {
                var functionalFieldsList = await _functionalFieldService.Get <List <FunctionalField> >(null);

                FunctionalFieldsList.Add(new FunctionalField
                {
                    Id   = 0,
                    Name = ""
                });

                foreach (var funcField in functionalFieldsList)
                {
                    FunctionalFieldsList.Add(funcField);
                }
            }
            if (LocalCommitteesList.Count == 0)
            {
                var localCommittees = await _localCommitteeService.Get <List <LocalCommittee> >(null);

                LocalCommitteesList.Add(new LocalCommittee
                {
                    Id   = 0,
                    Name = ""
                });
                foreach (var localCommittee in localCommittees)
                {
                    LocalCommitteesList.Add(localCommittee);
                }
            }
            Model.Search.Member searchMember = new Model.Search.Member();
            if (SelectedFunctionalField != null)
            {
                searchMember.FunctionalFieldId = SelectedFunctionalField.Id;
                var list = await _membersService.Get <IEnumerable <Model.Response.MemberLL> >(searchMember);

                MembersList.Clear();
                foreach (var member in list)
                {
                    MembersList.Add(member);
                }
            }
            if (SelectedLocalCommittee != null)
            {
                searchMember.LocalCommitteeId = SelectedLocalCommittee.Id;
                var list = await _membersService.Get <IEnumerable <Model.Response.MemberLL> >(searchMember);

                MembersList.Clear();
                foreach (var member in list)
                {
                    MembersList.Add(member);
                }
            }
            if (SelectedFunctionalField == null && SelectedLocalCommittee == null)
            {
                var list = await _membersService.Get <IEnumerable <Model.Response.MemberLL> >(null);

                MembersList.Clear();
                foreach (var member in list)
                {
                    MembersList.Add(member);
                }
            }
        }