public static InitialOrgData GetInitialData() { InitialOrgData result = new InitialOrgData(); AuthenticationData authData = GetAuthenticationDataAndCulture(); Organization org = authData.CurrentOrganization; if (org == null || authData.CurrentUser == null) { return(result); // just... don't } result.AccountBitcoinCold = (org.FinancialAccounts.AssetsBitcoinCold != null && org.FinancialAccounts.AssetsBitcoinCold.Active); result.AccountBitcoinHot = (org.FinancialAccounts.AssetsBitcoinHot != null && org.FinancialAccounts.AssetsBitcoinHot.Active); result.AccountPaypal = (org.FinancialAccounts.AssetsPaypal != null && org.FinancialAccounts.AssetsPaypal.Active); result.AccountsForex = (org.FinancialAccounts.IncomeCurrencyFluctuations != null && org.FinancialAccounts.IncomeCurrencyFluctuations.Active); result.AccountsVat = (org.FinancialAccounts.AssetsVatInbound != null && org.FinancialAccounts.AssetsVatInbound.Active); result.ParticipantFinancials = org.ParticipantFinancialsEnabled; result.PaypalAccountAddress = org.PaypalAccountMailAddress; result.GovernmentRegistrationId = org.GovernmentRegistrationId; result.TaxAuthority = org.TaxAuthority; result.TaxPaymentOcr = org.TaxPaymentOcr; result.OpenLedgersDomain = org.OpenLedgersDomain; result.VanityDomain = org.VanityDomain; // TODO: Add all the other fields return(result); }
public static InitialOrgData GetInitialData() { InitialOrgData result = new InitialOrgData(); AuthenticationData authData = GetAuthenticationDataAndCulture(); Organization org = authData.CurrentOrganization; if (org == null || authData.CurrentUser == null) { return(result); // just... don't } result.AccountBitcoinCold = (org.FinancialAccounts.AssetsBitcoinCold != null && org.FinancialAccounts.AssetsBitcoinCold.Active); result.AccountBitcoinHot = (org.FinancialAccounts.AssetsBitcoinHot != null && org.FinancialAccounts.AssetsBitcoinHot.Active); result.AccountPaypal = (org.FinancialAccounts.AssetsPaypal != null && org.FinancialAccounts.AssetsPaypal.Active); result.AccountsForex = (org.FinancialAccounts.IncomeCurrencyFluctuations != null && org.FinancialAccounts.IncomeCurrencyFluctuations.Active); result.AccountsVat = (org.FinancialAccounts.AssetsVatInbound != null && org.FinancialAccounts.AssetsVatInbound.Active); // TODO: Add all the other fields return(result); }
public static InitialOrgData GetInitialData() { InitialOrgData result = new InitialOrgData(); InitialDataSwitches switches = new InitialDataSwitches(); InitialMessages messages = new InitialMessages(); InitialParticipationData participation = new InitialParticipationData(); AuthenticationData authData = GetAuthenticationDataAndCulture(); Organization org = authData.CurrentOrganization; if (org == null || authData.CurrentUser == null) { return(result); // just... don't } switches.AccountBitcoinCold = (org.FinancialAccounts.AssetsBitcoinCold != null && org.FinancialAccounts.AssetsBitcoinCold.Active); switches.AccountBitcoinHot = (org.FinancialAccounts.AssetsBitcoinHot != null && org.FinancialAccounts.AssetsBitcoinHot.Active); switches.AccountPaypal = (org.FinancialAccounts.AssetsPaypal != null && org.FinancialAccounts.AssetsPaypal.Active); switches.AccountsForex = (org.FinancialAccounts.IncomeCurrencyFluctuations != null && org.FinancialAccounts.IncomeCurrencyFluctuations.Active); switches.AccountsVat = (org.FinancialAccounts.AssetsVatInbound != null && org.FinancialAccounts.AssetsVatInbound.Active); switches.VatReportFrequency = org.VatReportFrequencyMonths; switches.ParticipantFinancials = org.ParticipantFinancialsEnabled; switches.PaypalAccountAddress = org.PaypalAccountMailAddress; participation.ApplicationQualifyingScore = org.Parameters.ApplicationQualifyingScore.ToString("N0"); participation.AskParticipantStreet = org.Parameters.AskParticipantStreet; participation.Duration = org.Parameters.ParticipationDuration; participation.Entry = org.Parameters.ParticipationEntry; messages.ApplicationCompleteMail = org.Parameters.ApplicationCompleteMail; messages.ParticipationAcceptedMail = org.Parameters.ParticipationAcceptedMail; messages.SidebarOrgInfo = org.Parameters.SidebarOrgInfo; messages.SignupFirstPage = org.Parameters.SignupFirstPage; messages.SignupLastPage = org.Parameters.SignupLastPage; result.GovernmentRegistrationId = org.GovernmentRegistrationId; result.TaxAuthority = org.TaxAuthority; result.TaxPaymentOcr = org.TaxPaymentOcr; result.OpenLedgersDomain = org.OpenLedgersDomain; result.VanityDomain = org.VanityDomain; // TODO: Add all the other fields result.Switches = switches; result.Messages = messages; result.Participation = participation; return(result); }