protected void Button2_Click(object sender, EventArgs e) { txtFAId.Text = ""; txtFAname.Text = ""; DropDownAgentType.ClearSelection(); txtContactNo.Text = ""; txtPanNo.Text = ""; txtEmailId.Text = ""; txtAddress.Text = ""; txtState.Text = ""; txtCountry.Text = ""; txtFAId.Enabled = true; txtFAname.Enabled = true; DropDownAgentType.Enabled = true; btninsert.Enabled = true; btnupdate.Enabled = false; }
protected void AgencyTextChanged(object sender, EventArgs e) { GrantData j = new GrantData(); Business obj = new Business(); j.FundingAgencyId = null; j = obj.selectExisitingAgency(txtFAId.Text.Trim()); if (j.FundingAgencyId != null) { txtFAId.Text = j.FundingAgencyId; txtFAname.Text = j.FundingAgencyName; DropDownAgentType.SelectedValue = j.AgentType; txtContactNo.Text = j.AgencyContact; txtPanNo.Text = j.Pan_No; txtEmailId.Text = j.EmailId; txtAddress.Text = j.Address; txtState.Text = j.State; txtCountry.Text = j.Country; popupselectNo.Visible = false; btninsert.Enabled = false; btnupdate.Enabled = true; ClientScript.RegisterStartupScript(Page.GetType(), "validation1", "<script language='javascript'>alert(' Agency exixts!')</script>"); txtFAId.Enabled = false; txtFAname.Enabled = false; DropDownAgentType.Enabled = false; } else { //txtFAId.Text = ""; txtFAname.Text = ""; DropDownAgentType.ClearSelection(); txtContactNo.Text = ""; txtPanNo.Text = ""; txtEmailId.Text = ""; txtAddress.Text = ""; txtState.Text = ""; txtCountry.Text = ""; btnupdate.Enabled = false; btninsert.Enabled = true; } }