Ejemplo n.º 1
0
        public static void transferClientSwitchToIFA(List <clsSwitchDetails_Client> listClientSwitchDetails, string strUserID)
        {
            clsSwitch SwitchIFA = new clsSwitch(listClientSwitchDetails[0].propSwitchID);

            string strClientID    = SwitchIFA.propClientID;
            string strPortfolioID = SwitchIFA.propPortfolioID;

            List <clsSwitchDetails> listSwitchDetailsIFA = new clsPortfolio(strClientID, strPortfolioID, strUserID).propSwitch.propSwitchDetails;

            foreach (clsSwitchDetails SwitchDetailsIFA in listSwitchDetailsIFA)
            {
                clsSwitchDetails.removeSwitchDetails(SwitchDetailsIFA.propSwitchDetailsID);
            }

            List <clsSwitchDetails> newListSwitchDetails = new List <clsSwitchDetails>();

            foreach (clsSwitchDetails_Client SwitchDetails_Client in listClientSwitchDetails)
            {
                clsSwitchDetails newSwitchDetails = new clsSwitchDetails();
                newSwitchDetails.propSwitchID    = SwitchIFA.propSwitchID;
                newSwitchDetails.propFund        = new clsFund(SwitchDetails_Client.propFund.propFundID);
                newSwitchDetails.propAllocation  = SwitchDetails_Client.propAllocation;
                newSwitchDetails.propIsDeletable = SwitchDetails_Client.propIsDeletable;

                newListSwitchDetails.Add(newSwitchDetails);
            }

            clsSwitchDetails.insertSwitchDetails(newListSwitchDetails, strUserID, SwitchIFA.propSwitchID);
        }
Ejemplo n.º 2
0
 public clsPortfolio(string strClientID, string strPortfolioID, string strUserId)
 {
     getPortfolioHeader(strClientID, strPortfolioID);
     this.listPortfolioDetails = getPortfolioDetails(strClientID, strPortfolioID);
     this.Client       = new clsClient(strClientID);
     this.Switch       = new clsSwitch(this, strUserId);
     this.SwitchClient = new clsSwitch_Client(propSwitch.propSwitchID);
 }
Ejemplo n.º 3
0
        public static List <clsSwitch> getSwitchList(int[] intSwitches)
        {
            List <clsSwitch> oSwitchList = new List <clsSwitch>();
            SqlConnection    con         = new clsSystem_DBConnection(clsSystem_DBConnection.strConnectionString.NavIntegrationDB).propConnection;


            con.Open();
            for (int i = 0; i < intSwitches.Length; i++)
            {
                SqlCommand    cmd = new SqlCommand();
                SqlDataReader dr;

                cmd.Connection  = con;
                cmd.CommandType = System.Data.CommandType.StoredProcedure;
                cmd.CommandText = "[SWITCH_HeaderGet]";

                cmd.Parameters.Add("@param_intSwitchID", System.Data.SqlDbType.Int).Value = intSwitches[i];

                dr = cmd.ExecuteReader();

                while (dr.Read())
                {
                    clsSwitch oSwitch = new clsSwitch();
                    oSwitch.propSwitchID     = int.Parse(dr["SwitchID"].ToString());
                    oSwitch.propPortfolioID  = dr["PortfolioID"].ToString();
                    oSwitch.propClientID     = dr["ClientID"].ToString();
                    oSwitch.propStatus       = short.Parse(dr["Status"].ToString());
                    oSwitch.propStatusString = clsSwitch.getSwitchStringStatus(oSwitch.propStatus);
                    oSwitch.propDate_Created = dr["Date_Created"] != System.DBNull.Value ? DateTime.Parse(dr["Date_Created"].ToString()) : DateTime.ParseExact("01/01/1800", "dd/MM/yyyy", null);
                    oSwitch.propCreated_By   = dr["Created_By"].ToString();
                    oSwitch.propDescription  = dr["Description"].ToString();
                    oSwitch.propSwitchClient = new clsClient(oSwitch.propClientID);
                    oSwitch.propPortfolio    = new clsPortfolio(oSwitch.propClientID, oSwitch.propPortfolioID);

                    oSwitchList.Add(oSwitch);
                }
                dr.Close();
                dr.Dispose();
                cmd.Dispose();
            }
            con.Close();
            con.Dispose();

            return(oSwitchList);
        }
Ejemplo n.º 4
0
        public static List <clsSwitch> getSwitchList(int intIFA_ID, string strClientName, string strCompany, int intStatus, string strStartDate, string strEndDate)
        {
            List <clsSwitch> oSwitchList = new List <clsSwitch>();

            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_HeaderGetAllByIFA]";

            cmd.Parameters.Add("@param_IFA_ID", System.Data.SqlDbType.Int).Value          = intIFA_ID;
            cmd.Parameters.Add("@param_ClientName", System.Data.SqlDbType.NVarChar).Value = strClientName;
            cmd.Parameters.Add("@param_Company", System.Data.SqlDbType.NVarChar).Value    = strCompany;
            cmd.Parameters.Add("@param_Status", System.Data.SqlDbType.Int).Value          = intStatus;
            cmd.Parameters.Add("@param_StartDate", System.Data.SqlDbType.NVarChar).Value  = strStartDate;
            cmd.Parameters.Add("@param_EndDate", System.Data.SqlDbType.NVarChar).Value    = strEndDate;
            dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                clsSwitch oSwitch = new clsSwitch();
                oSwitch.propSwitchID     = int.Parse(dr["SwitchID"].ToString());
                oSwitch.propPortfolioID  = dr["PortfolioID"].ToString();
                oSwitch.propClientID     = dr["ClientID"].ToString();
                oSwitch.propStatus       = short.Parse(dr["Status"].ToString());
                oSwitch.propStatusString = clsSwitch.getSwitchStringStatus(oSwitch.propStatus);
                oSwitch.propDate_Created = dr["Date_Created"] != System.DBNull.Value ? DateTime.Parse(dr["Date_Created"].ToString()) : DateTime.ParseExact("01/01/1800", "dd/MM/yyyy", null);
                oSwitch.propCreated_By   = dr["Created_By"].ToString();
                oSwitch.propDescription  = dr["Description"].ToString();
                oSwitch.propSwitchClient = new clsClient(oSwitch.propClientID);
                oSwitch.propPortfolio    = new clsPortfolio(oSwitch.propClientID, oSwitch.propPortfolioID);

                oSwitchList.Add(oSwitch);
            }

            con.Close();
            cmd.Dispose();
            con.Dispose();

            return(oSwitchList);
        }
        private void populateSwitchDetails(clsSwitch oSwitch)
        {
            List<clsSwitchDetails> oSwitchDetails = oSwitch.propSwitchDetails;
            this.gvSwitchDetails.DataSource = oSwitchDetails;
            this.gvSwitchDetails.DataBind();

            this.lblSwitchStatusValue.Text = oSwitch.propStatusString;
            int intStatus = oSwitch.propStatus;

            if (intStatus != (int)clsSwitch.enumSwitchStatus.Locked)
            {
                btnResetSecurityCode.Visible = false;
            }
            Label gvSwitchDetailsFooterLabelTotalValue = (Label)this.gvSwitchDetails.FooterRow.Cells[3].FindControl("gvSwitchDetailsFooterLabelTotalValue");
            gvSwitchDetailsFooterLabelTotalValue.Text = oSwitchDetails[0].propTotalValue.ToString("n0");

            Label gvSwitchDetailsFooterLabelTotalTargetAllocation = (Label)this.gvSwitchDetails.FooterRow.Cells[4].FindControl("gvSwitchDetailsFooterLabelTotalTargetAllocation");
            gvSwitchDetailsFooterLabelTotalTargetAllocation.Text = oSwitchDetails[oSwitchDetails.Count - 1].propTotalAllocation.ToString("n2");
        }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
0
        private void populateSwitchDetails(clsSwitch oSwitch)
        {
            List <clsSwitchDetails> oSwitchDetails = oSwitch.propSwitchDetails;

            this.gvSwitchDetails.DataSource = oSwitchDetails;
            this.gvSwitchDetails.DataBind();

            this.lblSwitchStatusValue.Text = oSwitch.propStatusString;
            int intStatus = oSwitch.propStatus;

            if (intStatus != (int)clsSwitch.enumSwitchStatus.Locked)
            {
                btnResetSecurityCode.Visible = false;
            }
            Label gvSwitchDetailsFooterLabelTotalValue = (Label)this.gvSwitchDetails.FooterRow.Cells[3].FindControl("gvSwitchDetailsFooterLabelTotalValue");

            gvSwitchDetailsFooterLabelTotalValue.Text = oSwitchDetails[0].propTotalValue.ToString("n0");

            Label gvSwitchDetailsFooterLabelTotalTargetAllocation = (Label)this.gvSwitchDetails.FooterRow.Cells[4].FindControl("gvSwitchDetailsFooterLabelTotalTargetAllocation");

            gvSwitchDetailsFooterLabelTotalTargetAllocation.Text = oSwitchDetails[oSwitchDetails.Count - 1].propTotalAllocation.ToString("n2");
        }
Ejemplo n.º 8
0
        public static void transferClientSwitchToIFA(List<clsSwitchDetails_Client> listClientSwitchDetails, string strUserID)
        {

            clsSwitch SwitchIFA = new clsSwitch(listClientSwitchDetails[0].propSwitchID);

            string strClientID = SwitchIFA.propClientID;
            string strPortfolioID = SwitchIFA.propPortfolioID;

            List<clsSwitchDetails> listSwitchDetailsIFA = new clsPortfolio(strClientID, strPortfolioID, strUserID).propSwitch.propSwitchDetails;

            foreach (clsSwitchDetails SwitchDetailsIFA in listSwitchDetailsIFA)
            {
                clsSwitchDetails.removeSwitchDetails(SwitchDetailsIFA.propSwitchDetailsID);
            }

            List<clsSwitchDetails> newListSwitchDetails = new List<clsSwitchDetails>();

            foreach (clsSwitchDetails_Client SwitchDetails_Client in listClientSwitchDetails)
            {
                clsSwitchDetails newSwitchDetails = new clsSwitchDetails();
                newSwitchDetails.propSwitchID = SwitchIFA.propSwitchID;
                newSwitchDetails.propFund = new clsFund(SwitchDetails_Client.propFund.propFundID);
                newSwitchDetails.propAllocation = SwitchDetails_Client.propAllocation;
                newSwitchDetails.propIsDeletable = SwitchDetails_Client.propIsDeletable;

                newListSwitchDetails.Add(newSwitchDetails);

            }

            clsSwitchDetails.insertSwitchDetails(newListSwitchDetails, strUserID, SwitchIFA.propSwitchID);
        }
Ejemplo n.º 9
0
        public static List<clsSwitch> getSwitchList(int[] intSwitches)
        {
            List<clsSwitch> oSwitchList = new List<clsSwitch>();
            SqlConnection con = new clsSystem_DBConnection(clsSystem_DBConnection.strConnectionString.NavIntegrationDB).propConnection;


            con.Open();
            for (int i = 0; i < intSwitches.Length; i++)
            {
                SqlCommand cmd = new SqlCommand();
                SqlDataReader dr;

                cmd.Connection = con;
                cmd.CommandType = System.Data.CommandType.StoredProcedure;
                cmd.CommandText = "[SWITCH_HeaderGet]";

                cmd.Parameters.Add("@param_intSwitchID", System.Data.SqlDbType.Int).Value = intSwitches[i];

                dr = cmd.ExecuteReader();

                while (dr.Read())
                {
                    clsSwitch oSwitch = new clsSwitch();
                    oSwitch.propSwitchID = int.Parse(dr["SwitchID"].ToString());
                    oSwitch.propPortfolioID = dr["PortfolioID"].ToString();
                    oSwitch.propClientID = dr["ClientID"].ToString();
                    oSwitch.propStatus = short.Parse(dr["Status"].ToString());
                    oSwitch.propStatusString = clsSwitch.getSwitchStringStatus(oSwitch.propStatus);
                    oSwitch.propDate_Created = dr["Date_Created"] != System.DBNull.Value ? DateTime.Parse(dr["Date_Created"].ToString()) : DateTime.ParseExact("01/01/1800", "dd/MM/yyyy", null);
                    oSwitch.propCreated_By = dr["Created_By"].ToString();
                    oSwitch.propDescription = dr["Description"].ToString();
                    oSwitch.propSwitchClient = new clsClient(oSwitch.propClientID);
                    oSwitch.propPortfolio = new clsPortfolio(oSwitch.propClientID, oSwitch.propPortfolioID);

                    oSwitchList.Add(oSwitch);
                }
                dr.Close();
                dr.Dispose();
                cmd.Dispose();
            }
            con.Close();
            con.Dispose();

            return oSwitchList;
        }
Ejemplo n.º 10
0
        public static List<clsSwitch> getSwitchList(int intIFA_ID, string strClientName, string strCompany, int intStatus, string strStartDate, string strEndDate)
        {
            List<clsSwitch> oSwitchList = new List<clsSwitch>();

            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_HeaderGetAllByIFA]";

            cmd.Parameters.Add("@param_IFA_ID", System.Data.SqlDbType.Int).Value = intIFA_ID;
            cmd.Parameters.Add("@param_ClientName", System.Data.SqlDbType.NVarChar).Value = strClientName;
            cmd.Parameters.Add("@param_Company", System.Data.SqlDbType.NVarChar).Value = strCompany;
            cmd.Parameters.Add("@param_Status", System.Data.SqlDbType.Int).Value = intStatus;
            cmd.Parameters.Add("@param_StartDate", System.Data.SqlDbType.NVarChar).Value = strStartDate;
            cmd.Parameters.Add("@param_EndDate", System.Data.SqlDbType.NVarChar).Value = strEndDate;
            dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                clsSwitch oSwitch = new clsSwitch();
                oSwitch.propSwitchID = int.Parse(dr["SwitchID"].ToString());
                oSwitch.propPortfolioID = dr["PortfolioID"].ToString();
                oSwitch.propClientID = dr["ClientID"].ToString();
                oSwitch.propStatus = short.Parse(dr["Status"].ToString());
                oSwitch.propStatusString = clsSwitch.getSwitchStringStatus(oSwitch.propStatus);
                oSwitch.propDate_Created = dr["Date_Created"] != System.DBNull.Value ? DateTime.Parse(dr["Date_Created"].ToString()) : DateTime.ParseExact("01/01/1800", "dd/MM/yyyy", null);
                oSwitch.propCreated_By = dr["Created_By"].ToString();
                oSwitch.propDescription = dr["Description"].ToString();
                oSwitch.propSwitchClient = new clsClient(oSwitch.propClientID);
                oSwitch.propPortfolio = new clsPortfolio(oSwitch.propClientID, oSwitch.propPortfolioID);

                oSwitchList.Add(oSwitch);
            }

            con.Close();
            cmd.Dispose();
            con.Dispose();

            return oSwitchList;
        }
Ejemplo n.º 11
0
        public static List <clsSwitchDetails_Client> getSwitchDetails(int intSwitchID)
        {
            SqlConnection con1 = new clsSystem_DBConnection(clsSystem_DBConnection.strConnectionString.NavIntegrationDB).propConnection;
            List <clsSwitchDetails_Client> listSwitchDetails = new List <clsSwitchDetails_Client>();

            clsSwitch    IFASwitch = new clsSwitch(intSwitchID);
            clsPortfolio Portfolio = new clsPortfolio(IFASwitch.propClientID.ToString(), IFASwitch.propPortfolioID);

            //throw new Exception(Portfolio.propPortfolioDetails.Count.ToString());
            //throw new Exception(intSwitchID.ToString() + " - " + IFASwitch.propPortfolioID);

            SqlCommand    cmd = new SqlCommand();
            SqlDataReader dr1;

            con1.Open();
            cmd.Connection  = con1;
            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.CommandText = "[SWITCHclient_DetailsGet]";

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

            dr1 = cmd.ExecuteReader();

            if (!dr1.HasRows)
            {
                SqlConnection con2 = new clsSystem_DBConnection(clsSystem_DBConnection.strConnectionString.NavIntegrationDB).propConnection;
                SqlCommand    cmd2 = new SqlCommand();
                cmd2.Connection  = con2;
                cmd2.CommandType = System.Data.CommandType.StoredProcedure;
                cmd2.CommandText = "[SWITCH_DetailsGet]";
                cmd2.Parameters.Add("@param_intSwitchID", System.Data.SqlDbType.Int).Value = intSwitchID;
                con2.Open();
                dr1 = cmd2.ExecuteReader();
            }

            float fTotalAllocation = 0;

            while (dr1.Read())
            {
                clsSwitchDetails_Client newClsSwitchDetails = new clsSwitchDetails_Client();

                newClsSwitchDetails.propAllocation      = float.Parse(Math.Round(double.Parse(dr1["Allocation"].ToString()), 2).ToString());
                newClsSwitchDetails.propCreated_By      = dr1["Created_By"].ToString();
                newClsSwitchDetails.propDate_Created    = DateTime.Parse(dr1["Date_Created"].ToString());
                newClsSwitchDetails.propDate_LastUpdate = DateTime.Parse(dr1["Date_LastUpdate"].ToString());
                newClsSwitchDetails.propFund            = new clsFund(int.Parse(dr1["FundID"].ToString()));
                newClsSwitchDetails.propFundID          = int.Parse(dr1["FundID"].ToString());
                newClsSwitchDetails.propSwitchDetailsID = int.Parse(dr1["SwitchDetailsID"].ToString());
                newClsSwitchDetails.propSwitchID        = int.Parse(dr1["SwitchID"].ToString());
                newClsSwitchDetails.propUpdated_By      = dr1["Updated_By"].ToString();
                newClsSwitchDetails.propIsDeletable     = dr1["isDeletable"].ToString().Equals("1") ? true : false;

                //if (Portfolio.propPortfolioDetails[0].propClientCurrency != newClsSwitchDetails.propFund.propCurrency)
                //{
                newClsSwitchDetails.propUnits = clsSwitchDetails.computeUnits(newClsSwitchDetails.propAllocation,
                                                                              float.Parse(Math.Round(double.Parse(Portfolio.propPortfolioDetails[0].propTotalCurrentValueClient.ToString()), 0).ToString()),
                                                                              clsCurrency.convertToClientCurrency(IFASwitch.propClientID, newClsSwitchDetails.propFund.propPrice, newClsSwitchDetails.propFund.propCurrency));
                //}
                //else
                //{
                //    newClsSwitchDetails.propUnits = clsSwitchDetails.computeUnits(newClsSwitchDetails.propAllocation,
                //                                                                  float.Parse(Math.Round(double.Parse(Portfolio.propPortfolioDetails[0].propTotalCurrentValueClient.ToString()), 0).ToString()),
                //                                                                  newClsSwitchDetails.propFund.propPrice);
                //}


                newClsSwitchDetails.propCurrencyMultiplier = clsCurrency.getCurrencyMultiplier(IFASwitch.propClientID, newClsSwitchDetails.propFund.propCurrency);
                //newClsSwitchDetails.propValue = clsSwitchDetails.computeValue(newClsSwitchDetails.propAllocation, Portfolio.propPortfolioDetails[0].propTotalCurrentValueClient);
                newClsSwitchDetails.propTotalValue = float.Parse(Math.Round(double.Parse(Portfolio.propPortfolioDetails[0].propTotalCurrentValueClient.ToString()), 0).ToString());
                newClsSwitchDetails.propValue      = clsSwitchDetails.computeValue(newClsSwitchDetails.propAllocation, newClsSwitchDetails.propTotalValue);


                fTotalAllocation = fTotalAllocation + newClsSwitchDetails.propAllocation;
                newClsSwitchDetails.propTotalAllocation = fTotalAllocation;

                listSwitchDetails.Add(newClsSwitchDetails);
            }
            con1.Close();
            cmd.Dispose();
            con1.Dispose();

            return(listSwitchDetails);
        }
Ejemplo n.º 12
0
        public static void updateSwitchHeader(int intSwitchID, clsSwitch.enumSwitchStatus SwitchStatus)
        {

            SqlConnection con = new clsSystem_DBConnection(clsSystem_DBConnection.strConnectionString.NavIntegrationDB).propConnection;
            SqlCommand cmd = new SqlCommand();

            con.Open();
            cmd.Connection = con;
            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.CommandText = "[SWITCHSCheme_HeaderUpdate]";

            cmd.Parameters.Add("@param_intSwitchID", System.Data.SqlDbType.Int).Value = intSwitchID;
            cmd.Parameters.Add("@param_Status", System.Data.SqlDbType.SmallInt).Value = SwitchStatus;

            cmd.ExecuteNonQuery();

        }
Ejemplo n.º 13
0
        public static int insertSwitchHeader(clsScheme Scheme, string strUserID, clsSwitch.enumSwitchStatus SwitchStatus, Nullable<int> intSwitchID, string strDescription)
        {
            SqlConnection con = new clsSwitchScheme().con;
            SqlCommand cmd = new SqlCommand();

            con.Open();
            cmd.Connection = con;
            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.CommandText = "[SWITCHScheme_HeaderInsert]";

            cmd.Parameters.Add("@param_strSchemeID", System.Data.SqlDbType.NVarChar).Value = Scheme.propSchemeID;
            cmd.Parameters.Add("@param_strClientID", System.Data.SqlDbType.NVarChar).Value = Scheme.propClient.propClientID;
            cmd.Parameters.Add("@param_intStatus", System.Data.SqlDbType.SmallInt).Value = SwitchStatus;
            cmd.Parameters.Add("@param_strCreated_By", System.Data.SqlDbType.NVarChar).Value = strUserID;
            cmd.Parameters.Add("@param_intSwitchID", System.Data.SqlDbType.Int).Value = intSwitchID;
            cmd.Parameters.Add("@param_strDescription", System.Data.SqlDbType.NVarChar).Value = strDescription;

            return int.Parse(cmd.ExecuteScalar().ToString());

        }
Ejemplo n.º 14
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;
        }
Ejemplo n.º 15
0
 public clsPortfolio(string strClientID , string strPortfolioID, string strUserId) {
     getPortfolioHeader(strClientID, strPortfolioID);
     this.listPortfolioDetails = getPortfolioDetails(strClientID, strPortfolioID);
     this.Switch = new clsSwitch(this, strUserId);
     this.SwitchClient = new clsSwitch_Client(propSwitch.propSwitchID);
 }