Esempio n. 1
0
        protected void BtnConfirm_Click(object sender, EventArgs e)
        {
            if (ValidateInput())
            {
                string account   = TbNewAcno.Text.ToString();
                string custId    = LblCustId.Text.ToString();
                double principal = Convert.ToDouble(TbPrincipal.Text.ToString());
                int    term      = Convert.ToInt32(DdlTerm.SelectedItem.Text.ToString());
                double rate      = Convert.ToDouble(DdlTerm.SelectedValue);
                string mode      = DdlRenew.SelectedItem.Text;

                bool result = TDMasterBLL.Add(account, custId, principal, term, rate, mode);

                if (result)
                {
                    LblResult.Text      = "Term Deposit Created!";
                    LblResult.ForeColor = Color.Green;
                }
                else
                {
                    LblResult.Text      = "Unable to insert term deposit. Please inform system administrator!";
                    LblResult.ForeColor = Color.Red;
                }
            }
        }
Esempio n. 2
0
        protected void DdlTerm_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ValidateInput())
            {
                double principal = Convert.ToDouble(TbPrincipal.Text);
                int    term      = Convert.ToInt32(DdlTerm.SelectedItem.Text);
                double rate      = Convert.ToDouble(DdlTerm.SelectedValue);

                TDMaster td = TDMasterBLL.GetComputedObject(principal, term, rate);

                LblIntRte.Text     = DdlTerm.SelectedValue;
                LblMaturedDte.Text = td.Maturity.ToShortDateString();
                LblInterest.Text   = td.InterestAmt.ToString();
                LblMaturedAmt.Text = td.MatureAmt.ToString();
            }
        }