public string AddWish(string cprNo, short companyNo, short departmentNo, byte rooms, short?type)
        {
            /**************** FROM WEB SERVICE ****************/
            string cprNoFormatted = cprNo.Insert(6, "0");

            RestEgBoligTest.EgBoligService.Service10540Client svc = new RestEgBoligTest.EgBoligService.Service10540Client();
            RestEgBoligTest.EgBoligService.Member[]           memberFromService = svc.MemberGetListByCprNo(cprNoFormatted, false);

            short   memberCompanyNo = memberFromService[0].MemberCompanyNo;
            decimal memberNo        = memberFromService[0].MemberNo;

            // to get autoNo
            RestEgBoligTest.EgBoligService.Member member = svc.MemberGet(memberCompanyNo, memberNo);
            // define wish
            RestEgBoligTest.EgBoligService.Wish wish = new RestEgBoligTest.EgBoligService.Wish();

            wish.MemberCompanyNo = memberCompanyNo;
            wish.MemberNo        = memberNo;
            wish.AutoNo          = member.AutoNo;
            wish.CompanyNo       = companyNo;
            wish.DepartmentNo    = departmentNo;
            wish.FloorMax        = 99;
            wish.FloorMin        = -1;
            wish.Room            = rooms;
            wish.SqmMax          = 9999;
            wish.SqmMin          = 0;
            wish.TenancyType     = type;

            // add wish
            svc.WishAdd(wish, null);

            return("Wish added");
        }
        public IEnumerable <Member> Get()
        {
            List <Member> memberList = new List <Member>();

            RestEgBoligTest.EgBoligService.Service10540Client svc = new RestEgBoligTest.EgBoligService.Service10540Client();

            for (int i = 0; i < 10; i++)
            {
                Member member = new Member();
                RestEgBoligTest.EgBoligService.Member memberFromService = svc.MemberGet(1, i + 1);

                member.MemberCompanyNo = memberFromService.MemberCompanyNo;
                member.MemberNo        = memberFromService.MemberNo;
                member.Name            = memberFromService.Name;
                member.Address         = memberFromService.Address;
                member.PostalCodeCity  = memberFromService.PostalCodeCity;
                member.Country         = memberFromService.Country;
                member.CprNo           = memberFromService.CprNo;
                member.Email           = memberFromService.Email;
                member.HomePhone       = memberFromService.HomePhone;
                member.MobilePhone     = memberFromService.MobilePhone;
                member.Children        = memberFromService.Children;

                memberList.Add(member);
            }

            return(memberList);
        }