protected void ddlNature_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlNature.SelectedValue == "-Select-")
            {
                clearInfo();
                ddlNature.SelectedIndex = 0;
                return;
            }

            try
            {
                if (ddlNature.SelectedValue != "-Select-")
                {
                    Int16        code   = Converter.GetSmallInteger(ddlNature.SelectedValue);
                    A2ZNATUREDTO getDTO = (A2ZNATUREDTO.GetInformation(code));
                    if (getDTO.NatureCode > 0)
                    {
                        //txtcode.Text = Converter.GetString(getDTO.DivisionCode);
                        //txtDistcode.Focus();
                        //clearInfo();
                    }
                    else
                    {
                        //ddlDistrict.SelectedIndex = 0;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #2
0
        protected void ddlNature_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ddlNature.SelectedValue == "-Select-")
                {
                    clearInfo();
                    ddlNature.SelectedIndex = 0;
                    return;
                }

                if (ddlNature.SelectedValue != "-Select-")
                {
                    Int16        code   = Converter.GetSmallInteger(ddlNature.SelectedValue);
                    A2ZNATUREDTO getDTO = (A2ZNATUREDTO.GetInformation(code));
                    if (getDTO.NatureCode > 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.ddlNature_SelectedIndexChanged Problem');</script>");
                //throw ex;
            }
        }
Beispiel #3
0
        protected void ddlNature_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlNature.SelectedValue == "-Select-")
            {
                txtcode.Focus();
                txtcode.Text        = string.Empty;
                txtDescription.Text = string.Empty;
                BtnSubmit.Visible   = true;
                BtnUpdate.Visible   = false;
            }

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