protected void ddlSupplier_SelectedIndexChanged(object sender, EventArgs e) { try { lblLedgerBalance.Visible = true; txtPayableAmt.Visible = true; lblVatBalance.Visible = true; txtPayableVATAmt.Visible = true; lblTaxBalance.Visible = true; txtPayableTAXAmt.Visible = true; int Code = Converter.GetInteger(ddlSupplier.SelectedValue); A2ZSUPPLIERDTO getDTO = (A2ZSUPPLIERDTO.GetInformation(Code)); if (getDTO.SuppCode > 0) { txtSupplier.Text = Converter.GetString(getDTO.SuppCode); txtPayableAmt.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.SuppBalance)); txtPayableVATAmt.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.SuppVATAmt)); txtPayableTAXAmt.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.SuppTAXAmt)); } } catch (Exception Ex) { throw Ex; } }
protected void txtSupplierCode_TextChanged(object sender, EventArgs e) { if (txtSupplierCode.Text != string.Empty) { int MainCode = Converter.GetInteger(txtSupplierCode.Text); A2ZSUPPLIERDTO getDTO = (A2ZSUPPLIERDTO.GetInformation(MainCode)); if (getDTO.SuppCode > 0) { ddlSupplierName.SelectedValue = Converter.GetString(getDTO.SuppCode); lblAddressl1.Text = Converter.GetString(getDTO.SuppAddL1); lblAddressl2.Text = Converter.GetString(getDTO.SuppAddL2); lblAddressl3.Text = Converter.GetString(getDTO.SuppAddL3); lblMobile.Text = Converter.GetString(getDTO.SuppMobile); } else { ddlSupplierName.SelectedIndex = 0; txtSupplierCode.Text = string.Empty; txtSupplierCode.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Invalid Supplier Code');", true); return; } } }
protected void txtSupplier_TextChanged(object sender, EventArgs e) { int SuppCode = Converter.GetInteger(txtSupplier.Text); A2ZSUPPLIERDTO getDTO = (A2ZSUPPLIERDTO.GetInformation(SuppCode)); if (getDTO.SuppCode > 0) { ddlSupplier.SelectedValue = txtSupplier.Text; } }
protected void ddlSupplier_SelectedIndexChanged(object sender, EventArgs e) { if (ddlSupplier.SelectedValue == "-Select-") { clearInfo(); ddlSupplier.Focus(); BtnUpdate.Visible = false; BtnSubmit.Visible = true; } try { if (ddlSupplier.SelectedValue != "-Select-") { int code = Converter.GetInteger(ddlSupplier.SelectedValue); A2ZSUPPLIERDTO getDTO = (A2ZSUPPLIERDTO.GetInformation(code)); if (getDTO.SuppCode > 0) { hdnSuppCode.Text = Converter.GetString(getDTO.SuppCode); txtDescription.Focus(); txtDescription.Text = Converter.GetString(getDTO.SuppName); txtAddLine1.Text = Converter.GetString(getDTO.SuppAddL1); txtAddLine2.Text = Converter.GetString(getDTO.SuppAddL2); txtAddLine3.Text = Converter.GetString(getDTO.SuppAddL3); txtSuppEmail.Text = Converter.GetString(getDTO.SuppEmail); txtSuppFax.Text = Converter.GetString(getDTO.SuppFax); txtSuppMobileNo.Text = Converter.GetString(getDTO.SuppMobile); txtSuppTelephone.Text = Converter.GetString(getDTO.SuppTel); BtnSubmit.Visible = false; BtnUpdate.Visible = true; } } } catch (Exception ex) { throw ex; } }