Example #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the C7_10tblGPPaymentInstructions EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToC7_10tblGPPaymentInstructions(C7_10tblGPPaymentInstructions c7_10tblGPPaymentInstructions)
 {
     base.AddObject("C7_10tblGPPaymentInstructions", c7_10tblGPPaymentInstructions);
 }
Example #2
0
        private static DeepBlue.Models.Entity.UnderlyingFund GetUnderlyingFundFromBlue(C7_10tblGPPaymentInstructions blueUFund)
        {
            DeepBlue.Models.Entity.UnderlyingFund uf = new DeepBlue.Models.Entity.UnderlyingFund();
            uf.EntityID = Globals.DefaultEntityID;
            // ToDO: IssuerID
            uf.FundName = blueUFund.Fund;
            uf.FundTypeID = GetFundType(blueUFund.FundType);
            uf.IsFeesIncluded = blueUFund.FeesInside.HasValue ? blueUFund.FeesInside.Value : false;
            uf.VintageYear = blueUFund.VintageYear.HasValue ? (short?)blueUFund.VintageYear : null;
            // TODO: Convert FundSize to money in DB and re-gen the model
            uf.TotalSize = Convert.ToInt32(blueUFund.FundSize);
            if (blueUFund.TerminationDate.HasValue) {
                uf.TerminationYear = Convert.ToInt16(blueUFund.TerminationDate.Value.Year);
            }

            // WARNING: these fields are present in blue but absent in deepblue
            // What are these fields used for in blue?
            //blueUFund.Website;
            //blueUFund.WebLogin;
            //blueUFund.WebPassword;

            uf.IndustryID = GetIndustryFocus(blueUFund.Industry_Focus);
            uf.GeographyID = Globals.Geograpies.First().GeographyID;
            uf.ReportingFrequencyID = GetReportingFrequency(blueUFund.Reporting);
            uf.ReportingTypeID = GetReportingType(blueUFund.ReportingType);
            uf.Description = Globals.DefaultString;

            Contact contact = new Contact();
            contact.ContactName = blueUFund.ContactName;
            if (!string.IsNullOrEmpty(blueUFund.Phone)) {
                Communication comm = new Communication() { CommunicationTypeID = (int)DeepBlue.Models.Admin.Enums.CommunicationType.WorkPhone, CommunicationValue = blueUFund.Phone };
                contact.ContactCommunications.Add(new ContactCommunication() { Communication = comm });
            }

            if (!string.IsNullOrEmpty(blueUFund.Email_address)) {
                Communication comm = new Communication() { CommunicationTypeID = (int)DeepBlue.Models.Admin.Enums.CommunicationType.Email, CommunicationValue = blueUFund.Email_address };
                contact.ContactCommunications.Add(new ContactCommunication() { Communication = comm });
            }

            //uf.FundRegisteredOfficeID
            // TODO: use uf.FundRegisteredOfficeID to store the address
            Address address = new Address();
            address.Address1 = blueUFund.MailingAddress1;
            address.Address2 = blueUFund.MailingAddress2;
            string[] parts = new string[3];
            if (Util.ParseAddress(address.Address2, out parts)) {
                address.City = parts[0];
                address.State = Globals.States.Where(x => x.Abbr == parts[1].ToUpper().Trim()).First().StateID;
                address.PostalCode = parts[2];
            }

            address.AddressTypeID = (int)DeepBlue.Models.Admin.Enums.AddressType.Work;
            address.Country = Globals.DefaultCountryID;
            //ContactAddress contactAddress = new ContactAddress();
            //     contactAddress.Address = address;
            // contact.ContactAddresses.Add(contactAddress);

            Account account = new Account();
            account.BankName = blueUFund.Bank;
            account.Routing = Convert.ToInt32(blueUFund.ABANumber.Replace("-", string.Empty).Replace(" ", string.Empty));
            account.AccountOf = blueUFund.Accountof;
            account.Account1 = blueUFund.AccountNumber;

            account.Attention = blueUFund.Attn;
            account.Reference = blueUFund.Reference;
            // WARNING: the following fields are present in DeepBlue, but are not present in Blue
            //uf.LegalFundName
            //uf.FiscalYearEnd
            //uf.IsDomestic
            //uf.FundStructureId
            //uf.Taxable
            //uf.Exempt
            //uf.AddressID
            //uf.managementfee
            //uf.incentivefee
            //uf.taxrate
            //uf.auditorname
            //uf.managercontactid
            //uf.shareclasstypeid
            //uf.investmenttypeid
            //account.Phone;
            //account.Fax;
            //account.IBAN;
            //account.FFC;
            //account.FFCNumber;
            //account.SWIFT;
            //account.AccountNumberCash

            return uf;
        }
Example #3
0
 /// <summary>
 /// Create a new C7_10tblGPPaymentInstructions object.
 /// </summary>
 /// <param name="fund">Initial value of the Fund property.</param>
 /// <param name="sSMA_TimeStamp">Initial value of the SSMA_TimeStamp property.</param>
 public static C7_10tblGPPaymentInstructions CreateC7_10tblGPPaymentInstructions(global::System.String fund, global::System.Byte[] sSMA_TimeStamp)
 {
     C7_10tblGPPaymentInstructions c7_10tblGPPaymentInstructions = new C7_10tblGPPaymentInstructions();
     c7_10tblGPPaymentInstructions.Fund = fund;
     c7_10tblGPPaymentInstructions.SSMA_TimeStamp = sSMA_TimeStamp;
     return c7_10tblGPPaymentInstructions;
 }
Example #4
0
        private static DeepBlue.Models.Entity.UnderlyingFund GetUnderlyingFundFromBlue(C7_10tblGPPaymentInstructions blueUFund, out Address fundRegisteredOffice)
        {
            DeepBlue.Models.Entity.UnderlyingFund uf = new DeepBlue.Models.Entity.UnderlyingFund();
            uf.EntityID = Globals.DefaultEntityID;
            // ToDO: IssuerID
            uf.FundName = blueUFund.Fund;
            uf.FundTypeID = GetFundType(blueUFund.FundType);
            uf.IsFeesIncluded = blueUFund.FeesInside.HasValue ? blueUFund.FeesInside.Value : false;
            uf.VintageYear = blueUFund.VintageYear.HasValue ? (short?)blueUFund.VintageYear : null;
            // TODO: Convert FundSize to money in DB and re-gen the model
            try {
                uf.TotalSize = Convert.ToInt32(blueUFund.FundSize);
            } catch {
                uf.TotalSize = Int32.MaxValue;
            }
            if (blueUFund.TerminationDate.HasValue) {
                uf.TerminationYear = Convert.ToInt16(blueUFund.TerminationDate.Value.Year);
            }

            // WARNING: these fields are present in blue but absent in deepblue
            // What are these fields used for in blue?
            //blueUFund.Website;
            uf.GeographyID = Globals.Geograpies.First().GeographyID;
            // WARNING: We dont use the InvestmentTypeID. Do we really need this?
            // uf.InvestmentTypeID
            // ShareClass type can be added via the admin screen. However, we dont ask for it when creating a new UF. Should we not ask for it?
            // uf.ShareClassType
            // We dont use this field,a s there is no UI element for it.
            // uf.FundStructureID
            uf.WebUserName = blueUFund.WebLogin;
            uf.WebPassword = blueUFund.WebPassword;

            uf.IndustryID = GetIndustryFocus(blueUFund.Industry_Focus);
            uf.ReportingFrequencyID = GetReportingFrequency(blueUFund.Reporting);
            uf.ReportingTypeID = GetReportingType(blueUFund.ReportingType);
            uf.Description = Globals.DefaultString + blueUFund.Comments ?? string.Empty;
            // description cannot be over 100 characters
            if (uf.Description.Length > 100) {
                uf.Description = uf.Description.Substring(0, 100);
            }

            Contact contact = new Contact();
            contact.ContactName = blueUFund.ContactName;
            if (!string.IsNullOrEmpty(blueUFund.Phone)) {
                Communication comm = new Communication() { CommunicationTypeID = (int)DeepBlue.Models.Admin.Enums.CommunicationType.WorkPhone, CommunicationValue = blueUFund.Phone };
                contact.ContactCommunications.Add(new ContactCommunication() { Communication = comm });
            }
            if (!string.IsNullOrEmpty(blueUFund.Email_address)) {
                Communication comm = new Communication() { CommunicationTypeID = (int)DeepBlue.Models.Admin.Enums.CommunicationType.Email, CommunicationValue = blueUFund.Email_address };
                contact.ContactCommunications.Add(new ContactCommunication() { Communication = comm });
            }
            if (!string.IsNullOrEmpty(contact.ContactName)) {
                uf.UnderlyingFundContacts.Add(new UnderlyingFundContact() { Contact = contact });
            }

            //uf.FundRegisteredOfficeID
            // TODO: use uf.FundRegisteredOfficeID to store the address
            // This is the Fund's registered office address, and not the contact's address
            Address address = null;
            if (!string.IsNullOrEmpty(blueUFund.MailingAddress1) || !string.IsNullOrEmpty(blueUFund.MailingAddress2)) {
                address = new Address();
                if (!string.IsNullOrEmpty(blueUFund.MailingAddress1)) {
                    address.Address1 = blueUFund.MailingAddress1;
                } else {
                    address.Address1 = Globals.DefaultStringValue;
                }

                // Address 1 has to be less than or equal to 40 characters
                if (address.Address1.Length > 40) {
                    address.Address1 = address.Address1.Substring(0, 40);
                }

                address.Address2 = blueUFund.MailingAddress2;
                // Address 2 has to be less than or equal to 40 characters
                if (!string.IsNullOrEmpty(address.Address2) && address.Address2.Length > 40) {
                    address.Address2 = address.Address2.Substring(0, 40);
                }
                //string[] parts = new string[3];
                //if (Util.ParseAddress(address.Address2, out parts)) {
                //    address.City = parts[0];
                //    address.State = Globals.States.Where(x => x.Abbr == parts[1].ToUpper().Trim()).First().StateID;
                //    address.PostalCode = parts[2];
                //}
                Util.SetAddress(address.Address2, address);

                address.AddressTypeID = (int)DeepBlue.Models.Admin.Enums.AddressType.Work;
                address.Country = Globals.DefaultCountryID;
            } else {
                // We have to have the address.. The UI enforces us to have an address
                address = new Address();
                address.Address1 = Globals.DefaultAddress1;
                address.AddressTypeID = (int)DeepBlue.Models.Admin.Enums.AddressType.Work;
                address.City = Globals.DefaultCity;
                address.State = Globals.DefaultStateID;
                address.PostalCode = Globals.DefaultZip;
                address.Country = Globals.DefaultCountryID;
                messageLog.AppendLine("WARNING: " + uf.FundName + " doesnt have an address, so using default address");
            }

            fundRegisteredOffice = address;
            // You have to have an account# for a successful account to be created
            if (!string.IsNullOrEmpty(blueUFund.AccountNumber)) {
                Account account = new Account();
                account.BankName = blueUFund.Bank;
                try {
                    account.Routing = Convert.ToInt32(blueUFund.ABANumber.Replace("-", string.Empty).Replace(" ", string.Empty));
                } catch {
                    account.Routing = 111000025;
                }
                account.AccountOf = blueUFund.Accountof;
                if (!string.IsNullOrEmpty(blueUFund.AccountNumber)) {
                    account.Account1 = blueUFund.AccountNumber;
                } else {
                    account.Account1 = "dummy_account";
                }
                account.Attention = blueUFund.Attn;
                account.Reference = blueUFund.Reference;
                uf.Account = account;
            }

            // WARNING: the following fields are present in DeepBlue, but are not present in Blue
            //uf.LegalFundName
            uf.LegalFundName = uf.FundName;
            //uf.FiscalYearEnd
            //uf.IsDomestic
            //uf.FundStructureId
            //uf.Taxable
            //uf.Exempt
            //uf.AddressID
            //uf.managementfee
            //uf.incentivefee
            //uf.taxrate
            //uf.auditorname
            //uf.managercontactid
            //uf.shareclasstypeid
            //uf.investmenttypeid
            //account.Phone;
            //account.Fax;
            //account.IBAN;
            //account.FFC;
            //account.FFCNumber;
            //account.SWIFT;
            //account.AccountNumberCash
            return uf;
        }