protected void txtFixedDepositAmount_TextChanged(object sender, EventArgs e) { try { if (txtFixedDepositAmount.Text != "0") { Int16 accType = Converter.GetSmallInteger(txtAccType.Text); Int16 SlabFlag = Converter.GetSmallInteger(hdnmemType.Value); double depAmount = Converter.GetDouble(txtFixedDepositAmount.Text); Int16 period = Converter.GetSmallInteger(txtPeriod.Text); A2ZPENSIONDTO getDTO = (A2ZPENSIONDTO.GetInformation(accType, SlabFlag, depAmount, period)); if (getDTO.NoRecord > 0) { txtFixedDepositAmount.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.DepositeAmount)); txtPeriod.Text = Converter.GetString(getDTO.Period); txtFixedMthInt.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.MaturedAmount)); DateTime Matdate = Converter.GetDateTime(hdnTranDate.Value); Matdate = Matdate.AddMonths(Converter.GetSmallInteger(txtPeriod.Text)); DateTime dt = Converter.GetDateTime(Matdate); string date = dt.ToString("dd/MM/yyyy"); txtMaturityDate.Text = Converter.GetString(date); DateTime Benefitdate = Converter.GetDateTime(hdnTranDate.Value); Benefitdate = Benefitdate.AddMonths(Converter.GetSmallInteger(1)); DateTime dt1 = Converter.GetDateTime(Benefitdate); string date1 = dt1.ToString("dd/MM/yyyy"); CtrlBenefitDate.Text = Converter.GetString(date1); txtPeriod.Focus(); } else { { String csname1 = "PopupScript"; Type cstype = GetType(); ClientScriptManager cs = Page.ClientScript; if (!cs.IsStartupScriptRegistered(cstype, csname1)) { String cstext1 = "alert('Fixed Deposit Amount not Assign in Parameter');"; cs.RegisterStartupScript(cstype, csname1, cstext1, true); txtFixedDepositAmount.Text = string.Empty; txtFixedDepositAmount.Focus(); } return; } } } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.txtFixedDepositAmount_TextChanged Problem');</script>"); //throw ex; } }
protected void txtPeriod_TextChanged(object sender, EventArgs e) { if (hdnlblcls.Value == "2") { Int16 accType = Converter.GetSmallInteger(txtAccType.Text); Int16 SlabFlag = Converter.GetSmallInteger(hdnmemType.Value); Int16 period = Converter.GetSmallInteger(txtPeriod.Text); A2ZPENSIONDTO getDTO = (A2ZPENSIONDTO.GetInformation(accType, SlabFlag, 0, period)); if (getDTO.NoRecord > 0) { txtIntRate.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.InterestRate)); CtrlMatureAmt.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.MaturedAmount)); DateTime Matdate = Converter.GetDateTime(hdnTranDate.Value); //Matdate = DateTime.ParseExact(hdnTranDate.Value, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); Matdate = Matdate.AddMonths(Converter.GetSmallInteger(txtPeriod.Text)); DateTime dt = Converter.GetDateTime(Matdate); string date = dt.ToString("dd/MM/yyyy"); txtMaturityDate.Text = Converter.GetString(date); } else { String csname1 = "PopupScript"; Type cstype = GetType(); ClientScriptManager cs = Page.ClientScript; if (!cs.IsStartupScriptRegistered(cstype, csname1)) { String cstext1 = "alert('Period not Assign in Parameter');"; cs.RegisterStartupScript(cstype, csname1, cstext1, true); txtPeriod.Text = string.Empty; txtPeriod.Focus(); } return; } } }