public bool CreateGIAccountAssociation(CustomerAccountAssociationVo customerAccountAssociationVo, int userId) { InsuranceDao insuranceDao = new InsuranceDao(); bool bResult = false; try { bResult = insuranceDao.CreateGIAccountAssociation(customerAccountAssociationVo, userId); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "InsuranceBo.cs:CreateGIAccountAssociation()"); object[] objects = new object[2]; objects[0] = customerAccountAssociationVo; objects[1] = userId; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(bResult); }
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); }
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; } }
protected void btnUpdate_Click(object sender, EventArgs e) { string TradeAccNo; string BrokerCode; int PortfolioId; string oldaccountID; try { CustomerAccountsVo newAccountVo = new CustomerAccountsVo(); CustomerAccountAssociationVo AccountAssociationVo = new CustomerAccountAssociationVo(); customerAccountsVo = (CustomerAccountsVo)Session["EQAccountVoRow"]; oldaccountID = customerAccountsVo.TradeNum; newAccountVo.TradeNum = txtTradeNum.Text.ToString(); if (oldaccountID == txtTradeNum.Text) { newAccountVo.AccountId = customerAccountsVo.AccountId; newAccountVo.PortfolioId = int.Parse(ddlPortfolio.SelectedValue); newAccountVo.BrokerCode = ddlBrokerCode.SelectedValue; //newAccountVo.BrokerageDeliveryPercentage = double.Parse(txtBrokeragePerDelivery.Text); //newAccountVo.BrokerageSpeculativePercentage = double.Parse(txtBrokeragePerSpeculative.Text); //newAccountVo.SebiTurnOverFee = double.Parse(Txt_SEBITrnfee.Text); //newAccountVo.TransactionCharges = double.Parse(Txt_Transcharges.Text); //newAccountVo.StampCharges= double.Parse(Txt_stampcharges.Text); //newAccountVo.Stt = double.Parse(Txt_STT.Text); //newAccountVo.ServiceTax = double.Parse(Txt_ServiceTax.Text); //newAccountVo.OtherCharges = double.Parse(txtOtherCharges.Text); if (txtAccountStartingDate.Text != "") { newAccountVo.AccountOpeningDate = DateTime.Parse(txtAccountStartingDate.Text); } if (ddlBankList.SelectedIndex != 0) { newAccountVo.BankNameInExtFile = ddlBankList.SelectedValue; } if (ddlAccountNum.SelectedIndex != 0) { newAccountVo.BankId = int.Parse(ddlAccountNum.SelectedValue); } 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); } } else { TradeAccNo = txtTradeNum.Text; BrokerCode = customerAccountsVo.BrokerCode.ToString(); PortfolioId = customerAccountsVo.PortfolioId; if (ControlHost.CheckTradeNoAvailabilityForUpdate(TradeAccNo, BrokerCode, PortfolioId)) { newAccountVo.AccountId = customerAccountsVo.AccountId; newAccountVo.PortfolioId = int.Parse(ddlPortfolio.SelectedValue); newAccountVo.BrokerCode = ddlBrokerCode.SelectedValue; //newAccountVo.BrokerageDeliveryPercentage = double.Parse(txtBrokeragePerDelivery.Text); //newAccountVo.BrokerageSpeculativePercentage = double.Parse(txtBrokeragePerSpeculative.Text); //newAccountVo.SebiTurnOverFee = double.Parse(Txt_SEBITrnfee.Text); //newAccountVo.TransactionCharges = double.Parse(Txt_Transcharges.Text); //newAccountVo.StampCharges = double.Parse(Txt_stampcharges.Text); //newAccountVo.Stt = double.Parse(Txt_STT.Text); //newAccountVo.ServiceTax = double.Parse(Txt_ServiceTax.Text); //newAccountVo.OtherCharges = double.Parse(txtOtherCharges.Text); if (txtAccountStartingDate.Text != "") { newAccountVo.AccountOpeningDate = DateTime.Parse(txtAccountStartingDate.Text); } if (ddlBankList.SelectedIndex != 0) { newAccountVo.BankNameInExtFile = ddlBankList.SelectedValue; } if (ddlAccountNum.SelectedIndex != 0) { newAccountVo.BankId = int.Parse(ddlAccountNum.SelectedValue); } 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); } } else { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "Message", "alert('Trade account already exists');", 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; } }