예제 #1
0
        private void LoadOrganisation()
        {
            // Retrieve the organisation and place it in viewstate
            Facade.IOrganisation facOrganisation = new Facade.Organisation();
            m_organisation               = facOrganisation.GetForIdentityId(m_identityId);
            m_organisationName           = m_organisation.OrganisationName;
            ViewState[C_ORGANISATION_VS] = m_organisation;

            txtOrganisationName.Text = m_organisation.OrganisationName;

            ddStatuses.SelectedValue          = ((int)m_organisation.IdentityStatus).ToString();
            m_originalStatus                  = m_organisation.IdentityStatus;
            ViewState[C_ORIGINALSTATUS_ID_VS] = m_originalStatus;

            // Set the update buttons and labels
            btnAddLocation.Enabled = true;
            btnAdd.Text            = "Update";

            PopulateLocations();

            Repositories.DTOs.GeofenceNotificationSettings settings = facOrganisation.GetSettings(m_identityId);
            if (settings != null)
            {
                cbNotifyWhen_ItemsRequested(cbNotifyWhen, null);

                chkBoxEnableNotification.Checked = settings.Enabled;
                cbNotificationType.SelectedValue = settings.NotificationType.ToString();
                cbNotifyWhen.SelectedValue       = settings.NotifyWhen.ToString();
                txtContactDetail.Text            = settings.Recipient;
            }
        }