Beispiel #1
0
        private void RegisterBSESIP(int systematicId)
        {
            Boolean         result                   = false;
            DataTable       dtXSIP                   = new DataTable();
            DematAccountVo  dematevo                 = new DematAccountVo();
            BoDematAccount  bo                       = new BoDematAccount();
            OnlineMFOrderBo boOnlineOrder            = new OnlineMFOrderBo();
            string          message                  = string.Empty;
            int             OrderId                  = 0;
            int             sipId                    = 0;
            char            msgType                  = 'F';
            List <int>      OrderIds                 = new List <int>();
            IDictionary <string, string> sipOrderIds = new Dictionary <string, string>();

            try
            {
                dtXSIP = OnlineOrderMISBo.GetSystematicDetails(systematicId);
                if (dtXSIP.Rows.Count > 0)
                {
                    onlineMFOrderVo.SchemePlanCode     = Convert.ToInt32(dtXSIP.Rows[0]["PASP_SchemePlanCode"]);
                    onlineMFOrderVo.SystematicTypeCode = "SIP";
                    onlineMFOrderVo.SystematicDate     = Convert.ToInt32(dtXSIP.Rows[0]["CMFSS_SystematicDate"]);
                    onlineMFOrderVo.Amount             = double.Parse(dtXSIP.Rows[0]["CMFSS_Amount"].ToString());
                    onlineMFOrderVo.SourceCode         = "";
                    onlineMFOrderVo.FrequencyCode      = dtXSIP.Rows[0]["XF_FrequencyCode"].ToString();
                    onlineMFOrderVo.CustomerId         = Convert.ToInt32(dtXSIP.Rows[0]["C_CustomerId"].ToString());
                    onlineMFOrderVo.StartDate          = DateTime.Parse(dtXSIP.Rows[0]["CMFSS_StartDate"].ToString());
                    onlineMFOrderVo.EndDate            = DateTime.Parse(dtXSIP.Rows[0]["CMFSS_EndDate"].ToString());
                    onlineMFOrderVo.SystematicDates    = "";
                    onlineMFOrderVo.TotalInstallments  = int.Parse(dtXSIP.Rows[0]["CMFSS_TotalInstallment"].ToString());
                    onlineMFOrderVo.DivOption          = dtXSIP.Rows[0]["CMFSS_DividendOption"].ToString();
                    dematevo = bo.GetCustomerActiveDematAccount(onlineMFOrderVo.CustomerId);
                    onlineMFOrderVo.ModeTypeCode = "BXSIP";
                    if (!string.IsNullOrEmpty(dtXSIP.Rows[0]["CMFSS_MandateId"].ToString()))
                    {
                        onlineMFOrderVo.MandateId = int.Parse(dtXSIP.Rows[0]["CMFSS_MandateId"].ToString());
                    }
                    onlineMFOrderVo.SystematicId = systematicId;
                    OnlineMFOrderBo OnlineMFOrderBo = new OnlineMFOrderBo();
                    message = OnlineMFOrderBo.BSESIPorderEntryParam(userVo.UserId, dtXSIP.Rows[0]["C_CustCode"].ToString(), onlineMFOrderVo, onlineMFOrderVo.CustomerId, dematevo.DepositoryName, out msgType, out sipOrderIds);
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "alert('" + message + "');", true);
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "OnlineAdviserSIPSummaryBooks.ascx.cs:RegisterBSESIP(int systematicId)");
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
        public string UpdateBSESIP(int systematicId)
        {
            Boolean   result = false;
            DataTable dtXSIP = new DataTable();

            VoCustomerPortfolio.DematAccountVo dematevo = new VoCustomerPortfolio.DematAccountVo();
            BoCustomerPortfolio.BoDematAccount bo       = new BoCustomerPortfolio.BoDematAccount();
            OnlineMFOrderBo boOnlineOrder            = new OnlineMFOrderBo();
            string          message                  = string.Empty;
            int             OrderId                  = 0;
            int             sipId                    = 0;
            char            msgType                  = 'F';
            List <int>      OrderIds                 = new List <int>();
            IDictionary <string, string> sipOrderIds = new Dictionary <string, string>();

            dtXSIP = OnlineOrderMISBo.GetSystematicDetails(systematicId);
            if (dtXSIP.Rows.Count > 0)
            {
                onlineMFOrderVo.SchemePlanCode     = Convert.ToInt32(dtXSIP.Rows[0]["PASP_SchemePlanCode"]);
                onlineMFOrderVo.SystematicTypeCode = "SIP";
                onlineMFOrderVo.SystematicDate     = Convert.ToInt32(dtXSIP.Rows[0]["CMFSS_SystematicDate"]);
                onlineMFOrderVo.Amount             = double.Parse(dtXSIP.Rows[0]["CMFSS_Amount"].ToString());
                onlineMFOrderVo.SourceCode         = "";
                onlineMFOrderVo.FrequencyCode      = dtXSIP.Rows[0]["XF_FrequencyCode"].ToString();
                onlineMFOrderVo.CustomerId         = Convert.ToInt32(dtXSIP.Rows[0]["C_CustomerId"].ToString());
                onlineMFOrderVo.StartDate          = DateTime.Parse(dtXSIP.Rows[0]["CMFSS_StartDate"].ToString());
                onlineMFOrderVo.EndDate            = DateTime.Parse(dtXSIP.Rows[0]["CMFSS_EndDate"].ToString());
                onlineMFOrderVo.SystematicDates    = "";
                onlineMFOrderVo.TotalInstallments  = int.Parse(dtXSIP.Rows[0]["CMFSS_TotalInstallment"].ToString());
                onlineMFOrderVo.DivOption          = dtXSIP.Rows[0]["CMFSS_DividendOption"].ToString();
                dematevo = bo.GetCustomerActiveDematAccount(onlineMFOrderVo.CustomerId);
                onlineMFOrderVo.ModeTypeCode = dtXSIP.Rows[0]["WSTM_ModeTypeCode"].ToString();
                onlineMFOrderVo.IsCancelled  = "True";
                if (!string.IsNullOrEmpty(dtXSIP.Rows[0]["CMFSS_MandateId"].ToString()))
                {
                    onlineMFOrderVo.MandateId = int.Parse(dtXSIP.Rows[0]["CMFSS_MandateId"].ToString());
                }
                onlineMFOrderVo.SystematicId = systematicId;
                onlineMFOrderVo.BSEREGID     = Convert.ToInt64(dtXSIP.Rows[0]["BMFSRD_BSESIPREGID"].ToString());
                OnlineMFOrderBo OnlineMFOrderBo = new OnlineMFOrderBo();
                message = OnlineMFOrderBo.BSESIPorderEntryParam(userVo.UserId, dtXSIP.Rows[0]["C_CustCode"].ToString(), onlineMFOrderVo, onlineMFOrderVo.CustomerId, dematevo.DepositoryName, out msgType, out sipOrderIds);
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "alert('" + message + "');", true);
            }
            return(msgType.ToString());
        }