//==============================================================================================
/// <summary>
/// 
/// </summary>
/// <param name="organization"></param>
/// <returns></returns>
//==============================================================================================
        public async Task<ApiResponse<Organization>> SaveOrganization(Organization organization)
        {
            if (organization.Id == null)
            {
                // Add the item to the sync table

                await InitializeAsync();
                await _controller.InsertAsync(organization);
            }
            else
            {
                await InitializeAsync();
                await _controller.UpdateAsync(organization);
            }

            return null;         
        }
Esempio n. 2
0
        //=================================================================================================================
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        //=================================================================================================================
        public static Organization CreateTestOrganization()
        {
            var contactMethod = new ContactMethod
            {
                System = ContactSystem.Phone,
                Value = "281-897-8766",
                Id = "553ft8246-D56B-419F-9FBC-DC1E5C920885"
            };

            var org = new Organization
            {
                Name = "Acme Inc",
                Id = "557D8246-D56B-419F-9FBC-DC1E5C920885",
                ContactMethod = contactMethod,
                Type = new CodeableConcept("TestOrg"),
                Addresses = SeedTestData.GetTestAddress(),

            };

            return org;
        }
Esempio n. 3
0
//=======================================================================================================
/// <summary>
/// 
/// </summary>
/// <param name="customerId"></param>
/// <returns></returns>
//=======================================================================================================
        private Organization GetOrganization(Guid customerId)
        {
            ////var request       = new HttpRequest("Customer/Get/" + customerId);
            ////var response      = this.Client.SendGetRequestAsync<Customer>(request).Result;
            ////var organization  = new  Organization();
            ////organization.Name = response.Name;
            ////organization.Id   = response.Id.ToString();

            ////return organization;
            var organization  = new  Organization();

            if (customerId.ToString() == "00000000-0000-0000-0000-000000000000")
            {
                organization.Id = "b163c78b-ca9c-41f3-92bb-8f52d0550541";
            }
            else
            {
                organization.Id = customerId.ToString();
            }
               

            return organization;
        }
Esempio n. 4
0
 public Task<ApiResponse<Organization>> SaveOrganization(Organization organization)
 {
     throw new NotImplementedException();
 }
Esempio n. 5
0
 public Task<ApiResponse<Organization>> FindOrganizationDecendant(Organization organization)
 {
     throw new NotImplementedException();
 }