public bool UpdateInsuranceULIPPlan(InsuranceULIPVo insuranceUlipVo) { bool bResult = false; InsuranceDao insuranceDao = new InsuranceDao(); try { bResult = insuranceDao.UpdateInsuranceULIPPlan(insuranceUlipVo); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "InsuranceBo.cs:UpdateMoneyBackEpisode()"); object[] objects = new object[1]; objects[0] = insuranceUlipVo; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(bResult); }
public InsuranceULIPVo GetInsuranceULIPDetails(int insuranceUlipId) { InsuranceDao insuranceDao = new InsuranceDao(); InsuranceULIPVo insuranceUlipVo = new InsuranceULIPVo(); try { insuranceUlipVo = insuranceDao.GetInsuranceULIPDetails(insuranceUlipId); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "InsuranceBo.cs:GetInsuranceULIPDetails()"); object[] objects = new object[1]; objects[0] = insuranceUlipId; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(insuranceUlipVo); }
protected void Button1_Click(object sender, EventArgs e) { List <float> subPlanList = null; List <InsuranceULIPVo> insuranceUlipList; InsuranceULIPVo insuranceUlipVo; DataSet ds = assetBo.GetULIPSubPlans(int.Parse(ddlUlipPlans.SelectedItem.Value.ToString())); int count = ds.Tables[0].Rows.Count; subPlanList = new List <float>(); insuranceUlipList = new List <InsuranceULIPVo>(); float tot = 0; int txt = 0; // Calcuating the total Asset Allocation value for (int i = 0; i < count; i++) { string temp = (((TextBox)PlaceHolder1.FindControl("txtAllocationId" + i.ToString())).Text.ToString()); if (temp == "") { txt = 0; } else { txt = int.Parse(temp.ToString()); } tot = tot + (float)txt; subPlanList.Add(txt); } // Check the total asset Allocation and assign Unit, Purchase price and Allocation percentage if (tot == 100) { Label6.Text = "Hundred"; for (int i = 0; i < count; i++) { insuranceUlipVo = new InsuranceULIPVo(); string allocationPer = ((TextBox)PlaceHolder1.FindControl("txtAllocationId" + i.ToString())).Text.ToString(); string units = ((TextBox)PlaceHolder1.FindControl("txtUnitsId" + i.ToString())).Text.ToString(); string purchasePrice = ((TextBox)PlaceHolder1.FindControl("txtPurchasePriceId" + i.ToString())).Text.ToString(); insuranceUlipVo.WUP_ULIPSubPlaCode = ds.Tables[0].Rows[i][0].ToString(); insuranceUlipVo.CIUP_ULIPPlanId = int.Parse(ddlUlipPlans.SelectedItem.Value.ToString()); if (allocationPer == "") { insuranceUlipVo.CIUP_AllocationPer = 0; insuranceUlipVo.CIUP_PurchasePrice = 0; insuranceUlipVo.CIUP_Unit = 0; } else { insuranceUlipVo.CIUP_AllocationPer = float.Parse(allocationPer.ToString()); insuranceUlipVo.CIUP_PurchasePrice = float.Parse(purchasePrice.ToString()); insuranceUlipVo.CIUP_Unit = float.Parse(units.ToString()); } insuranceUlipList.Add(insuranceUlipVo); } Session["ulipList"] = insuranceUlipList; Session["issuerCode"] = ddlInsuranceIssuerCode.SelectedItem.Value.ToString(); //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('PortfolioInsuranceEntry','none');", true); Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('CustomerAccountAdd','none');", true); } else { Label6.Text = "Not 100"; } }