public CashAndSavingsVo GetSpecificCashSavings(int CashSavingsPortfolioID, int CustomerID) { CashAndSavingsVo CashSavingsVo = new CashAndSavingsVo(); CashAndSavingsDao CashSavingsDao = new CashAndSavingsDao(); try { CashSavingsVo = CashSavingsDao.GetSpecificCashSavings(CashSavingsPortfolioID, CustomerID); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerCashSavingsPorfolioBo.cs:GetSpecificCashSavings()"); object[] objects = new object[1]; objects[0] = CashSavingsVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(CashSavingsVo); }
public bool AddCustomerCashSavingsDetails(CashAndSavingsVo custCashSavingsVo, int UserID) { bool blResult = false; CashAndSavingsDao customerCashSavingsPortfolioDao = new CashAndSavingsDao(); try { blResult = customerCashSavingsPortfolioDao.AddCustomerCashSavingsDetails(custCashSavingsVo, UserID); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerCashSavingsPorfolioBo.cs:AddCustomerCashSavingsDetails()"); object[] objects = new object[1]; objects[0] = custCashSavingsVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(blResult); }
protected void hiddenassociation_Click(object sender, EventArgs e) { customerCashSavingsVo = new CashAndSavingsVo(); string val = Convert.ToString(hdnMsgValue.Value); if (val == "1") { customerCashSavingsBo.DeleteCashSavingsPortfolio(int.Parse(hdndeleteId.Value)); ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "loadcontrol('PortfolioCashSavingsView','login');", true); msgRecordStatus.Visible = true; } }
private void BindDetails(string bind) { int Count = 0; try { if (bind == "All") { customerCashSavingsList = customerCashSavingsBo.GetCustomerCashSavings(portfolioId, mypager.CurrentPage, hdnSort.Value, out Count); lblTotalRows.Text = hdnRecordCount.Value = Count.ToString(); if (Count > 0) { DivPager.Style.Add("display", "visible"); } if (customerCashSavingsList != null) { DivPager.Visible = true; lblMsg.Visible = false; DataTable dtCustomerCashSavings = new DataTable(); dtCustomerCashSavings.Columns.Add("CashSavingsPortfolioId"); //dtCustomerCashSavings.Columns.Add("Name"); dtCustomerCashSavings.Columns.Add("Instrument Category"); dtCustomerCashSavings.Columns.Add("AccountWithBank"); //dtCustomerCashSavings.Columns.Add("Debt Issuer"); dtCustomerCashSavings.Columns.Add("Deposit Amount"); dtCustomerCashSavings.Columns.Add("InterestAmount"); //dtCustomerCashSavings.Columns.Add("Deposit Date"); //dtCustomerCashSavings.Columns.Add("Interest Basis"); //dtCustomerCashSavings.Columns.Add("Interest Rate"); //dtCustomerCashSavings.Columns.Add("Current Value"); //dtCustomerCashSavings.Columns.Add("Remarks"); DataRow drCustomerCashSavings; for (int i = 0; i < customerCashSavingsList.Count; i++) { drCustomerCashSavings = dtCustomerCashSavings.NewRow(); customerCashSavingsVo = new CashAndSavingsVo(); accVo = new CustomerAccountsVo(); customerCashSavingsVo = customerCashSavingsList[i]; drCustomerCashSavings[0] = customerCashSavingsVo.CashSavingsPortfolioId.ToString().Trim(); //drCustomerCashSavings[1] = customerCashSavingsVo.Name.ToString().Trim(); drCustomerCashSavings[1] = customerCashSavingsVo.AssetInstrumentCategoryName.ToString().Trim(); accVo = customerAccountBo.GetCashAndSavingsAccount(Convert.ToInt32(customerCashSavingsVo.AccountId)); drCustomerCashSavings[2] = accVo.BankName.ToString(); if (customerCashSavingsVo.DepositAmount != 0) { drCustomerCashSavings[3] = String.Format("{0:n2}", decimal.Parse(customerCashSavingsVo.DepositAmount.ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN"))); } else { drCustomerCashSavings[3] = 0; } if (customerCashSavingsVo.InterestAmntPaidOut != null) { drCustomerCashSavings[4] = String.Format("{0:n2}", decimal.Parse(customerCashSavingsVo.InterestAmntPaidOut.ToString()).ToString("n2", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN"))); } dtCustomerCashSavings.Rows.Add(drCustomerCashSavings); } gvCustomerCashSavings.DataSource = dtCustomerCashSavings; gvCustomerCashSavings.DataBind(); gvCustomerCashSavings.Visible = true; } else { gvCustomerCashSavings.DataSource = null; gvCustomerCashSavings.DataBind(); gvCustomerCashSavings.Visible = false; DivPager.Visible = false; lblMsg.Visible = true; } } this.GetPageCount(); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "PortfolioCashSavingsView.ascx:BindDetails()"); object[] objects = new object[5]; objects[0] = customerVo; objects[1] = bind; objects[2] = customerCashSavingsVo; objects[3] = customerCashSavingsList; objects[4] = Count; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
public bool UpdateCashSavingsDetails(CashAndSavingsVo CashSavingsVo, int UserID) { bool blResult = false; Database db; DbCommand updateCustCashSavingsCmd; try { db = DatabaseFactory.CreateDatabase("wealtherp"); updateCustCashSavingsCmd = db.GetStoredProcCommand("SP_UpdateCustomerCashSavings"); db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_CashSavingsNPId", DbType.Int32, CashSavingsVo.CashSavingsPortfolioId); db.AddInParameter(updateCustCashSavingsCmd, "@PAIC_AssetInstrumentCategoryCode", DbType.String, CashSavingsVo.AssetInstrumentCategoryCode); db.AddInParameter(updateCustCashSavingsCmd, "@PAG_AssetGroupCode", DbType.String, CashSavingsVo.AssetGroupCode); db.AddInParameter(updateCustCashSavingsCmd, "@CCSA_AccountId", DbType.Int64, CashSavingsVo.AccountId); db.AddInParameter(updateCustCashSavingsCmd, "@XDI_DebtIssuerCode", DbType.String, CashSavingsVo.DebtIssuerCode); db.AddInParameter(updateCustCashSavingsCmd, "@XIB_InterestBasisCode", DbType.String, CashSavingsVo.InterestBasisCode); db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_Name", DbType.String, CashSavingsVo.Name); db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_DepositAmount", DbType.Decimal, CashSavingsVo.DepositAmount); if (CashSavingsVo.DepositDate != DateTime.MinValue) { db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_DepositDate", DbType.DateTime, CashSavingsVo.DepositDate); } else { db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_DepositDate", DbType.DateTime, DBNull.Value); } db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_CurrentValue", DbType.Decimal, CashSavingsVo.CurrentValue); db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_InterestRate", DbType.Decimal, CashSavingsVo.InterestRate); db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_IsInterestAccumulated", DbType.String, CashSavingsVo.IsInterestAccumalated); if (CashSavingsVo.CompoundInterestFrequencyCode != null) { db.AddInParameter(updateCustCashSavingsCmd, "@XF_CompoundInterestFrequencyCode", DbType.String, CashSavingsVo.CompoundInterestFrequencyCode); } else { db.AddInParameter(updateCustCashSavingsCmd, "@XF_CompoundInterestFrequencyCode", DbType.String, DBNull.Value); } if (CashSavingsVo.InterestPayoutFrequencyCode != null) { db.AddInParameter(updateCustCashSavingsCmd, "@XF_InterestPayoutFrequencyCode", DbType.String, CashSavingsVo.InterestPayoutFrequencyCode); } else { db.AddInParameter(updateCustCashSavingsCmd, "@XF_InterestPayoutFrequencyCode", DbType.String, DBNull.Value); } if (CashSavingsVo.InterestAmntPaidOut != null) { db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_InterestAmntPaidOut", DbType.String, CashSavingsVo.InterestAmntPaidOut); } else { db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_InterestAmntPaidOut", DbType.String, DBNull.Value); } if (CashSavingsVo.InterestAmntAccumulated != null) { db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_InterestAmntAccumulated", DbType.String, CashSavingsVo.InterestAmntAccumulated); } else { db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_InterestAmntAccumulated", DbType.String, DBNull.Value); } db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_ModifiedBy", DbType.Int32, UserID); db.AddInParameter(updateCustCashSavingsCmd, "@CCSNP_Remark", DbType.String, CashSavingsVo.Remarks); if (db.ExecuteNonQuery(updateCustCashSavingsCmd) != 0) { blResult = 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[1]; objects[0] = CashSavingsVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(blResult); }
public CashAndSavingsVo GetSpecificCashSavings(int CashSavingsPortfolioID, int CustomerID) { CashAndSavingsVo cashAndSavingsVo = null; Database db; DbCommand getSpecificCashSavingsCmd; DataSet dsGetSpecificCashSavings; try { db = DatabaseFactory.CreateDatabase("wealtherp"); getSpecificCashSavingsCmd = db.GetStoredProcCommand("SP_GetCashSavingsNetPosition"); db.AddInParameter(getSpecificCashSavingsCmd, "@CCSNP_CashSavingsNPId", DbType.Int32, CashSavingsPortfolioID); dsGetSpecificCashSavings = db.ExecuteDataSet(getSpecificCashSavingsCmd); if (dsGetSpecificCashSavings.Tables[0].Rows.Count > 0) { cashAndSavingsVo = new CashAndSavingsVo(); foreach (DataRow dr in dsGetSpecificCashSavings.Tables[0].Rows) { cashAndSavingsVo.AccountId = Int64.Parse(dr["CCSA_AccountId"].ToString()); //cashAndSavingsVo.AccountNumber = ""; cashAndSavingsVo.AssetGroupCode = dr["PAG_AssetGroupCode"].ToString(); cashAndSavingsVo.AssetInstrumentCategoryCode = dr["PAIC_AssetInstrumentCategoryCode"].ToString(); cashAndSavingsVo.CashSavingsPortfolioId = Int32.Parse(dr["CCSNP_CashSavingsNPId"].ToString()); cashAndSavingsVo.CurrentValue = float.Parse(dr["CCSNP_CurrentValue"].ToString()); //cashAndSavingsVo.CustomerId = Int32.Parse(dr["C_CustomerId"].ToString()); cashAndSavingsVo.DebtIssuerCode = dr["XDI_DebtIssuerCode"].ToString(); cashAndSavingsVo.DepositAmount = float.Parse(dr["CCSNP_DepositAmount"].ToString()); if (dr["CCSNP_DepositDate"].ToString() != "") { cashAndSavingsVo.DepositDate = DateTime.Parse(dr["CCSNP_DepositDate"].ToString()); } cashAndSavingsVo.InterestBasisCode = dr["XIB_InterestBasisCode"].ToString(); cashAndSavingsVo.InterestRate = float.Parse(dr["CCSNP_InterestRate"].ToString()); cashAndSavingsVo.IsInterestAccumalated = Int16.Parse(dr["CCSNP_IsInterestAccumulated"].ToString()); cashAndSavingsVo.Name = dr["CCSNP_Name"].ToString(); if (dr["XF_CompoundInterestFrequencyCode"].ToString() != "") { cashAndSavingsVo.CompoundInterestFrequencyCode = dr["XF_CompoundInterestFrequencyCode"].ToString(); } if (dr["CCSNP_InterestAmntAccumulated"].ToString() != "") { cashAndSavingsVo.InterestAmntAccumulated = float.Parse(dr["CCSNP_InterestAmntAccumulated"].ToString()); } if (dr["CCSNP_InterestAmntPaidOut"].ToString() != "") { cashAndSavingsVo.InterestAmntPaidOut = float.Parse(dr["CCSNP_InterestAmntPaidOut"].ToString()); } if (dr["XF_InterestPayoutFrequencyCode"].ToString() != "") { cashAndSavingsVo.InterestPayoutFrequencyCode = dr["XF_InterestPayoutFrequencyCode"].ToString(); } if (dr["CCSNP_InterestRate"].ToString() != "") { cashAndSavingsVo.InterestRate = float.Parse(dr["CCSNP_InterestRate"].ToString()); } if (dr["CCSNP_Remark"].ToString() != "") { cashAndSavingsVo.Remarks = dr["CCSNP_Remark"].ToString(); } } } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerCashSavingsPortfolioDao.cs:GetSpecificCashSavings()"); object[] objects = new object[2]; objects[0] = CustomerID; objects[1] = CashSavingsPortfolioID; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(cashAndSavingsVo); }
public List <CashAndSavingsVo> GetCustomerCashSavings(int portfolioId, int CurrentPage, string sortOrder, out int Count) { List <CashAndSavingsVo> CustomerCashSavingsList = null; CashAndSavingsVo customerCashSavingsPortfolioVo;// = new CustomerCashSavingsPortfolioVo(); Database db; DbCommand getCustomerCashSavingsCmd; DataSet dsGetCustomerCashSavings; try { db = DatabaseFactory.CreateDatabase("wealtherp"); getCustomerCashSavingsCmd = db.GetStoredProcCommand("SP_GetCustomerCashSavingsList"); db.AddInParameter(getCustomerCashSavingsCmd, "@CP_PortfolioId", DbType.Int32, portfolioId); db.AddInParameter(getCustomerCashSavingsCmd, "@CurrentPage", DbType.Int32, CurrentPage); db.AddInParameter(getCustomerCashSavingsCmd, "@SortOrder", DbType.String, sortOrder); dsGetCustomerCashSavings = db.ExecuteDataSet(getCustomerCashSavingsCmd); if (dsGetCustomerCashSavings.Tables[0].Rows.Count > 0) { CustomerCashSavingsList = new List <CashAndSavingsVo>(); foreach (DataRow dr in dsGetCustomerCashSavings.Tables[0].Rows) { customerCashSavingsPortfolioVo = new CashAndSavingsVo(); customerCashSavingsPortfolioVo.CashSavingsPortfolioId = int.Parse(dr["CCSNP_CashSavingsNPId"].ToString()); customerCashSavingsPortfolioVo.AccountId = Int32.Parse(dr["CCSA_AccountId"].ToString().Trim()); customerCashSavingsPortfolioVo.AssetGroupCode = dr["PAG_AssetGroupCode"].ToString().Trim(); customerCashSavingsPortfolioVo.AssetInstrumentCategoryCode = dr["PAIC_AssetInstrumentCategoryCode"].ToString().Trim(); customerCashSavingsPortfolioVo.CurrentValue = float.Parse(dr["CCSNP_CurrentValue"].ToString().Trim()); // customerCashSavingsPortfolioVo.CustomerId = Int32.Parse(dr["C_CustomerId"].ToString().Trim()); customerCashSavingsPortfolioVo.DebtIssuerCode = dr["XDI_DebtIssuerCode"].ToString().Trim(); customerCashSavingsPortfolioVo.DepositAmount = float.Parse(dr["CCSNP_DepositAmount"].ToString().Trim()); if (dr["CCSNP_DepositDate"].ToString() != "") { customerCashSavingsPortfolioVo.DepositDate = DateTime.Parse(dr["CCSNP_DepositDate"].ToString().Trim()); } customerCashSavingsPortfolioVo.InterestBasisCode = dr["XIB_InterestBasisCode"].ToString().Trim(); customerCashSavingsPortfolioVo.IsInterestAccumalated = Int16.Parse(dr["CCSNP_IsInterestAccumulated"].ToString().Trim()); customerCashSavingsPortfolioVo.Remarks = dr["CCSNP_Remark"].ToString(); customerCashSavingsPortfolioVo.Name = dr["CCSNP_Name"].ToString(); customerCashSavingsPortfolioVo.AssetInstrumentCategoryName = dr["PAIC_AssetInstrumentCategoryName"].ToString(); if (dr["XF_CompoundInterestFrequencyCode"].ToString() != "") { customerCashSavingsPortfolioVo.CompoundInterestFrequencyCode = dr["XF_CompoundInterestFrequencyCode"].ToString().Trim(); } if (dr["CCSNP_InterestAmntAccumulated"].ToString() != "") { customerCashSavingsPortfolioVo.InterestAmntAccumulated = float.Parse(dr["CCSNP_InterestAmntAccumulated"].ToString().Trim()); } if (dr["CCSNP_InterestAmntPaidOut"].ToString() != "") { customerCashSavingsPortfolioVo.InterestAmntPaidOut = float.Parse(dr["CCSNP_InterestAmntPaidOut"].ToString().Trim()); } if (dr["XF_InterestPayoutFrequencyCode"].ToString() != "") { customerCashSavingsPortfolioVo.InterestPayoutFrequencyCode = dr["XF_InterestPayoutFrequencyCode"].ToString().Trim(); } if (dr["CCSNP_InterestRate"].ToString() != "") { customerCashSavingsPortfolioVo.InterestRate = float.Parse(dr["CCSNP_InterestRate"].ToString().Trim()); } CustomerCashSavingsList.Add(customerCashSavingsPortfolioVo); } } if (dsGetCustomerCashSavings.Tables[1] != null && dsGetCustomerCashSavings.Tables[0].Rows.Count > 0) { Count = Int32.Parse(dsGetCustomerCashSavings.Tables[1].Rows[0][0].ToString()); } else { Count = 0; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerCashSavingsPortfolioDao.cs:GetCustomerCashSavings()"); object[] objects = new object[1]; objects[0] = portfolioId; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(CustomerCashSavingsList); }
private void BindDetails() { // Get the Portfolio ID from Session' try { customerVo = (CustomerVo)Session["CustomerVo"]; customerId = customerVo.CustomerId; CashSavingsVo = new CashAndSavingsVo(); int CashSavingsPortfolioId = Int32.Parse(Session["CashSavingsPortfolioId"].ToString()); CashSavingsVo = CashSavingsBo.GetSpecificCashSavings(CashSavingsPortfolioId, customerId); if (CashSavingsVo != null) { ddlAssetIC.SelectedValue = CashSavingsVo.AssetInstrumentCategoryCode.ToString(); //.Trim() DataSet dsAccounts = new DataSet(); CustomerAccountBo custAccBo = new CustomerAccountBo(); dsAccounts = custAccBo.GetCustomerCashSavingsAccounts(customerVo.CustomerId, assetGroupCode, ddlAssetIC.SelectedValue); if (dsAccounts.Tables[0].Rows.Count > 0) { ddlAccountID.DataSource = dsAccounts.Tables[0]; ddlAccountID.DataTextField = "CCSA_AccountNum"; ddlAccountID.DataValueField = "CCSA_AccountId"; ddlAccountID.DataBind(); ddlAccountID.Items.Insert(0, "Select an Account"); } ddlAccountID.SelectedValue = CashSavingsVo.AccountId.ToString(); // .Trim() txtName.Text = CashSavingsVo.Name.ToString().Trim(); txtDepositAmount.Text = CashSavingsVo.DepositAmount.ToString().Trim(); txtDepositDate.Text = CashSavingsVo.DepositDate.ToShortDateString().Trim(); txtCurrentValue.Text = CashSavingsVo.CurrentValue.ToString().Trim(); txtInterestRate.Text = CashSavingsVo.InterestRate.ToString().Trim(); ddlDebtIssuer.SelectedValue = CashSavingsVo.DebtIssuerCode.ToString().Trim(); // ddlInterestBasis.SelectedValue = CashSavingsVo.InterestBasisCode.ToString().Trim(); // if (CashSavingsVo.InterestBasisCode.Trim() == "CI") { trCIFrequency.Visible = true; ddlCIFrequency.SelectedValue = CashSavingsVo.CompoundInterestFrequencyCode.ToString().Trim(); } else { trCIFrequency.Visible = false; } if (CashSavingsVo.IsInterestAccumalated == 0) { rbtnInterestAccumYes.Checked = false; rbtnInterestAccumNo.Checked = true; trIA.Visible = false; trIP.Visible = true; trIPFrequency.Visible = true; txtInterestAmtPaidOut.Text = CashSavingsVo.InterestAmntPaidOut.ToString().Trim(); ddlIPFrequency.SelectedValue = CashSavingsVo.InterestPayoutFrequencyCode.ToString().Trim(); } else if (CashSavingsVo.IsInterestAccumalated == 1) { rbtnInterestAccumYes.Checked = true; rbtnInterestAccumNo.Checked = false; trIA.Visible = true; trIP.Visible = false; trIPFrequency.Visible = false; txtInterestAmtAccumulated.Text = CashSavingsVo.InterestAmntAccumulated.ToString().Trim(); } else { trIA.Visible = false; trIP.Visible = false; trIPFrequency.Visible = false; } } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "PortfolioCashSavingsEdit.ascx.cs:BindDetails()"); object[] objects = new object[3]; objects[0] = CashSavingsVo; objects[1] = customerVo; objects[2] = customerId; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
protected void btnUpdateDetails_Click(object sender, EventArgs e) { CashAndSavingsVo customerCashSavingsPortfolioVo = new CashAndSavingsVo(); CashAndSavingsBo customerCashSavingsPortfolioBo = new CashAndSavingsBo(); try { // Get Session Values userVo = (UserVo)Session["userVo"]; customerVo = (CustomerVo)Session["CustomerVo"]; userId = userVo.UserId; customerId = customerVo.CustomerId; customerCashSavingsPortfolioVo.CashSavingsPortfolioId = Int32.Parse(Session["CashSavingsPortfolioId"].ToString()); customerCashSavingsPortfolioVo.AccountId = Int64.Parse(ddlAccountID.SelectedValue); customerCashSavingsPortfolioVo.AssetGroupCode = assetGroupCode; customerCashSavingsPortfolioVo.AssetInstrumentCategoryCode = ddlAssetIC.SelectedValue.ToString(); customerCashSavingsPortfolioVo.CustomerId = customerId; customerCashSavingsPortfolioVo.Name = txtName.Text.Trim(); customerCashSavingsPortfolioVo.DepositAmount = float.Parse(txtDepositAmount.Text.Trim()); customerCashSavingsPortfolioVo.DepositDate = DateTime.Parse(txtDepositDate.Text.Trim()); customerCashSavingsPortfolioVo.CurrentValue = float.Parse(txtCurrentValue.Text.Trim()); customerCashSavingsPortfolioVo.InterestRate = float.Parse(txtInterestRate.Text.Trim()); customerCashSavingsPortfolioVo.DebtIssuerCode = ddlDebtIssuer.SelectedValue.ToString(); customerCashSavingsPortfolioVo.InterestBasisCode = ddlInterestBasis.SelectedValue.ToString(); if (ddlInterestBasis.SelectedValue == "CI") { customerCashSavingsPortfolioVo.CompoundInterestFrequencyCode = ddlCIFrequency.SelectedValue.ToString(); } else if (ddlInterestBasis.SelectedValue == "SI") { customerCashSavingsPortfolioVo.InterestPayoutFrequencyCode = ddlIPFrequency.SelectedValue.ToString(); } if (rbtnInterestAccumYes.Checked == true) { customerCashSavingsPortfolioVo.IsInterestAccumalated = 1; customerCashSavingsPortfolioVo.InterestAmntAccumulated = float.Parse(txtInterestAmtAccumulated.Text.Trim()); } else if (rbtnInterestAccumNo.Checked == true) { customerCashSavingsPortfolioVo.IsInterestAccumalated = 0; customerCashSavingsPortfolioVo.InterestAmntPaidOut = float.Parse(txtInterestAmtPaidOut.Text.Trim()); } if (customerCashSavingsPortfolioBo.UpdateCashSavingsDetails(customerCashSavingsPortfolioVo, userId)) { // Redirect to View Cash Details Control trError.Visible = false; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('PortfolioCashSavingsView','none');", true); } else { // Display Error Message if the Addition has failed trError.Visible = true; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "PortfolioCashSavingsEdit.ascx:btnUpdateDetails_Click()"); object[] objects = new object[3]; objects[0] = customerCashSavingsPortfolioVo; objects[1] = customerVo; objects[2] = userVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }