Beispiel #1
0
        protected void ddlOccupation_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ddlOccupation.SelectedValue == "-Select-")
                {
                    clearInfo();
                    ddlOccupation.SelectedIndex = 0;
                    return;
                }


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

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

            try
            {
                if (ddlProfession.SelectedValue != "-Select-")
                {
                    Int16            MainCode = Converter.GetSmallInteger(ddlProfession.SelectedValue);
                    A2ZPROFESSIONDTO getDTO   = (A2ZPROFESSIONDTO.GetInformation(MainCode));
                    if (getDTO.ProfessionCode > 0)
                    {
                        txtcode.Text        = Converter.GetString(getDTO.ProfessionCode);
                        txtDescription.Text = Converter.GetString(getDTO.ProfessionDescription);
                        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;
            }
        }