protected void BtnSubmit_Click(object sender, EventArgs e) { A2ZPENSIONDTO objDTO = new A2ZPENSIONDTO(); objDTO.AccType = Converter.GetInteger(lblTCode.Text); //if (txtPensionDate.Text != string.Empty) //{ // DateTime opdate = DateTime.ParseExact(txtPensionDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); // objDTO.Date = opdate; //} //else //{ // objDTO.Date = Converter.GetDateTime(System.DateTime.Now.ToShortDateString()); //} objDTO.SlabFlag = Converter.GetSmallInteger(ddlSlabFlag.SelectedValue); objDTO.DepositeAmount = Converter.GetDecimal(txtPensionRecord.Text); objDTO.Period = Converter.GetInteger(txtPeriodMth.Text); objDTO.MaturedAmount = Converter.GetDecimal(txtBenefitAmt.Text); objDTO.InterestRate = Converter.GetDecimal(txtPensionIntRate.Text); objDTO.PenalAmount = Converter.GetDecimal(txtPenalAmt.Text); objDTO.BonusAmount = Converter.GetDecimal(txtBonusAmt.Text); int roweffect = A2ZPENSIONDTO.InsertInformation(objDTO); if (roweffect > 0) { gvDetail(); clearInfo(); BtnSubmit.Visible = false; BtnUpdate.Visible = false; ddlSlabFlag.Focus(); //txtPensionDate.Focus(); } }
protected void BtnPreUpdate_Click(object sender, EventArgs e) { A2ZPENSIONDTO upDTO = new A2ZPENSIONDTO(); upDTO.AccType = Converter.GetInteger(lblTCode.Text); upDTO.SlabFlag = Converter.GetSmallInteger(ddlSlabFlag.SelectedValue); //DateTime opdate = DateTime.ParseExact(txtPreDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); //upDTO.Date = opdate; upDTO.DepositeAmount = Converter.GetDecimal(99); upDTO.Period = Converter.GetSmallInteger(txtMnthBelow.Text); upDTO.InterestRate = Converter.GetDecimal(txtIntRate.Text); string strQuery = "UPDATE A2ZATYSLAB set AtyRecords='" + upDTO.DepositeAmount + "',AtyPeriod='" + upDTO.Period + "', AtyIntRate='" + upDTO.InterestRate + "' where AtyAccType='" + lblTCode.Text + "' and AtyPeriod='" + txtMnthBelow.Text + "'"; int rowEffect = Converter.GetInteger(DataAccessLayer.BLL.CommonManager.Instance.ExecuteNonQuery(strQuery, "A2ZCSMCUS")); if (rowEffect > 0) { gvDetail(); clearInfo(); txtMnthBelow.Focus(); //txtPreDate.Focus(); } txtMnthBelow.ReadOnly = false; BtnPreSubmit.Visible = false; BtnPreUpdate.Visible = false; BtnPreDelete.Visible = false; BtnSubmit.Visible = false; BtnUpdate.Visible = false; BtnDelete.Visible = false; }
protected void PrematureGetInfo() { Errmsg.Text = "0"; if (ddlSlabFlag.SelectedIndex == 0) { Errmsg.Text = "1"; txtMnthBelow.Text = string.Empty; ddlSlabFlag.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Select Member Type');", true); return; } A2ZPENSIONDTO getDTO = new A2ZPENSIONDTO(); int accType = Converter.GetInteger(lblTCode.Text); Int16 SlabFlag = Converter.GetSmallInteger(ddlSlabFlag.SelectedValue); double record = Converter.GetDouble(99); Int16 period = Converter.GetSmallInteger(txtMnthBelow.Text); //DateTime dat = DateTime.ParseExact(txtPreDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); getDTO = (A2ZPENSIONDTO.PGetInformation(accType, SlabFlag, record, period)); if (getDTO.NoRecord > 0) { txtMnthBelow.ReadOnly = true; txtIntRate.Text = Converter.GetString(string.Format("{0:0,0.00}", getDTO.InterestRate)); BtnPreSubmit.Visible = false; BtnPreUpdate.Visible = true; BtnPreDelete.Visible = true; } else { BtnPreSubmit.Visible = true; BtnPreUpdate.Visible = false; BtnPreDelete.Visible = false; } }
protected void PensionGetInfo() { A2ZPENSIONDTO getDTO = new A2ZPENSIONDTO(); int accType = Converter.GetInteger(lblTCode.Text); Int16 SlabFlag = Converter.GetSmallInteger(ddlSlabFlag.SelectedValue); double record = Converter.GetDouble(txtPensionRecord.Text); Int16 period = Converter.GetSmallInteger(txtPeriodMth.Text); //DateTime dat = DateTime.ParseExact(txtPensionDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); getDTO = (A2ZPENSIONDTO.PGetInformation(accType, SlabFlag, record, period)); if (getDTO.NoRecord > 0) { txtBenefitAmt.Text = Converter.GetString(string.Format("{0:0,0.00}", getDTO.MaturedAmount)); txtPensionIntRate.Text = Converter.GetString(string.Format("{0:0,0.00}", getDTO.InterestRate)); txtPenalAmt.Text = Converter.GetString(string.Format("{0:0,0.00}", getDTO.PenalAmount)); txtBonusAmt.Text = Converter.GetString(string.Format("{0:0,0.00}", getDTO.BonusAmount)); BtnSubmit.Visible = false; BtnUpdate.Visible = true; BtnDelete.Visible = true; } else { BtnSubmit.Visible = true; BtnUpdate.Visible = false; BtnDelete.Visible = false; } }
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; } } }