protected void ddlDivision_SelectedIndexChanged(object sender, EventArgs e) { DistrictDropdown(); try { if (ddlDivision.SelectedValue != "-Select-") { int code = Converter.GetInteger(ddlDivision.SelectedValue); A2ZDIVISIONDTO getDTO = (A2ZDIVISIONDTO.GetInformation(code)); if (getDTO.DivisionCode > 0) { txtDivicode.Text = Converter.GetString(getDTO.DivisionCode); hdnDiviCode.Text = Converter.GetString(getDTO.DivisionCode); hdnDiviOrgCode.Text = Converter.GetString(getDTO.DivisionOrgCode); ddlDistrict.SelectedIndex = 0; txtDistDescription.Focus(); clearInfo(); } else { // ddlDivision.SelectedValue = "-Select-"; ddlDistrict.SelectedIndex = 0; } } } catch (Exception ex) { throw ex; } }
protected void ddlDivision_SelectedIndexChanged(object sender, EventArgs e) { if (ddlDivision.SelectedValue == "-Select-") { clearInfo(); ddlDistrict.SelectedIndex = 0; return; } DistrictDropdown(); try { if (ddlDivision.SelectedValue != "-Select-") { int code = Converter.GetInteger(ddlDivision.SelectedValue); A2ZDIVISIONDTO getDTO = (A2ZDIVISIONDTO.GetInformation(code)); if (getDTO.DivisionCode > 0) { } else { ddlDistrict.SelectedIndex = 0; } } } catch (Exception ex) { throw ex; } }
protected void ddlDivision_SelectedIndexChanged(object sender, EventArgs e) { try { if (ddlDivision.SelectedValue != "-Select-") { int code = Converter.GetInteger(ddlDivision.SelectedValue); A2ZDIVISIONDTO getDTO = (A2ZDIVISIONDTO.GetInformation(code)); if (getDTO.DivisionCode > 0) { //txtcode.Text = Converter.GetString(getDTO.DivisionCode); //txtDistcode.Focus(); //clearInfo(); } ddlDistrict.SelectedIndex = 0; ddlUpzila.SelectedIndex = 0; ddlThana.SelectedIndex = 0; DistrictDropdown(); UpzilaDropdown(); ThanaDropdown(); } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.ddlDivision_SelectedIndexChanged Problem');</script>"); //throw ex; } }
protected void ddlDivision_SelectedIndexChanged(object sender, EventArgs e) { if (ddlDivision.SelectedValue == "-Select-") { clearInfo(); ddlDivision.Focus(); } try { if (ddlDivision.SelectedValue != "-Select-") { int code = Converter.GetInteger(ddlDivision.SelectedValue); A2ZDIVISIONDTO getDTO = (A2ZDIVISIONDTO.GetInformation(code)); if (getDTO.DivisionCode > 0) { hdnDiviCode.Text = Converter.GetString(getDTO.DivisionCode); hdnDiviOrgCode.Text = Converter.GetString(getDTO.DivisionOrgCode); txtDescription.Text = Converter.GetString(getDTO.DivisionDescription); txtDescription.Focus(); BtnSubmit.Visible = false; BtnUpdate.Visible = true; } } } catch (Exception ex) { throw ex; } }
protected void txtcode_TextChanged(object sender, EventArgs e) { try { if (txtDivicode.Text != string.Empty) { int code = Converter.GetInteger(txtDivicode.Text); A2ZDIVISIONDTO getDTO = (A2ZDIVISIONDTO.GetInformation(code)); if (getDTO.DivisionCode > 0) { ddlDivision.SelectedValue = Converter.GetString(getDTO.DivisionCode); hdnDiviCode.Text = Converter.GetString(getDTO.DivisionCode); hdnDiviOrgCode.Text = Converter.GetString(getDTO.DivisionOrgCode); clearInfo(); DistrictDropdown(); ddlDistrict.SelectedValue = "-Select-"; txtDistDescription.Focus(); } else { //String csname1 = "PopupScript"; //Type cstype = GetType(); //ClientScriptManager cs = Page.ClientScript; //if (!cs.IsStartupScriptRegistered(cstype, csname1)) //{ // String cstext1 = "alert('Invalid Division Code');"; // cs.RegisterStartupScript(cstype, csname1, cstext1, true); //} txtDivicode.Text = string.Empty; txtDivicode.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Invalid Division Code');", true); return; } } } catch (Exception ex) { throw ex; } }