Ejemplo n.º 1
0
        protected void ddlNationality_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ddlNationality.SelectedValue == "-Select-")
                {
                    clearInfo();
                    ddlNationality.SelectedIndex = 0;
                    return;
                }


                if (ddlNationality.SelectedValue != "-Select-")
                {
                    Int16             code   = Converter.GetSmallInteger(ddlNationality.SelectedValue);
                    A2ZNATIONALITYDTO getDTO = (A2ZNATIONALITYDTO.GetInformation(code));
                    if (getDTO.NationalityCode > 0)
                    {
                        //txtcode.Text = Converter.GetString(getDTO.DivisionCode);
                        //txtDistcode.Focus();
                        //clearInfo();
                    }
                    else
                    {
                        //ddlDistrict.SelectedIndex = 0;
                    }
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.ddlNationality_SelectedIndexChanged Problem');</script>");
                //throw ex;
            }
        }
Ejemplo n.º 2
0
        protected void ddlNationality_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlNationality.SelectedValue == "-Select-")
            {
                clearInfo();
                ddlNationality.SelectedIndex = 0;
                return;
            }

            try
            {
                if (ddlNationality.SelectedValue != "-Select-")
                {
                    Int16             code   = Converter.GetSmallInteger(ddlNationality.SelectedValue);
                    A2ZNATIONALITYDTO getDTO = (A2ZNATIONALITYDTO.GetInformation(code));
                    if (getDTO.NationalityCode > 0)
                    {
                        //txtcode.Text = Converter.GetString(getDTO.DivisionCode);
                        //txtDistcode.Focus();
                        //clearInfo();
                    }
                    else
                    {
                        //ddlDistrict.SelectedIndex = 0;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void ddlNationality_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlNationality.SelectedValue == "-Select-")
            {
                txtcode.Focus();
                txtcode.Text        = string.Empty;
                txtDescription.Text = string.Empty;
                BtnSubmit.Visible   = true;
                BtnUpdate.Visible   = false;
            }

            try
            {
                if (ddlNationality.SelectedValue != "-Select-")
                {
                    Int16             MainCode = Converter.GetSmallInteger(ddlNationality.SelectedValue);
                    A2ZNATIONALITYDTO getDTO   = (A2ZNATIONALITYDTO.GetInformation(MainCode));
                    if (getDTO.NationalityCode > 0)
                    {
                        txtcode.Text        = Converter.GetString(getDTO.NationalityCode);
                        txtDescription.Text = Converter.GetString(getDTO.NationalityDescription);
                        BtnSubmit.Visible   = false;
                        BtnUpdate.Visible   = true;
                        txtDescription.Focus();
                    }
                    else
                    {
                        txtcode.Focus();
                        txtcode.Text        = string.Empty;
                        txtDescription.Text = string.Empty;
                        BtnSubmit.Visible   = true;
                        BtnUpdate.Visible   = false;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }