protected void txtLoanAmt_TextChanged(object sender, EventArgs e) { double ValueConvert = Converter.GetDouble(txtLoanAmt.Text); txtLoanAmt.Text = Converter.GetString(String.Format("{0:0,0.00}", ValueConvert)); if (txtNoOfInstl.Text != "") { no = Convert.ToInt32(txtNoOfInstl.Text); loanAmt = Convert.ToDouble(txtLoanAmt.Text);//loan amount instlAmt = (loanAmt / no); instlAmt = Math.Round(instlAmt); double linstl = Math.Abs((instlAmt * (no - 1)) - loanAmt); txtInstlAmt.Text = Convert.ToString(string.Format("{0:0,0.00}", instlAmt)); txtLastInstlAmt.Text = Convert.ToString(string.Format("{0:0,0.00}", linstl)); BtnSubmit.Focus(); } else { txtNoOfInstl.Focus(); } }
protected void txtInstlAmt_TextChanged(object sender, EventArgs e) { if (txtLoanAmt.Text == string.Empty) { txtInstlAmt.Text = string.Empty; txtLoanAmt.Focus(); //String csname1 = "PopupScript"; //Type cstype = GetType(); //ClientScriptManager cs = Page.ClientScript; //if (!cs.IsStartupScriptRegistered(cstype, csname1)) //{ // String cstext1 = "alert('Please Input Loan Amount');"; // cs.RegisterStartupScript(cstype, csname1, cstext1, true); //} ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Loan Amount');", true); return; } double instlAmt1 = Convert.ToDouble(txtInstlAmt.Text); loanAmt = Convert.ToDouble(txtLoanAmt.Text);//loan amount double no = (loanAmt / instlAmt1); int NoInstl = Converter.GetInteger(Math.Round(no)); txtNoOfInstl.Text = Convert.ToString(NoInstl); double linstl = Math.Abs((instlAmt1 * (NoInstl - 1)) - loanAmt); txtInstlAmt.Text = Convert.ToString(string.Format("{0:0,0.00}", instlAmt1)); txtLastInstlAmt.Text = Convert.ToString(string.Format("{0:0,0.00}", linstl)); BtnSubmit.Focus(); }
protected void txtLIdsTrfDebit_TextChanged(object sender, EventArgs e) { double ValueConvert = Converter.GetDouble(txtLIdsTrfDebit.Text); txtLIdsTrfDebit.Text = Converter.GetString(String.Format("{0:0,0.00}", ValueConvert)); BtnSubmit.Focus(); }
protected void BtnAddItem_Click(object sender, EventArgs e) { if (ddlKarat.SelectedIndex == 0) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Select Karat');", true); return; } try { txtPartyCode.ReadOnly = true; ddlPartyName.Enabled = false; var prm = new object[31]; prm[0] = Converter.GetDateToYYYYMMDD(lblProcesDate.Text); prm[1] = ddlCode.SelectedValue; prm[2] = ddlCode.SelectedItem.Text.Substring(0, 4); prm[3] = ddlCurrency.SelectedValue; prm[4] = ddlKarat.SelectedValue; prm[5] = txtItemName.Text; prm[6] = txtPurity.Text; prm[7] = txtGrossWt.Text; prm[8] = txtStoneWt.Text; prm[9] = txtNetWt.Text; prm[10] = txtPureWt.Text; prm[11] = txtMakingRate.Text; prm[12] = txtStoneMakingRate.Text; prm[13] = txtMakingValue.Text; prm[14] = txtStoneMakingValue.Text; prm[15] = "0"; // txtTotalMetalValue.Text; prm[16] = txtTotalValue.Text; prm[17] = "4"; //Fixed Purchase Type prm[18] = "UnFixed Purchase Return"; prm[19] = "2"; //FixedUnfixed prm[20] = ddlLocation.SelectedValue; prm[21] = ddlLocation.SelectedItem.Text; prm[22] = ddlPartyName.SelectedValue; prm[23] = lblPartyAccno.Text; prm[24] = txtRefName.Text; prm[25] = Converter.GetDateToYYYYMMDD(txtDueDate.Text); prm[26] = "0"; prm[27] = "0"; prm[28] = "0"; prm[29] = "0"; prm[30] = lblID.Text; int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("[Sp_InsertWfItemGoldReturn]", prm, "A2ZACGMS")); if (result == 0) { ClearInfo(); gvItemDetailsInfo(); BtnSubmit.Focus(); } } catch (Exception Ex) { throw Ex; } }
protected void TxtAccName_TextChanged(object sender, EventArgs e) { try { string CUNAME = TxtAccName.Text; string[] custnob = CUNAME.Split('_'); if (custnob.Length > 1) { AC_Status = CC.GetAccStatus(TxtBrcd.Text, TxtPcd.Text, custnob[1].ToString()); if (AC_Status == "1") { TxtAccName.Text = custnob[0].ToString(); TxtAccno.Text = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString()); ViewState["CUSTNO"] = custnob[2].ToString(); ViewState["GLCODE"] = avs5043.getgldr(TxtAccno.Text, TxtPcd.Text, TxtBrcd.Text).Split('_')[0].ToString(); BtnSubmit.Focus(); } } } catch (Exception ex) { ExceptionLogging.SendErrorToText(ex); } }
public void Paymenttype() { try { if (ddlPayType.SelectedValue.ToString() == "0") { Transfer.Visible = false; Transfer1.Visible = false; DivAmount.Visible = false; } else if (ddlPayType.SelectedValue.ToString() == "1") { ViewState["PAYTYPE"] = "CASH"; Transfer.Visible = false; Transfer1.Visible = false; DivAmount.Visible = true; txtNarration.Text = "By Cash"; Clear(); BtnSubmit.Focus(); } else if (ddlPayType.SelectedValue.ToString() == "2") { ViewState["PAYTYPE"] = "TRANSFER"; Transfer.Visible = true; Transfer1.Visible = false; DivAmount.Visible = true; txtNarration.Text = "By TRF"; autoglname1.ContextKey = Session["BRCD"].ToString(); Clear(); txtProdType1.Focus(); } else if (ddlPayType.SelectedValue.ToString() == "4") { ViewState["PAYTYPE"] = "CHEQUE"; Transfer.Visible = true; Transfer1.Visible = true; DivAmount.Visible = true; txtNarration.Text = "By TRF"; autoglname1.ContextKey = Session["BRCD"].ToString(); Clear(); txtProdType1.Focus(); } else { Clear(); Transfer.Visible = false; Transfer1.Visible = false; } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
protected void Txtone_TextChanged(object sender, EventArgs e) { try { BtnSubmit.Focus(); } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
protected void TxtNoOfNotes_TextChanged(object sender, EventArgs e) { try { int Tot = 0; Tot = (Convert.ToInt32(TxtNoOfNotes.Text)) * (Convert.ToInt32(TxtNoteType.Text)); TxtTotal.Text = Convert.ToString(Tot); BtnSubmit.Focus(); } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
protected void TxtAccno_TextChanged(object sender, EventArgs e) { try { int Result = LI.CheckAccountExist(TxtAccno.Text, TxtPcd.Text, Session["BRCD"].ToString()); if (Result == 0) { WebMsgBox.Show("Sorry Account Number Not Exist...!!", this.Page); TxtAccno.Text = ""; TxtAccName.Text = ""; TxtAccno.Focus(); return; } string AT = ""; AC_Status = CC.GetAccStatus(TxtBrcd.Text, TxtPcd.Text, TxtAccno.Text); if (AC_Status == "1") { AT = BD.Getstage1(TxtAccno.Text, TxtBrcd.Text, TxtPcd.Text); if (AT != null) { if (AT != "1003") { lblMessage.Text = "Sorry Customer not Authorise.........!!"; ModalPopup.Show(this.Page); return; } else { TxtAccName.Text = CC.GetCustNameAc(TxtAccno.Text, TxtBrcd.Text, TxtPcd.Text); ViewState["GLCODE"] = avs5043.getgldr(TxtAccno.Text, TxtPcd.Text, TxtBrcd.Text).Split('_')[0].ToString(); ViewState["CUSTNO"] = avs5043.getgldr(TxtAccno.Text, TxtPcd.Text, TxtBrcd.Text).Split('_')[1].ToString(); BtnSubmit.Focus(); } } } } catch (Exception ex) { ExceptionLogging.SendErrorToText(ex); } }
protected void TxtPeriod_TextChanged(object sender, EventArgs e) { try { string RT = ""; string RR = FDR.Getrate(TxtPeriod.Text, TxtProcode.Text, ddlduration.SelectedValue, ViewState["ACCTYPE"].ToString(), Session["BRCD"].ToString(), Session["EntryDate"].ToString()); if (RR != null) { TxtRate.Text = RR; RT = TxtRate.Text; string PT = ddlduration.SelectedItem.Text; if (PT == "Days" || PT == "DAYS") { PT = "D"; } else if (PT == "Months" || PT == "MONTHS") { PT = "M"; } if (RT != "") { // TxtDepoAmt.Text = TxtTotalAmount.Text; double RATE = Convert.ToDouble(RT); DtDueDate.Text = conn.AddMonthDay(dtDeposDate.Text, TxtPeriod.Text, PT).Replace("12:00:00", ""); CalculatedepositINT(float.Parse(TxtDepoAmt.Text), TxtProcode.Text, float.Parse(RATE.ToString()), Convert.ToInt32(TxtPeriod.Text), ddlIntrestPay.SelectedItem.Text, ddlduration.SelectedValue); } BtnSubmit.Focus(); } else { WebMsgBox.Show("Invalid Period, Add from Interest Master....!", this.Page); TxtPeriod.Text = ""; TxtPeriod.Focus(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
protected void txtactionno_TextChanged(object sender, EventArgs e) { sroname = SRO.GetActionStatus(txtactionno.Text); txtactionname.Text = sroname; BtnSubmit.Focus(); }
protected void Txtbeneemail_TextChanged(object sender, EventArgs e) { BtnSubmit.Focus(); }
private void txtshortnarration_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { string aname = cmbaccountName.Text; string drcr = cmbdrcr.Text; if (drcr == "D") { drcr = "C"; } else { drcr = "D"; } foreach (ListViewItem lstItem in lvserial.Items) { if (lstItem.SubItems[1].Text == aname && lstItem.SubItems[0].Text == drcr) { // DO NOT FILL MessageBox.Show("Same Account Cannot be Debited And Credited in a Single Voucher."); txtshortnarration.Focus(); return; } } if (rowid >= 0) { lvserial.Items[rowid].SubItems[0].Text = cmbdrcr.Text; lvserial.Items[rowid].SubItems[1].Text = cmbaccountName.Text; if (cmbdrcr.Text == "D") { lvserial.Items[rowid].SubItems[2].Text = txtAmount.Text; lvserial.Items[rowid].SubItems[3].Text = "0"; lvserial.Items[rowid].SubItems[4].Text = "DEBIT NOTE"; } else { lvserial.Items[rowid].SubItems[2].Text = "0"; lvserial.Items[rowid].SubItems[3].Text = txtAmount.Text; lvserial.Items[rowid].SubItems[4].Text = "CREDIT NOTE"; } lvserial.Items[rowid].SubItems[5].Text = txtshortnarration.Text; lvserial.Items[rowid].SubItems[6].Text = Convert.ToString(cmbaccountName.SelectedValue); rowid = -1; decimal debit = 0; decimal credit = 0; foreach (ListViewItem lstItem in lvserial.Items) { debit += decimal.Parse(lstItem.SubItems[2].Text); credit += decimal.Parse(lstItem.SubItems[3].Text); } txtdebittotal.Text = Convert.ToString(debit); txtcredittotal.Text = Convert.ToString(credit); if (txtcredittotal.Text == txtdebittotal.Text) { BtnSubmit.Focus(); } else { cmbdrcr.Focus(); } txtAmount.Text = ""; txtshortnarration.Text = ""; } else { //lvserial.Items.Clear(); li = lvserial.Items.Add(cmbdrcr.Text); li.SubItems.Add(cmbaccountName.Text); if (cmbdrcr.Text == "D") { li.SubItems.Add(txtAmount.Text); li.SubItems.Add("0"); li.SubItems.Add("DEBIT NOTE"); } else { li.SubItems.Add("0"); li.SubItems.Add(txtAmount.Text); li.SubItems.Add("CREDIT NOTE"); } li.SubItems.Add(txtshortnarration.Text); li.SubItems.Add(Convert.ToString(cmbaccountName.SelectedValue)); decimal debit = 0; decimal credit = 0; foreach (ListViewItem lstItem in lvserial.Items) { debit += decimal.Parse(lstItem.SubItems[2].Text); credit += decimal.Parse(lstItem.SubItems[3].Text); } txtdebittotal.Text = Convert.ToString(debit); txtcredittotal.Text = Convert.ToString(credit); if (txtcredittotal.Text == txtdebittotal.Text) { BtnSubmit.Focus(); } else { cmbdrcr.Focus(); } txtAmount.Text = ""; txtshortnarration.Text = ""; if (cmbdrcr.Text == "D") { cmbdrcr.Text = "C"; } else { cmbdrcr.Text = "D"; } } } } catch { } }
protected void TxtRecDate_TextChanged(object sender, EventArgs e) { BtnSubmit.Focus(); }
public new void SetFocus() { BtnSubmit.Select(); BtnSubmit.Focus(); }