protected void gvCustomers_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int userId     = 0;
            int customerId = 0;

            customerId = Convert.ToInt32(e.CommandArgument);
            UserVo userVo = (UserVo)Session["userVo"];

            userId = userVo.UserId;
            CustomerAccountsVo customerAccountsVo = new CustomerAccountsVo();
            CustomerAccountBo  customerBo         = new CustomerAccountBo();
            GridView           gv = (GridView)sender;

            RejectedTransactionsBo rejectedTransactionsBo = new RejectedTransactionsBo();
            bool isSucess = rejectedTransactionsBo.MapEquityToCustomer(transactionStagingId, customerId, userId);

            if (isSucess)
            {
                gvCustomers.Visible = false;
                lblMessage.Visible  = true;
                lblMessage.Text     = "Customer is mapped";
                lblMessage.CssClass = "SuccessMsg";
                tblSearch.Visible   = false;
            }
            else
            {
                lblMessage.Visible = true;
                lblMessage.Text    = "An error occurred while mapping.";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            SessionBo.CheckSession();
            customerVo = (CustomerVo)Session["CustomerVo"];
            userVo     = (UserVo)Session["userVo"];
            advisorVo  = (AdvisorVo)Session["advisorVo"];
            if (!IsPostBack)
            {
                portfolioId = int.Parse(Session[SessionContents.PortfolioId].ToString());
                LoadEquityTradeNumbers();


                if (Request.QueryString["action"] != "" && Request.QueryString["action"] != null)
                {
                    customeraccountvo = (CustomerAccountsVo)Session["EQAccountVoRow"];
                    if (Request.QueryString["action"].Trim() == "Edit")
                    {
                        BtnSetVisiblity(1);
                        EditEQAccountDetails();
                    }
                    else if (Request.QueryString["action"].Trim() == "View")
                    {
                        BtnSetVisiblity(0);
                        lnkBack.Visible = true;
                        ViewEQAccountDetails();
                    }
                }
            }
        }
        public bool UpdateFixedIncomeAccount(CustomerAccountsVo customerAccountVo, int userId)
        {
            bool           bResult        = false;
            FixedIncomeDao fixedIncomeDao = new FixedIncomeDao();

            try
            {
                bResult = fixedIncomeDao.UpdateFixedIncomeAccount(customerAccountVo, userId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "FixedIncomeBo.cs:UpdateFixedIncomeAccount()");
                object[] objects = new object[2];
                objects[0]   = customerAccountVo;
                objects[1]   = userId;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
            return(bResult);
        }
Beispiel #4
0
        public bool UpdatePensionandGratuitiesAccount(CustomerAccountsVo pensionAndGratuitiesAccVo, int userId)
        {
            bool bResult = false;
            PensionAndGratuitiesDao pensionAndGratuitiesDao = new PensionAndGratuitiesDao();

            try
            {
                bResult = pensionAndGratuitiesDao.UpdatePensionandGratuitiesAccount(pensionAndGratuitiesAccVo, userId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "PensionAndGratuitiesBo.cs:UpdatePensionandGratuitiesAccount()");
                object[] objects = new object[2];
                objects[0]   = pensionAndGratuitiesAccVo;
                objects[1]   = userId;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }

            return(bResult);
        }
        public int CreateCustomerPropertyAccount(CustomerAccountsVo customerAccountVo, int userId)
        {
            CustomerAccountDao customerAccountDao = new CustomerAccountDao();
            int accountId;

            try
            {
                accountId = customerAccountDao.CreateCustomerPropertyAccount(customerAccountVo, userId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "CustomerAccountBo.cs:CreateCustomerPropertyAccount()");


                object[] objects = new object[2];
                objects[0] = customerAccountVo;
                objects[1] = userId;

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }

            return(accountId);
        }
Beispiel #6
0
 protected void btnSaveChanges_Click(object sender, EventArgs e)
 {
     try
     {
         govtSavingsVo = GetValuesFromFields();
         //TODO : Check if the below two lines are needed.
         customerAccountsVo = customerAccountBo.GetGovtSavingsAccount(govtSavingsVo.AccountId);
         UpdateAccountDetails(customerAccountsVo);
         //UpdatePortfolioDetails(govtSavingsVo);
         govtSavingsBo.UpdateGovtSavingsNP(govtSavingsVo, userVo.UserId);
         ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('ViewGovtSavings','none');", true);
     }
     catch (BaseApplicationException Ex)
     {
         throw Ex;
     }
     catch (Exception Ex)
     {
         BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
         NameValueCollection      FunctionInfo = new NameValueCollection();
         FunctionInfo.Add("Method", "PortfolioGovtSavingsEntry.ascx:btnSaveChanges_Click()");
         object[] objects = new object[2];
         objects[0]   = govtSavingsVo;
         objects[1]   = customerAccountsVo;
         FunctionInfo = exBase.AddObject(FunctionInfo, objects);
         exBase.AdditionalInformation = FunctionInfo;
         ExceptionManager.Publish(exBase);
         throw exBase;
     }
 }
Beispiel #7
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            //int i;
            bool accountId;

            //DataTable dtBankAccId = new DataTable();
            //dtBankAccId = (DataTable)Session["BankAccId"];
            //if (dtBankAccId.Rows.Count > 0)
            //{
            //    for (i = 0; i < dtBankAccId.Rows.Count; i++)
            //    {
            //        custBankAccId = Convert.ToInt32(dtBankAccId.Rows[i]["CB_CustBankAccId"].ToString());
            //    }
            //}
            customeraccountVo = new CustomerAccountsVo();
            int customerId = 0;

            customerVo = (CustomerVo)Session["customerVo"];
            customerId = customerVo.CustomerId;
            //accountId = customerAccountBo.CheckTransactionExistanceOnHoldingAdd(bankId);
            //if (accountId == true)
            //{
            //    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "MyScript", "alert('Transaction all ready exist first delete Transactions !!');", true);
            //}
            //else
            customeraccountVo.AccountId = bankId;
            customeraccountVo.Amount    = double.Parse(txtholdingAmt.Text.ToString());
            customerAccountBo.InsertholdingAmountCustomerBank(customeraccountVo, customerId);
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('ViewBankDetails','none');", true);
        }
 private void EditEQAccountDetails()
 {
     customerAccountsVo = (CustomerAccountsVo)Session["EQAccountVoRow"];
     if (customerAccountsVo.BrokerCode != "")
     {
         ddlBrokerCode.SelectedValue = customerAccountsVo.BrokerCode;
     }
     else
     {
         ddlBrokerCode.SelectedValue = "NULL";
     }
     txtTradeNum.Text = customerAccountsVo.TradeNum;
     if (customerAccountsVo.AccountOpeningDate != DateTime.MinValue)
     {
         txtAccountStartingDate.Text = customerAccountsVo.AccountOpeningDate.ToShortDateString();
     }
     else
     {
         txtAccountStartingDate.Text = "";
     }
     txtBrokeragePerDelivery.Text    = customerAccountsVo.BrokerageDeliveryPercentage.ToString();
     txtBrokeragePerSpeculative.Text = customerAccountsVo.BrokerageSpeculativePercentage.ToString();
     txtOtherCharges.Text            = customerAccountsVo.OtherCharges.ToString();
     BtnSetVisiblity(1);
     SetVisiblity(1);
 }
        public CustomerAccountsVo GetCashAndSavingsAccount(int accountId)
        {
            CustomerAccountsVo customerAccountVo  = new CustomerAccountsVo();
            CustomerAccountDao customerAccountDao = new CustomerAccountDao();

            try
            {
                customerAccountVo = customerAccountDao.GetCashAndSavingsAccount(accountId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "CustomerAccountBo.cs:GetCashAndSavingsAccount()");


                object[] objects = new object[1];
                objects[0] = accountId;


                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }

            return(customerAccountVo);
        }
        protected void ddlTradeAccountNos_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlTradeAccountNos.SelectedValue != "-1")
            {
                CustomerTransactionBo customerTransactionBo = new CustomerTransactionBo();
                CustomerAccountsVo    customerAccountsVo    = new CustomerAccountsVo();
                CustomerPortfolioVo   customerPortfolioVo   = new CustomerPortfolioVo();
                PortfolioBo           portfolioBo           = new PortfolioBo();
                CustomerVo            customerVo            = customerBo.GetCustomer(Convert.ToInt32(txtParentCustomerId.Value));

                customerPortfolioVo = portfolioBo.GetCustomerDefaultPortfolio(customerVo.CustomerId);
                customerAccountsVo  = customerTransactionBo.GetCustomerEQAccountDetails(int.Parse(ddlTradeAccountNos.SelectedValue.ToString()), customerPortfolioVo.PortfolioId);
                if (rdoDelivery.Checked)
                {
                    hidBrokerRate.Value = customerAccountsVo.BrokerageDeliveryPercentage.ToString();
                }
                else
                {
                    hidBrokerRate.Value = customerAccountsVo.BrokerageSpeculativePercentage.ToString();
                }
                hidOtherCharges.Value = customerAccountsVo.OtherCharges.ToString();
            }
            else
            {
                hidBrokerRate.Value   = "0";
                hidOtherCharges.Value = "0";
            }
        }
        public void SetBrokerage()
        {
            if (txtRate.Text != "" && txtBroker.Text != "")
            {
                double brokerage, otherCharges;

                CustomerTransactionBo customerTransactionBo = new CustomerTransactionBo();
                CustomerAccountsVo    customerAccountsVo    = new CustomerAccountsVo();
                customerAccountsVo = customerTransactionBo.GetCustomerEQAccountDetails(int.Parse(ddlTradeAcc.SelectedItem.Value.ToString()), portfolioId);
                // Stax= Service Tax
                if (eqTransactionVo.IsSpeculative != 1)
                {
                    brokerage = double.Parse(txtRate.Text) * (customerAccountsVo.BrokerageDeliveryPercentage / 100);
                }
                else
                {
                    brokerage = double.Parse(txtRate.Text) * (customerAccountsVo.BrokerageSpeculativePercentage / 100);
                }
                otherCharges      = double.Parse(txtRate.Text) * (customerAccountsVo.OtherCharges / 100);
                txtBrokerage.Text = Math.Round(brokerage, 4).ToString();

                txtOtherCharge.Text = Math.Round(otherCharges, 4).ToString();

                Calculate();
            }
        }
Beispiel #12
0
 private void BindInstrumentSubCategory(CustomerAccountsVo custAccountsVo)
 {
     try
     {
         // Bind the Instrument Sub-Category for an Asset Instrument Category
         dsInstrumentSubCategory            = assetBo.GetAssetInstrumentSubCategory(AssetGroupCode, custAccountsVo.AssetCategory.ToString().Trim());
         ddlInstrumentSubCat.DataSource     = dsInstrumentSubCategory.Tables[0];
         ddlInstrumentSubCat.DataTextField  = "PAISC_AssetInstrumentSubCategoryName";
         ddlInstrumentSubCat.DataValueField = "PAISC_AssetInstrumentSubCategoryCode";
         ddlInstrumentSubCat.DataBind();
         ddlInstrumentSubCat.Items.Insert(0, new ListItem("Select an Instrument Sub-Category", "Select an Instrument Sub-Category"));
     }
     catch (BaseApplicationException Ex)
     {
         throw Ex;
     }
     catch (Exception Ex)
     {
         BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
         NameValueCollection      FunctionInfo = new NameValueCollection();
         FunctionInfo.Add("Method", "PortfolioPropertyEntry.ascx:BindInstrumentSubCategory()");
         object[] objects = new object[2];
         objects[0]   = custAccountsVo;
         objects[1]   = AssetGroupCode;
         FunctionInfo = exBase.AddObject(FunctionInfo, objects);
         exBase.AdditionalInformation = FunctionInfo;
         ExceptionManager.Publish(exBase);
         throw exBase;
     }
 }
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            CustomerAccountsVo           newAccountVo         = new CustomerAccountsVo();
            CustomerAccountAssociationVo AccountAssociationVo = new CustomerAccountAssociationVo();

            customerAccountsVo      = (CustomerAccountsVo)Session["FolioVo"];
            newAccountVo.AccountNum = txtFolioNumber.Text;
            newAccountVo.AssetClass = "MF";
            if (rbtnNo.Checked)
            {
                newAccountVo.IsJointHolding = 0;
            }
            else
            {
                newAccountVo.IsJointHolding = 1;
            }
            if (ddlModeOfHolding.SelectedValue != "Select Mode of Holding")
            {
                newAccountVo.ModeOfHoldingCode = ddlModeOfHolding.SelectedItem.Value.ToString();
            }
            if (txtAccountDate.Text != "")
            {
                newAccountVo.AccountOpeningDate = DateTime.Parse(txtAccountDate.Text.Trim());
            }
            newAccountVo.PortfolioId = int.Parse(ddlPortfolio.SelectedItem.Value.ToString());
            newAccountVo.AMCCode     = int.Parse(ddlProductAmc.SelectedItem.Value.ToString());
            newAccountVo.AccountId   = customerAccountsVo.AccountId;
            if (customerTransactionBo.UpdateCustomerMFFolioDetails(newAccountVo, userVo.UserId))
            {
                customerTransactionBo.DeleteMFFolioAccountAssociates(newAccountVo.AccountId);
                AccountAssociationVo.AccountId  = newAccountVo.AccountId;
                AccountAssociationVo.CustomerId = customerVo.CustomerId;

                foreach (GridViewRow gvr in this.gvNominee2.Rows)
                {
                    if (((CheckBox)gvr.FindControl("chkId")).Checked == true)
                    {
                        AccountAssociationVo.AssociationId   = int.Parse(gvNominee2.DataKeys[gvr.RowIndex].Value.ToString());
                        AccountAssociationVo.AssociationType = "Nominee";
                        customerAccountBo.CreateMFAccountAssociation(AccountAssociationVo, userVo.UserId);
                    }
                }
                if (rbtnYes.Checked)
                {
                    foreach (GridViewRow gvr in this.gvJoint2.Rows)
                    {
                        if (((CheckBox)gvr.FindControl("chkId")).Checked == true)
                        {
                            AccountAssociationVo.AssociationId   = int.Parse(gvJoint2.DataKeys[gvr.RowIndex].Value.ToString());
                            AccountAssociationVo.AssociationType = "Joint Holder";
                            customerAccountBo.CreateMFAccountAssociation(AccountAssociationVo, userVo.UserId);
                        }
                    }
                }
            }

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerMFFolioView','none');", true);
        }
Beispiel #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                SessionBo.CheckSession();
                this.Page.Culture = "en-GB";
                customerVo        = (CustomerVo)Session["CustomerVo"];
                userVo            = (UserVo)Session["userVo"];
                advisorVo         = (AdvisorVo)Session["advisorVo"];
                BindPortfolioDropDown();
                BindFolioNumber();
                if (!IsPostBack)
                {
                    portfolioId = int.Parse(Session[SessionContents.PortfolioId].ToString());
                    //BindPortfolioDropDown();
                    tdSchemeNameLabel.Visible     = false;
                    tdSchemeNameValue.Visible     = false;
                    tdSchemeToLabel.Visible       = false;
                    tdSchemeToValue.Visible       = false;
                    tdNAVPurchasedLabel.Visible   = false;
                    tdNAVPurchasedValue.Visible   = false;
                    tdPricePurchasedLabel.Visible = false;
                    tdPricePurchasedValue.Visible = false;
                    tdAmtPurchasedLabel.Visible   = false;
                    tdAmtPurchasedValue.Visible   = false;
                    tdUnitsAllotedLabel.Visible   = false;
                    tdUnitsAllotedValue.Visible   = false;
                    // BindFolioNumber();

                    customerAccountsVo = (CustomerAccountsVo)Session[SessionContents.CustomerMFAccount];
                    if (Session[SessionContents.CustomerMFAccount] != null)
                    {
                        customerAccountsVo        = (CustomerAccountsVo)Session[SessionContents.CustomerMFAccount];
                        ddlFolioNum.SelectedValue = customerAccountsVo.AccountId.ToString();
                    }
                    RestorePreviousState();
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }

            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "MFManualSingleTran.ascx:Page_Load()");
                object[] objects = new object[3];
                objects[0]   = userVo;
                objects[1]   = customerVo;
                objects[2]   = portfolioId;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
        private void ViewEQAccountDetails()
        {
            customerAccountsVo = (CustomerAccountsVo)Session["EQAccountVoRow"];

            ddlBrokerCode.SelectedValue     = customerAccountsVo.BrokerCode;
            txtTradeNum.Text                = customerAccountsVo.TradeNum;
            txtAccountStartingDate.Text     = customerAccountsVo.AccountOpeningDate.ToShortDateString();
            txtBrokeragePerDelivery.Text    = customerAccountsVo.BrokerageDeliveryPercentage.ToString();
            txtBrokeragePerSpeculative.Text = customerAccountsVo.BrokerageSpeculativePercentage.ToString();
            txtOtherCharges.Text            = customerAccountsVo.OtherCharges.ToString();
            SetVisiblity(0);
        }
Beispiel #16
0
        private void BindDropDowns(PropertyVo propertyVo, CustomerAccountsVo customerAccountsVo, string path)
        {
            try
            {
                userVo                        = (UserVo)Session["userVo"];
                customerVo                    = (CustomerVo)Session["CustomerVo"];
                dtMeasureCode                 = XMLBo.GetMeasureCode(path, AssetGroupCode);
                ddlMeasureCode.DataSource     = dtMeasureCode;
                ddlMeasureCode.DataTextField  = "Measure";
                ddlMeasureCode.DataValueField = "MeasureCode";
                ddlMeasureCode.DataBind();
                ddlMeasureCode.Items.Insert(0, new ListItem("Select a Measure Code", "Select a Measure Code"));

                // Bind the Instrument Category for an Asset
                dsInstrumentCategory            = assetBo.GetAssetInstrumentCategory(AssetGroupCode);
                ddlInstrumentCat.DataSource     = dsInstrumentCategory.Tables[0];
                ddlInstrumentCat.DataTextField  = "PAIC_AssetInstrumentCategoryName";
                ddlInstrumentCat.DataValueField = "PAIC_AssetInstrumentCategoryCode";
                ddlInstrumentCat.DataBind();
                ddlInstrumentCat.Items.Insert(0, new ListItem("Select an Instrument Category", "Select an Instrument Category"));

                ddlInstrumentSubCat.Items.Clear();


                // Bind State Drop Downs
                dtStates                = XMLBo.GetStates(path);
                ddlState.DataSource     = dtStates;
                ddlState.DataTextField  = "StateName";
                ddlState.DataValueField = "StateCode";
                ddlState.DataBind();
                ddlState.Items.Insert(0, new ListItem("Select a State", "Select a State"));
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "PortfolioPropertyEntry.ascx:BindDropDowns()");
                object[] objects = new object[5];
                objects[0]   = userVo;
                objects[1]   = propertyVo;
                objects[2]   = customerAccountsVo;
                objects[3]   = path;
                objects[4]   = customerVo;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
Beispiel #17
0
        /// <summary>
        /// This Button use to Add Transaction Detail
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSubmitTransaction_Click(object sender, EventArgs e)
        {
            int       customerId  = 0;
            DataTable dtBankAccId = new DataTable();

            dtBankAccId = (DataTable)Session["BankAccId"];
            //  string strBankAccountID = ViewState["BankId"].ToString();
            RMVo rmVo = new RMVo();
            int  userId;

            rmVo              = (RMVo)Session["RmVo"];
            userId            = rmVo.UserId;
            customerId        = customerVo.CustomerId;
            customeraccountVo = new CustomerAccountsVo();
            customeraccountVo.ExternalTransactionId = txtExternalTransactionId.Text.ToString();
            DateTime date = Convert.ToDateTime(dpTransactionDate.SelectedDate);

            customeraccountVo.Transactiondate = date;
            customeraccountVo.CCST_Desc       = txtDescripton.Text.ToString();
            customeraccountVo.ChequeNo        = txtChequeNo.Text.ToString();
            customeraccountVo.CFCCategoryCode = ddlCFCCategory.SelectedItem.Value.ToString();
            if (txtAmount.Text.ToString() != "")
            {
                customeraccountVo.Amount = double.Parse(txtAmount.Text.ToString());
            }
            else
            {
                customeraccountVo.Amount = 0;
            }
            //int i;
            //dtBankAccId = (DataTable)Session["BankAccId"];
            //if (dtBankAccId.Rows.Count > 0)
            //{
            //    for (i = 0; i < dtBankAccId.Rows.Count; i++)
            //    {
            //        custBankAccId = Convert.ToInt32(dtBankAccId.Rows[i]["CB_CustBankAccId"].ToString());
            //    }
            //}

            customeraccountVo.AccountId = int.Parse(ddlAccountDetails.SelectedValue);
            bankId = customeraccountVo.AccountId;
            if (rbtnN.Checked)
            {
                customeraccountVo.IsWithdrwal = 0;
            }
            if (rbtnY.Checked)
            {
                customeraccountVo.IsWithdrwal = 1;
            }
            customerAccountBo.CreatecustomerBankTransaction(customeraccountVo, userId);
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AddBankDetails','?name=" + "viewTransaction" + "');", true);
        }
        private void EditFolioDetails()
        {
            customerAccountsVo = (CustomerAccountsVo)Session["FolioVo"];
            if (customerAccountsVo.AccountOpeningDate.ToShortDateString() != "01/01/1901" && customerAccountsVo.AccountOpeningDate != null && customerAccountsVo.AccountOpeningDate != DateTime.MinValue)
            {
                txtAccountDate.Text = customerAccountsVo.AccountOpeningDate.ToShortDateString();
            }
            else
            {
                txtAccountDate.Text = "";
            }
            txtFolioNumber.Text = customerAccountsVo.AccountNum.ToString();
            BindAMC();
            ddlProductAmc.SelectedValue = customerAccountsVo.AMCCode.ToString();
            if (customerAccountsVo.IsJointHolding == 1)
            {
                rbtnYes.Checked        = true;
                trJoint2Header.Visible = true;
            }
            else
            {
                rbtnNo.Checked         = true;
                trJoint2Header.Visible = false;
            }
            BindModeOfHolding();
            if (customerAccountsVo.ModeOfHoldingCode != "" && customerAccountsVo.ModeOfHoldingCode != null)
            {
                ddlModeOfHolding.Enabled       = true;
                ddlModeOfHolding.SelectedValue = customerAccountsVo.ModeOfHoldingCode.Trim();
            }
            else
            {
                ddlModeOfHolding.SelectedIndex = 0;
            }
            if (rbtnNo.Checked == true)
            {
                ddlModeOfHolding.Enabled = false;
            }
            else
            {
                ddlModeOfHolding.Enabled = true;
            }

            ViewState["ModeOfHolding"] = ddlModeOfHolding.SelectedValue;
            BindAssociates(customerAccountsVo);
            Session["CustomerAccountVo"] = customerAccountsVo;
            gvJoint2.Enabled             = true;
            gvNominee2.Enabled           = true;
            SetVisiblity(1);
        }
        protected void hiddenassociation_Click(object sender, EventArgs e)
        {
            string val = Convert.ToString(hdnMsgValue.Value);

            if (val == "1")
            {
                bool DeleteAccount;
                CustomerAccountsVo customeraccountvo = (CustomerAccountsVo)Session["customerAccountVo"];
                int Account = customeraccountvo.AccountId;
                DeleteAccount = customerAccountsBo.DeleteInsuranceAccount(Account);


                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewInsuranceDetails','none');", true);
            }
        }
Beispiel #20
0
        public void SetBrokerage()
        {
            if (txtRate.Text != "" && txtBroker.Text != "")
            {
                double brokerage, otherCharges;

                CustomerTransactionBo customerTransactionBo = new CustomerTransactionBo();
                CustomerAccountsVo    customerAccountsVo    = new CustomerAccountsVo();

                customerAccountsVo = customerTransactionBo.GetCustomerEQAccountDetails(int.Parse(ddlTradeAcc.SelectedItem.Value.ToString()), portfolioId);
                // Stax= Service Tax
                //if (txtBrokerage.Text == "")
                //{
                if (rbtnDelivery.Checked)
                {
                    brokerage         = double.Parse(txtRate.Text) * (customerAccountsVo.BrokerageDeliveryPercentage / 100);
                    txtBrokerage.Text = Math.Round(brokerage, 4).ToString();
                }
                else
                {
                    brokerage         = double.Parse(txtRate.Text) * (customerAccountsVo.BrokerageSpeculativePercentage / 100);
                    txtBrokerage.Text = Math.Round(brokerage, 4).ToString();
                }
                //}

                //if (txtOtherCharge.Text == "")
                //{
                otherCharges = double.Parse(txtRate.Text) * (customerAccountsVo.OtherCharges / 100);
                if (txtOtherCharge.Text == "")
                {
                    txtOtherCharge.Text = "0";
                }
                if (otherCharges != 0)
                {
                    txtOtherCharge.Text = Math.Round(otherCharges, 4).ToString();
                }
                else
                {
                    txtOtherCharge.Text = (double.Parse(txtRate.Text) * double.Parse(txtOtherCharge.Text) / 100).ToString();
                }
                //}

                Calculate();
            }
        }
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                CustomerAccountsVo           newAccountVo         = new CustomerAccountsVo();
                CustomerAccountAssociationVo AccountAssociationVo = new CustomerAccountAssociationVo();
                customerAccountsVo = (CustomerAccountsVo)Session["EQAccountVoRow"];

                newAccountVo.AccountId   = customerAccountsVo.AccountId;
                newAccountVo.PortfolioId = int.Parse(ddlPortfolio.SelectedValue);
                newAccountVo.BrokerCode  = ddlBrokerCode.SelectedValue;
                newAccountVo.TradeNum    = txtTradeNum.Text.ToString();
                newAccountVo.BrokerageDeliveryPercentage    = double.Parse(txtBrokeragePerDelivery.Text);
                newAccountVo.BrokerageSpeculativePercentage = double.Parse(txtBrokeragePerSpeculative.Text);
                newAccountVo.OtherCharges       = double.Parse(txtOtherCharges.Text);
                newAccountVo.AccountOpeningDate = DateTime.Parse(txtAccountStartingDate.Text);

                if (customerTransactionBo.UpdateCustomerEQAccountDetails(newAccountVo, userVo.UserId))
                {
                    //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountView','none');", true);
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "leftpane", "loadcontrol('CustomerEQAccountView','none');", true);
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }

            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "CustomerEQAccountAdd.ascx:btnUpdate_Click");
                object[] objects = new object[4];
                objects[0]   = customerAccountsVo;
                objects[1]   = portfolioId;
                objects[2]   = tradeAccountId;
                objects[3]   = userVo;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
Beispiel #22
0
        public bool UpdatePensionandGratuitiesAccount(CustomerAccountsVo pensionAndGratuitiesAccVo, int userId)
        {
            bool      bResult = false;
            Database  db;
            DbCommand updateGovtSavingsAccCmd;

            try
            {
                db = DatabaseFactory.CreateDatabase("wealtherp");
                updateGovtSavingsAccCmd = db.GetStoredProcCommand("SP_UpdatePensionGratuitiesAccount");
                db.AddInParameter(updateGovtSavingsAccCmd, "@CPGA_AccountId", DbType.Int32, pensionAndGratuitiesAccVo.AccountId);
                db.AddInParameter(updateGovtSavingsAccCmd, "@CPGA_AccountNum", DbType.String, pensionAndGratuitiesAccVo.AccountNum);
                db.AddInParameter(updateGovtSavingsAccCmd, "@CPGA_AccountSource", DbType.String, pensionAndGratuitiesAccVo.AccountSource);
                db.AddInParameter(updateGovtSavingsAccCmd, "@XMOH_ModeOfHoldingCode", DbType.String, pensionAndGratuitiesAccVo.ModeOfHolding);
                if (pensionAndGratuitiesAccVo.AccountOpeningDate != DateTime.MinValue)
                {
                    db.AddInParameter(updateGovtSavingsAccCmd, "@CPGA_AccountOpeningDate", DbType.Date, pensionAndGratuitiesAccVo.AccountOpeningDate);
                }
                db.AddInParameter(updateGovtSavingsAccCmd, "@CPGA_ModifiedBy", DbType.Int32, userId);
                if (db.ExecuteNonQuery(updateGovtSavingsAccCmd) == 1)
                {
                    bResult = true;
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "PensionAndGratuitiesDao.cs:UpdatePensionandGratuitiesAccount()");
                object[] objects = new object[2];
                objects[0]   = pensionAndGratuitiesAccVo;
                objects[1]   = userId;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
            return(bResult);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     OnlineUserSessionBo.CheckSession();
     advisorVo          = (AdvisorVo)Session["advisorVo"];
     customerVO         = (CustomerVo)Session["customerVo"];
     userType           = Session[SessionContents.CurrentUserRole].ToString();
     customerId         = customerVO.CustomerId;
     customerAccountsVo = (CustomerAccountsVo)Session["FolioVo"];
     BindAmc();
     BindOrderStatus();
     RadInformation.VisibleOnPageLoad = false;
     if (!Page.IsPostBack)
     {
         Cache.Remove("OrderList" + advisorVo.advisorId);
         fromDate = DateTime.Now.AddMonths(-1);
         txtOrderFrom.SelectedDate = fromDate.Date;
         txtOrderTo.SelectedDate   = DateTime.Now;
     }
 }
Beispiel #24
0
        public void UpdateAccountDetails(CustomerAccountsVo customerAccountVo)
        {
            CustomerAccountsVo newAccountVo = new CustomerAccountsVo();

            try
            {
                newAccountVo.AccountId  = customerAccountVo.AccountId;
                newAccountVo.AccountNum = txtAccountId.Text;
                if (txtAccOpenDate.Text.Trim() != string.Empty)
                {
                    newAccountVo.AccountOpeningDate = DateTime.Parse(txtAccOpenDate.Text.Trim());
                }
                newAccountVo.AccountSource = txtAccountWith.Text.ToString();
                newAccountVo.AssetCategory = customerAccountVo.AssetCategory.Trim();
                newAccountVo.AssetClass    = customerAccountVo.AssetClass.Trim();
                newAccountVo.ModeOfHolding = customerAccountVo.ModeOfHolding.Trim();
                newAccountVo.BankName      = ddlBankName.SelectedValue;
                newAccountVo.Amount        = int.Parse(txtAmount.Text);



                Session["newAccountVo"] = newAccountVo;
                govtSavingsBo.UpdateGovtSavingsAccount(newAccountVo, userVo.UserId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "PortfolioGovtSavingsEntry.ascx:UpdateAccountDetails()");
                object[] objects = new object[2];
                objects[0]   = newAccountVo;
                objects[1]   = userVo;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
Beispiel #25
0
        protected void gvCustomers_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int  i;
            int  userId     = 0;
            int  customerId = 0;
            bool isSucess   = true;

            customerId = Convert.ToInt32(e.CommandArgument);
            UserVo userVo = (UserVo)Session["userVo"];

            userId = userVo.UserId;
            CustomerAccountsVo     customerAccountsVo = new CustomerAccountsVo();
            CustomerAccountBo      customerBo         = new CustomerAccountBo();
            GridView               gv = (GridView)sender;
            RejectedTransactionsBo rejectedTransactionsBo = new RejectedTransactionsBo();

            string transactionId = Convert.ToString(Request.Params["id"]);

            string[] testArray = transactionId.Split('~');

            for (i = 0; i < testArray.Length; i++)
            {
                transactionStagingId = int.Parse(testArray[i]);
                isSucess             = rejectedTransactionsBo.MapEquityToCustomer(transactionStagingId, customerId, userId);
            }


            if (isSucess)
            {
                gvCustomers.Visible = false;
                lblMessage.Visible  = true;
                lblMessage.Text     = "Customer is mapped";
                lblMessage.CssClass = "SuccessMsg";
                tblSearch.Visible   = false;
            }
            else
            {
                lblMessage.Visible = true;
                lblMessage.Text    = "An error occurred while mapping.";
            }
        }
Beispiel #26
0
        protected void gvCustomers_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int userId     = 0;
            int customerId = 0;

            customerId = Convert.ToInt32(e.CommandArgument);
            UserVo userVo = (UserVo)Session["userVo"];

            userId = userVo.UserId;
            bool insertioncomplete = true;
            CustomerAccountsVo customerAccountsVo = new CustomerAccountsVo();
            CustomerAccountBo  customerBo         = new CustomerAccountBo();
            GridView           gv = (GridView)sender;

            RejectedTransactionsBo rejectedTransactionsBo = new RejectedTransactionsBo();

            try
            {
                insertioncomplete = MapfoliotoCustomer(customerId);
            }
            catch (Exception ex)
            {
                insertioncomplete = false;
            }

            if (insertioncomplete)
            {
                gvCustomers.Visible = false;
                lblMessage.Visible  = true;
                lblMessage.Text     = "Customer is mapped";
                lblMessage.CssClass = "SuccessMsg";
                tblSearch.Visible   = false;
                reprocess();
            }
            else
            {
                lblMessage.Visible = true;
                lblMessage.Text    = "An error occurred while mapping.";
            }
        }
Beispiel #27
0
        public bool UpdateCashSavingsAccount(CustomerAccountsVo customerAccountVo, int userId)
        {
            bool      bResult = false;
            Database  db;
            DbCommand updateCashSavingsAccCmd;

            try
            {
                db = DatabaseFactory.CreateDatabase("wealtherp");
                updateCashSavingsAccCmd = db.GetStoredProcCommand("SP_UpdateCashSavingsAccount");
                db.AddInParameter(updateCashSavingsAccCmd, "@CCSA_AccountId", DbType.Int32, customerAccountVo.AccountId);
                db.AddInParameter(updateCashSavingsAccCmd, "@CCSA_AccountNum", DbType.String, customerAccountVo.AccountNum);
                db.AddInParameter(updateCashSavingsAccCmd, "@CCSA_BankName", DbType.String, customerAccountVo.BankName);
                //  db.AddInParameter(updateCashSavingsAccCmd, "@CCSA_AccountOpeningDate", DbType.Date, customerAccountVo.AccountOpeningDate);
                db.AddInParameter(updateCashSavingsAccCmd, "@XMOH_ModeOfHoldingCode", DbType.String, customerAccountVo.ModeOfHolding);
                db.AddInParameter(updateCashSavingsAccCmd, "@CCSA_ModifiedBy", DbType.Int32, userId);
                if (db.ExecuteNonQuery(updateCashSavingsAccCmd) != 0)
                {
                    bResult = true;
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "CustomerCashSavingsPortfolioDao.cs:UpdateCashSavingsDetails()");
                object[] objects = new object[2];
                objects[0]   = customerAccountVo;
                objects[1]   = userId;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
            return(bResult);
        }
        private void ViewFolioDetails()
        {
            customerAccountsVo = (CustomerAccountsVo)Session["FolioVo"];
            if (customerAccountsVo.AccountOpeningDate != DateTime.MinValue)
            {
                txtAccountDate.Text = customerAccountsVo.AccountOpeningDate.ToShortDateString();
            }

            txtFolioNumber.Text = customerAccountsVo.AccountNum.ToString();
            BindAMC();
            ddlProductAmc.SelectedValue = customerAccountsVo.AMCCode.ToString();
            if (customerAccountsVo.IsJointHolding == 1)
            {
                rbtnYes.Checked = true;
            }
            else
            {
                rbtnNo.Checked = true;
            }
            BindModeOfHolding();
            //if (customerAccountsVo.ModeOfHoldingCode != "")
            //{
            //    ddlModeOfHolding.SelectedValue = customerAccountsVo.ModeOfHoldingCode.Trim();
            //}
            //else
            //{
            //    ddlModeOfHolding.SelectedIndex = 0;

            //}
            //ddlModeOfHolding.SelectedValue = "SI";
            ddlModeOfHolding.SelectedValue = customerAccountsVo.ModeOfHoldingCode.Trim();
            ViewState["ModeOfHolding"]     = ddlModeOfHolding.SelectedValue;
            BindAssociates(customerAccountsVo);
            gvNominee2.Enabled = false;
            gvJoint2.Enabled   = false;
            SetVisiblity(0);
            trJoint2Header.Visible = false;
        }
Beispiel #29
0
        /// <summary>
        /// This button use to insert Holding Amount
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            // int i;
            //DataTable dtBankAccId = new DataTable();
            //dtBankAccId = (DataTable)Session["BankAccId"];
            //if (dtBankAccId.Rows.Count > 0)
            //{
            //    for (i = 0; i < dtBankAccId.Rows.Count; i++)
            //    {
            //        custBankAccId = Convert.ToInt32(dtBankAccId.Rows[i]["CB_CustBankAccId"].ToString());
            //    }
            //}

            customeraccountVo = new CustomerAccountsVo();
            int customerId = 0;

            customerVo = (CustomerVo)Session["customerVo"];
            customerId = customerVo.CustomerId;
            customeraccountVo.AccountId = int.Parse(ddlAccountDetails.SelectedValue);
            customeraccountVo.Amount    = double.Parse(txtholdingAmt.Text.ToString());
            customerAccountBo.InsertholdingAmountCustomerBank(customeraccountVo, customerId);
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('ViewBankDetails','none');", true);
        }
Beispiel #30
0
 protected void ddlAccountNum_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (Request.QueryString["action"] != "" && Request.QueryString["action"] != null)
     {
         customerAccountsVo = (CustomerAccountsVo)Session["EQAccountVoRow"];
         if (Request.QueryString["action"].Trim() == "Edit")
         {
             if (ddlAccountNum.SelectedIndex > 0)
             {
                 if (customerAccountsVo != null)
                 {
                     BindEQLedgerMIS(customerVo.CustomerId, customerAccountsVo.AccountId, int.Parse(ddlAccountNum.SelectedValue));
                 }
                 else
                 {
                     tblMessage.Visible     = true;
                     ErrorMessage.Visible   = true;
                     ErrorMessage.InnerText = "Bank is not associated with Current trade  Account selected...!";
                 }
             }
         }
     }
 }