Esempio n. 1
0
 private void populateFields(Int16 intSMSTemplateID)
 {
     clsSMS.subclsSMSTemplate objSMSTemplate = new clsSMS.subclsSMSTemplate(intSMSTemplateID);
     this.txtMessage.Text       = objSMSTemplate.propMessage;
     this.txtTemplateFor.Text   = objSMSTemplate.propTemplateFor;
     this.txtTemplateName.Text  = objSMSTemplate.propTemplateName;
     this.hfSMSTemplateID.Value = objSMSTemplate.propSMSTemplateID.ToString();
 }
Esempio n. 2
0
        private string getSMSMessage(string strClientID, string strPortfolioID, string strUserID)
        {
            clsPortfolio _clsPortfolio = new clsPortfolio();

            _clsPortfolio.getPortfolioHeader(strClientID, strPortfolioID);
            string strPortfolioName = _clsPortfolio.propCompany;

            clsSMS.subclsSMSTemplate osubclsSMSTemplate = new clsSMS.subclsSMSTemplate(clsSMS.subclsSMSTemplate.enumSMSTemplateID.ProposeSwitch);
            string strReplacerVariable = clsSMS.subclsSMSTemplate.strPortfolioNameVariable;
            string strMessage          = osubclsSMSTemplate.propMessage.Replace(strReplacerVariable, strPortfolioName);

            return(strMessage);
        }
        private void doSwitch(int intSwitchID, string strSchemeName, clsSMS.subclsSMSTemplate.enumSMSTemplateID intSmsID, string strPopupMessage, string strSMSMobileNo)
        {
            String strUserID = Session[clsSystem_Session.strSession.User.ToString()].ToString();

            clsSMS.subclsSMSTemplate osubclsSMSTemplate = new clsSMS.subclsSMSTemplate(intSmsID);
            string strReplacerVariable = clsSMS.subclsSMSTemplate.strPortfolioNameVariable;
            string strMessage          = osubclsSMSTemplate.propMessage.Replace(strReplacerVariable, strSchemeName);

            if (strSMSMobileNo.Trim().Length != 0)
            {
                sendSMS(intSwitchID, strUserID, strMessage, strPopupMessage, strSMSMobileNo);
                //ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + strMessage + "');", true);
            }
        }
Esempio n. 4
0
        private void sendValidationCode(string strSMSMobileNo)
        {
            strClientID    = Session[clsSystem_Session.strSession.clientID.ToString()].ToString();
            strPortfolioID = Session[clsSystem_Session.strSession.tempportfolioid.ToString()].ToString();
            strUserID      = Session[clsSystem_Session.strSession.User.ToString()].ToString();
            int intSwitchID = (int)ViewState["intSwitchID"];

            string strSecurityCode = GenerateSecurityCode(intSwitchID, strClientID, strPortfolioID);

            clsSMS.subclsSMSTemplate osubclsSMSTemplate = new clsSMS.subclsSMSTemplate(2);
            string strReplacerVariable = clsSMS.subclsSMSTemplate.strSecurityCodeVariable;
            string strMessage          = osubclsSMSTemplate.propMessage.Replace(strReplacerVariable, strSecurityCode);

            if (!strSMSMobileNo.Trim().Equals(string.Empty))
            {
                sendSMS(strUserID, strMessage, strSMSMobileNo);
                //ClientScript.RegisterStartupScript(this.GetType(), "testingSecurityCode", string.Format("alert('{0}-{1}-{2}');", strMessage, strReplacerVariable, strSecurityCode), true);
            }
            ClientScript.RegisterStartupScript(this.GetType(), "showSecurityCode", string.Format("showSecurityCodePanel();"), true);
        }
        private void doSwitch(int intSwitchID, string strSchemeName, clsSMS.subclsSMSTemplate.enumSMSTemplateID intSmsID, string strPopupMessage, string strSMSMobileNo)
        {
            String strUserID = Session[clsSystem_Session.strSession.User.ToString()].ToString();

            clsSMS.subclsSMSTemplate osubclsSMSTemplate = new clsSMS.subclsSMSTemplate(intSmsID);
            string strReplacerVariable = clsSMS.subclsSMSTemplate.strPortfolioNameVariable;
            string strMessage = osubclsSMSTemplate.propMessage.Replace(strReplacerVariable, strSchemeName);

            if (strSMSMobileNo.Trim().Length != 0)
            {
                sendSMS(intSwitchID, strUserID, strMessage, strPopupMessage, strSMSMobileNo);
                //ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + strMessage + "');", true);
            }
        }
Esempio n. 6
0
        private void doSwitchSendSave(string strButtonClick)
        {
            captureSwitchGridviewDetails();

            string strPortfolioName = Portfolio().propCompany;
            int    intDiscretionary = int.Parse(Session["HasDiscretionary"].ToString());

            clsSMS.subclsSMSTemplate osubclsSMSTemplate = new clsSMS.subclsSMSTemplate(clsSMS.subclsSMSTemplate.enumSMSTemplateID.ProposeSwitch);
            string strReplacerVariable = clsSMS.subclsSMSTemplate.strPortfolioNameVariable;
            string strMessage          = osubclsSMSTemplate.propMessage.Replace(strReplacerVariable, strPortfolioName);
            string strPopupMessage     = "Message sent.";
            string strSMSMobileNo      = txtSMSMobileNo.Text.Trim();

            if (strButtonClick == enumButton.Approve.ToString())
            {
                List <clsSwitchDetails_Client> oSwitchDetailsClient = (List <clsSwitchDetails_Client>)Session["SwitchDetailsClient"];
                int intSwitchID = oSwitchDetailsClient[0].propSwitchID;

                clsSwitchDetails.transferClientSwitchToIFA(oSwitchDetailsClient, UserID());
                clsSwitch_Client.updateSwitchHeader(clsSwitch.enumSwitchStatus.Proposed, intSwitchID, string.Empty);
                clsSwitch.updateSwitchHeader(intSwitchID, clsSwitch.enumSwitchStatus.Proposed, txtDescription.Text);

                int       intHistoryID = clsHistory.insertHeader(new clsSwitch(intSwitchID).propPortfolioID, intSwitchID, (Int16)clsSwitch.enumSwitchStatus.Proposed);
                clsSwitch oSwitch      = new clsSwitch(Portfolio(), UserID());
                clsHistory.insertDetailsIFA(intHistoryID, oSwitch.propSwitchDetails);
                clsHistory.insertMessage(intHistoryID, txtDescription.Text);

                if (strSMSMobileNo.Length != 0)
                {
                    sendSMS(UserID(), strMessage, strPopupMessage, strSMSMobileNo);
                }
                string backPageURL = "https://" + Request.ServerVariables["SERVER_NAME"] + ":" + Request.ServerVariables["SERVER_PORT"] + "/report/" + "portfoliodetails.asp";
                ClientScript.RegisterStartupScript(this.GetType(), "alertSaveSuccess", "alert('This Amended Switch has been approved.'); window.location='" + backPageURL + "';", true);
            }
            else if (strButtonClick == enumButton.Resubmit.ToString())
            {
                int intSwitchID = Portfolio().propSwitch.propSwitchID;
                saveSwitch(clsSwitch.enumSwitchStatus.Proposed, intSwitchID, txtDescription.Text);
                clsSwitch_Client.updateSwitchHeader(clsSwitch.enumSwitchStatus.Proposed, intSwitchID, string.Empty);

                int       intHistoryID = clsHistory.insertHeader(new clsSwitch(intSwitchID).propPortfolioID, intSwitchID, (Int16)clsSwitch.enumSwitchStatus.Proposed);
                clsSwitch oSwitch      = new clsSwitch(Portfolio(), UserID());
                clsHistory.insertDetailsIFA(intHistoryID, oSwitch.propSwitchDetails);
                clsHistory.insertMessage(intHistoryID, txtDescription.Text);

                if (strSMSMobileNo.Length != 0)
                {
                    sendSMS(UserID(), strMessage, strPopupMessage, strSMSMobileNo);
                }
            }
            else
            {
                List <clsSwitchDetails> oSwitchDetails = (List <clsSwitchDetails>)Session["SwitchDetails"];
                int intSwitchID = oSwitchDetails[0].propSwitchID;
                if (intSwitchID == 0)
                {
                    if (intDiscretionary == 1 || intDiscretionary == -1)
                    {
                        saveSwitch(clsSwitch.enumSwitchStatus.Approved, null, txtDescription.Text.Trim());
                        clsSwitch oSwitch      = new clsSwitch(Portfolio(), UserID());
                        int       intHistoryID = clsHistory.insertHeader(PortfolioID(), intSwitchID, (Int16)clsSwitch.enumSwitchStatus.Approved);
                        NotifyApprovedSwtich(oSwitch);
                        clsHistory.insertDetailsIFA(intHistoryID, oSwitch.propSwitchDetails);
                        clsHistory.insertMessage(intHistoryID, txtDescription.Text.Trim());
                    }
                    else
                    {
                        saveSwitch(clsSwitch.enumSwitchStatus.Proposed, null, txtDescription.Text.Trim());
                        clsSwitch oSwitch      = new clsSwitch(Portfolio(), UserID());
                        int       intHistoryID = clsHistory.insertHeader(PortfolioID(), oSwitch.propSwitchID, (Int16)clsSwitch.enumSwitchStatus.Proposed);
                        clsHistory.insertDetailsIFA(intHistoryID, oSwitch.propSwitchDetails);
                        clsHistory.insertMessage(intHistoryID, txtDescription.Text.Trim());
                    }
                }
                else
                {
                    if (intDiscretionary == 1 || intDiscretionary == -1)
                    {
                        saveSwitch(clsSwitch.enumSwitchStatus.Approved, intSwitchID, txtDescription.Text.Trim());
                        clsSwitch oSwitch      = new clsSwitch(Portfolio(), UserID());
                        int       intHistoryID = clsHistory.insertHeader(PortfolioID(), intSwitchID, (Int16)clsSwitch.enumSwitchStatus.Approved);
                        NotifyApprovedSwtich(oSwitch);
                        clsHistory.insertDetailsIFA(intHistoryID, oSwitch.propSwitchDetails);
                        clsHistory.insertMessage(intHistoryID, txtDescription.Text);
                    }
                    else
                    {
                        saveSwitch(clsSwitch.enumSwitchStatus.Proposed, intSwitchID, txtDescription.Text.Trim());
                        clsSwitch oSwitch      = new clsSwitch(Portfolio(), UserID());
                        int       intHistoryID = clsHistory.insertHeader(PortfolioID(), intSwitchID, (Int16)clsSwitch.enumSwitchStatus.Proposed);
                        clsHistory.insertDetailsIFA(intHistoryID, oSwitch.propSwitchDetails);
                        clsHistory.insertMessage(intHistoryID, txtDescription.Text);
                    }
                }
                if (strSMSMobileNo.Length != 0)
                {
                    sendSMS(UserID(), strMessage, strPopupMessage, strSMSMobileNo);
                }
            }
            populateSwitchDetails(Portfolio().propSwitch.propSwitchDetails);
            pageStatus(Portfolio().propSwitch.propStatus);
        }
        private void sendValidationCode(string strSMSMobileNo)
        {
            strClientID = Session[clsSystem_Session.strSession.clientID.ToString()].ToString();
            strPortfolioID = Session[clsSystem_Session.strSession.tempportfolioid.ToString()].ToString();
            strUserID = Session[clsSystem_Session.strSession.User.ToString()].ToString();
            int intSwitchID = (int)ViewState["intSwitchID"];

            string strSecurityCode = GenerateSecurityCode(intSwitchID, strClientID, strPortfolioID);

            clsSMS.subclsSMSTemplate osubclsSMSTemplate = new clsSMS.subclsSMSTemplate(2);
            string strReplacerVariable = clsSMS.subclsSMSTemplate.strSecurityCodeVariable;
            string strMessage = osubclsSMSTemplate.propMessage.Replace(strReplacerVariable, strSecurityCode);

            if (!strSMSMobileNo.Trim().Equals(string.Empty))
            {
                sendSMS(strUserID, strMessage, strSMSMobileNo);
                //ClientScript.RegisterStartupScript(this.GetType(), "testingSecurityCode", string.Format("alert('{0}-{1}-{2}');", strMessage, strReplacerVariable, strSecurityCode), true);
            }
            ClientScript.RegisterStartupScript(this.GetType(), "showSecurityCode", string.Format("showSecurityCodePanel();"), true);
        }
Esempio n. 8
0
        private void doSwitchSendSave(string strButtonClick)
        {
            captureSwitchGridviewDetails();
            
            string strPortfolioName = Portfolio().propCompany;
            int intDiscretionary = int.Parse(Session["HasDiscretionary"].ToString());

            clsSMS.subclsSMSTemplate osubclsSMSTemplate = new clsSMS.subclsSMSTemplate(clsSMS.subclsSMSTemplate.enumSMSTemplateID.ProposeSwitch);
            string strReplacerVariable = clsSMS.subclsSMSTemplate.strPortfolioNameVariable;
            string strMessage = osubclsSMSTemplate.propMessage.Replace(strReplacerVariable, strPortfolioName);
            string strPopupMessage = "Message sent.";
            string strSMSMobileNo = txtSMSMobileNo.Text.Trim();

            if (strButtonClick == enumButton.Approve.ToString())
            {
                List<clsSwitchDetails_Client> oSwitchDetailsClient = (List<clsSwitchDetails_Client>)Session["SwitchDetailsClient"];
                int intSwitchID = oSwitchDetailsClient[0].propSwitchID;

                clsSwitchDetails.transferClientSwitchToIFA(oSwitchDetailsClient, UserID());
                clsSwitch_Client.updateSwitchHeader(clsSwitch.enumSwitchStatus.Proposed, intSwitchID, string.Empty);
                clsSwitch.updateSwitchHeader(intSwitchID, clsSwitch.enumSwitchStatus.Proposed, txtDescription.Text);

                int intHistoryID = clsHistory.insertHeader(new clsSwitch(intSwitchID).propPortfolioID, intSwitchID, (Int16)clsSwitch.enumSwitchStatus.Proposed);
                clsSwitch oSwitch = new clsSwitch(Portfolio(), UserID());
                clsHistory.insertDetailsIFA(intHistoryID, oSwitch.propSwitchDetails);
                clsHistory.insertMessage(intHistoryID, txtDescription.Text);

                if (strSMSMobileNo.Length != 0)
                {
                    sendSMS(UserID(), strMessage, strPopupMessage, strSMSMobileNo);
                }
                string backPageURL = "https://" + Request.ServerVariables["SERVER_NAME"] + ":" + Request.ServerVariables["SERVER_PORT"] + "/report/" + "portfoliodetails.asp";
                ClientScript.RegisterStartupScript(this.GetType(), "alertSaveSuccess", "alert('This Amended Switch has been approved.'); window.location='" + backPageURL + "';", true);
            }
            else if (strButtonClick == enumButton.Resubmit.ToString())
            {
                int intSwitchID = Portfolio().propSwitch.propSwitchID;
                saveSwitch(clsSwitch.enumSwitchStatus.Proposed, intSwitchID, txtDescription.Text);
                clsSwitch_Client.updateSwitchHeader(clsSwitch.enumSwitchStatus.Proposed, intSwitchID, string.Empty);

                int intHistoryID = clsHistory.insertHeader(new clsSwitch(intSwitchID).propPortfolioID, intSwitchID, (Int16)clsSwitch.enumSwitchStatus.Proposed);
                clsSwitch oSwitch = new clsSwitch(Portfolio(), UserID());
                clsHistory.insertDetailsIFA(intHistoryID, oSwitch.propSwitchDetails);
                clsHistory.insertMessage(intHistoryID, txtDescription.Text);

                if (strSMSMobileNo.Length != 0)
                {
                    sendSMS(UserID(), strMessage, strPopupMessage, strSMSMobileNo);
                }
            }
            else
            {
                List<clsSwitchDetails> oSwitchDetails = (List<clsSwitchDetails>)Session["SwitchDetails"];
                int intSwitchID = oSwitchDetails[0].propSwitchID;
                if (intSwitchID == 0)
                {
                    if (intDiscretionary == 1 || intDiscretionary == -1)
                    {
                        saveSwitch(clsSwitch.enumSwitchStatus.Approved, null, txtDescription.Text.Trim());
                        clsSwitch oSwitch = new clsSwitch(Portfolio(), UserID());
                        int intHistoryID = clsHistory.insertHeader(PortfolioID(), intSwitchID, (Int16)clsSwitch.enumSwitchStatus.Approved);
                        NotifyApprovedSwtich(Portfolio());
                        clsHistory.insertDetailsIFA(intHistoryID, oSwitch.propSwitchDetails);
                        clsHistory.insertMessage(intHistoryID, txtDescription.Text.Trim());
                    }
                    else
                    {
                        saveSwitch(clsSwitch.enumSwitchStatus.Proposed, null, txtDescription.Text.Trim());
                        clsSwitch oSwitch = new clsSwitch(Portfolio(), UserID());
                        int intHistoryID = clsHistory.insertHeader(PortfolioID(), oSwitch.propSwitchID, (Int16)clsSwitch.enumSwitchStatus.Proposed);
                        clsHistory.insertDetailsIFA(intHistoryID, oSwitch.propSwitchDetails);
                        clsHistory.insertMessage(intHistoryID, txtDescription.Text.Trim());
                    }
                }
                else
                {
                    if (intDiscretionary == 1 || intDiscretionary == -1)
                    {
                        saveSwitch(clsSwitch.enumSwitchStatus.Approved, intSwitchID, txtDescription.Text.Trim());
                        clsSwitch oSwitch = new clsSwitch(Portfolio(), UserID());
                        int intHistoryID = clsHistory.insertHeader(PortfolioID(), intSwitchID, (Int16)clsSwitch.enumSwitchStatus.Approved);
                        NotifyApprovedSwtich(Portfolio());
                        clsHistory.insertDetailsIFA(intHistoryID, oSwitch.propSwitchDetails);
                        clsHistory.insertMessage(intHistoryID, txtDescription.Text);
                    }
                    else
                    {                        
                        saveSwitch(clsSwitch.enumSwitchStatus.Proposed, intSwitchID, txtDescription.Text.Trim());
                        clsSwitch oSwitch = new clsSwitch(Portfolio(), UserID());
                        int intHistoryID = clsHistory.insertHeader(PortfolioID(), intSwitchID, (Int16)clsSwitch.enumSwitchStatus.Proposed);
                        clsHistory.insertDetailsIFA(intHistoryID, oSwitch.propSwitchDetails);
                        clsHistory.insertMessage(intHistoryID, txtDescription.Text);
                    }
                }
                if (strSMSMobileNo.Length != 0)
                {
                    sendSMS(UserID(), strMessage, strPopupMessage, strSMSMobileNo);
                }
            }
            populateSwitchDetails(Portfolio().propSwitch.propSwitchDetails);
            pageStatus(Portfolio().propSwitch.propStatus);
        }
 private void populateFields(Int16 intSMSTemplateID)
 {
     clsSMS.subclsSMSTemplate objSMSTemplate = new clsSMS.subclsSMSTemplate(intSMSTemplateID);
     this.txtMessage.Text = objSMSTemplate.propMessage;
     this.txtTemplateFor.Text = objSMSTemplate.propTemplateFor;
     this.txtTemplateName.Text = objSMSTemplate.propTemplateName;
     this.hfSMSTemplateID.Value = objSMSTemplate.propSMSTemplateID.ToString();
 }
        private string getSMSMessage(string strClientID, string strPortfolioID, string strUserID)
        {
            clsPortfolio _clsPortfolio = new clsPortfolio();
            _clsPortfolio.getPortfolioHeader(strClientID, strPortfolioID);
            string strPortfolioName = _clsPortfolio.propCompany;
            clsSMS.subclsSMSTemplate osubclsSMSTemplate = new clsSMS.subclsSMSTemplate(clsSMS.subclsSMSTemplate.enumSMSTemplateID.ProposeSwitch);
            string strReplacerVariable = clsSMS.subclsSMSTemplate.strPortfolioNameVariable;
            string strMessage = osubclsSMSTemplate.propMessage.Replace(strReplacerVariable, strPortfolioName);

            return strMessage;
        }