コード例 #1
0
        public bool DeleteMoneyBackEpisode(MoneyBackEpisodeVo moneyBackEpisodeVo)
        {
            bool blResult = false;

            InsuranceDao insuranceDao = new InsuranceDao();

            try
            {
                blResult = insuranceDao.DeleteMoneyBackEpisode(moneyBackEpisodeVo);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "InsuranceBo.cs:DeleteMoneyBackEpisode()");
                object[] objects = new object[1];
                objects[0]   = moneyBackEpisodeVo;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }

            return(blResult);
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            List <MoneyBackEpisodeVo> moneyBackEpisodeList = new List <MoneyBackEpisodeVo>();
            MoneyBackEpisodeVo        moneyBackEpisodeVo;

            for (int i = 0; i < count; i++)
            {
                moneyBackEpisodeVo = new MoneyBackEpisodeVo();
                string paymentDate = (((TextBox)PlaceHolder.FindControl("txtPaymentDate" + i.ToString())).Text.ToString());
                moneyBackEpisodeVo.CIMBE_RepaymentDate = DateTime.Parse(paymentDate);
                string repaidPercent = (((TextBox)PlaceHolder.FindControl("txtRepaidPer" + i.ToString())).Text.ToString());
                moneyBackEpisodeVo.CIMBE_RepaidPer = float.Parse(repaidPercent);
                moneyBackEpisodeList.Add(moneyBackEpisodeVo);
            }
            Session["episodeList"] = moneyBackEpisodeList;
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('PortfolioInsuranceEntry','none');", true);
        }