示例#1
0
        public static string generateApprovedSwitch(clsSwitch Switch, int IFAID)
        {
            string resultingRow = string.Empty;

            foreach (clsSwitchDetails SwitchDetails in Switch.propSwitchDetails)
            {
                clsFund Fund  = new clsFund(SwitchDetails.propFundID);
                string  myRow = ROWDETAILS.Replace("{^row$}", clsOutput.CELLDETAILS);
                myRow         = myRow.Replace("{^FundCompany$}", new clsCompany(Fund.propFundManager).propCompany);
                myRow         = myRow.Replace("{^FundName$}", Fund.propFundName);
                myRow         = myRow.Replace("{^InsurComp$}", Fund.propCompanyID.ToString());
                myRow         = myRow.Replace("{^SEDOL$}", Fund.propSEDOL);
                myRow         = myRow.Replace("{^%Portfolio$}", SwitchDetails.propAllocation + "%");
                resultingRow += myRow;
            }
            clsClient client = new clsClient(Switch.propClientID);
            string    html   = clsOutput.PortfolioOutput_GetHTML();
            clsIFA    IFA    = new clsIFA(IFAID);

            html = html.Replace("{^IFAName$}", IFA.propIFA_Name ?? string.Empty);
            html = html.Replace("{^ClientName$}", (client.propForename ?? String.Empty) + " " + (client.propSurname ?? string.Empty));
            html = html.Replace("{^Company$}", Switch.propPortfolio.propCompany);
            html = html.Replace("{^PType$}", Switch.propPortfolio.propPortfolioType);
            html = html.Replace("{^DateTransmit$}", "???"); // DateTime.Now.ToString("MM-dd-yyyy")); //-->Temporary
            html = html.Replace("{^Curr$}", Switch.propPortfolio.propPortfolioCurrency);
            html = html.Replace("{^AccNum$}", Switch.propPortfolio.propAccountNumber);
            html = html.Replace("{^DateApprv$}", DateTime.Now.ToString("MM-dd-yyyy") ?? String.Empty);// Portfolio.propSwitch.propDate_Created.ToString("MM-dd-yyyy") ?? string.Empty);

            if (Switch.propPortfolio.propConfirmationRequired)
            {
                html = html.Replace("{^Sign$}", clsOutput.SIGNATURE)
                       .Replace("{^SignatureClientName$}", client.propForename + " " + client.propSurname);
            }
            else
            {
                html = html.Replace("{^Sign$}", string.Empty);
            }
            html = html.Replace("{^SwitchDetails$}", resultingRow);
            return(html);
        }
示例#2
0
        public static List<clsIFA> getIFAList()
        {
            List<clsIFA> oIFAList = new List<clsIFA>();
            SqlConnection con = new clsSystem_DBConnection(clsSystem_DBConnection.strConnectionString.NavIntegrationDB).propConnection;
            SqlCommand cmd = new SqlCommand();
            SqlDataReader dr;

            con.Open();
            cmd.Connection = con;
            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.CommandText = "SWITCH_IFAGet";

            cmd.Parameters.Add("@param_intIFA_ID", System.Data.SqlDbType.Int).Value = 0;

            dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                clsIFA oIFA = new clsIFA();
                oIFA.propIFA_ID = int.Parse(dr["IFA_ID"].ToString().Trim());
                oIFA.propIFA_Name = dr["IFA_Name"].ToString().Trim();

                oIFAList.Add(oIFA);
            }
            return oIFAList;
        }
示例#3
0
        public static string generateApprovedSwitchScheme(clsScheme Scheme)
        {
            string HoldingsRows = string.Empty;
            clsSwitchScheme switchScheme = new clsSwitchScheme(Scheme);
            foreach(clsSwitchScheme.clsSwitchSchemeDetails details in switchScheme.propSwitchDetails)
            {
                string myRow = clsOutput.ROWDETAILS.Replace("{^row$}", clsOutput.CELLDETAILS);
                myRow = myRow.Replace("{^FundCompany$}", details.propFund.propCompanyID.ToString() /* (new clsFund(details.propFund.propFundID)).propCompanyID.ToString()*/);
                myRow = myRow.Replace("{^FundName$}", details.propFund.propFundName);
                myRow = myRow.Replace("{^InsurComp$}", "None");
                myRow = myRow.Replace("{^SEDOL$}", details.propFund.propSEDOL);
                myRow = myRow.Replace("{^%Portfolio$}", details.propAllocation.ToString("N2") + "%");
                HoldingsRows += myRow;
            }
            string Contribution = string.Empty;
            foreach(clsSwitchScheme.clsSwitchSchemeDetails details in switchScheme.propSwitchDetailsContribution)
            {
                string myRow = clsOutput.ROWDETAILS.Replace("{^row$}", clsOutput.CELLDETAILS);
                myRow = myRow.Replace("{^FundCompany$}", details.propFund.propCompanyID.ToString() /* (new clsFund(details.propFund.propFundID)).propCompanyID.ToString()*/);
                myRow = myRow.Replace("{^FundName$}", details.propFund.propFundName);
                myRow = myRow.Replace("{^InsurComp$}", "None");
                myRow = myRow.Replace("{^SEDOL$}", details.propFund.propSEDOL);
                myRow = myRow.Replace("{^%Portfolio$}", details.propAllocation.ToString("N2") + "%");
                Contribution += myRow;
            }
            string html = SchemeOutput_GetHTML();
            html = html.Replace("{^PortfolioHoldings$}", HoldingsRows);
            html = html.Replace("{^Contribution$}", Contribution);

            clsClient client = new clsClient(Scheme.propClient.propClientID);
            clsIFA IFA = new clsIFA(int.Parse(HttpContext.Current.Session["ifaid"].ToString()));
            html = html.Replace("{^IFAName$}", IFA.propIFA_Name);
            html = html.Replace("{^ClientName$}", client.propForename + " " + client.propSurname);
            html = html.Replace("{^Company$}", Scheme.propCompany.propCompany);
            html = html.Replace("{^PType$}", Scheme.propPortfolioType);
            html = html.Replace("{^DateTransmit$}", "?"); //-->Temporary
            html = html.Replace("{^Curr$}", Scheme.propSchemeCurrency);
            html = html.Replace("{^AccNum$}", Scheme.propAccountNumber);
            html = html.Replace("{^DateApprv$}", DateTime.Now.ToString("MM-dd-yyyy") ?? String.Empty);
            if (Scheme.propConfirmationRequired)
            {
                html = html.Replace("{^Sign$}", clsOutput.SIGNATURE);
                html = html.Replace("{^SignatureClientName$}", client.propForename + " " + client.propSurname);
            }
            else
            {
                html = html.Replace("{^Sign$}", string.Empty);
            }
            return html;
        }
示例#4
0
        public static string generateApprovedSwitch(clsSwitch Switch, int IFAID)
        {
            string resultingRow = string.Empty;
            foreach (clsSwitchDetails SwitchDetails in Switch.propSwitchDetails)
            {
                clsFund Fund = new clsFund(SwitchDetails.propFundID);
                string myRow = ROWDETAILS.Replace("{^row$}", clsOutput.CELLDETAILS);
                myRow = myRow.Replace("{^FundCompany$}", new clsCompany(Fund.propFundManager).propCompany);
                myRow = myRow.Replace("{^FundName$}", Fund.propFundName);
                myRow = myRow.Replace("{^InsurComp$}", Fund.propCompanyID.ToString());
                myRow = myRow.Replace("{^SEDOL$}", Fund.propSEDOL);
                myRow = myRow.Replace("{^%Portfolio$}", SwitchDetails.propAllocation + "%");
                resultingRow += myRow;
            }
            clsClient client = new clsClient(Switch.propClientID);
            string html = clsOutput.PortfolioOutput_GetHTML();
            clsIFA IFA = new clsIFA(IFAID);            

            html = html.Replace("{^IFAName$}", IFA.propIFA_Name ?? string.Empty);
            html = html.Replace("{^ClientName$}",(client.propForename ?? String.Empty) + " " + (client.propSurname ?? string.Empty)  );
            html = html.Replace("{^Company$}", Switch.propPortfolio.propCompany);
            html = html.Replace("{^PType$}", Switch.propPortfolio.propPortfolioType);
            html = html.Replace("{^DateTransmit$}", "???"); // DateTime.Now.ToString("MM-dd-yyyy")); //-->Temporary
            html = html.Replace("{^Curr$}", Switch.propPortfolio.propPortfolioCurrency);
            html = html.Replace("{^AccNum$}", Switch.propPortfolio.propAccountNumber);
            html = html.Replace("{^DateApprv$}", DateTime.Now.ToString("MM-dd-yyyy") ?? String.Empty);// Portfolio.propSwitch.propDate_Created.ToString("MM-dd-yyyy") ?? string.Empty);

            if (Switch.propPortfolio.propConfirmationRequired)
            {
                html = html.Replace("{^Sign$}", clsOutput.SIGNATURE)
                    .Replace("{^SignatureClientName$}", client.propForename + " " + client.propSurname );
            }
            else
            {
                html = html.Replace("{^Sign$}", string.Empty);
            }
            html = html.Replace("{^SwitchDetails$}", resultingRow);
            return html;
        }