Example #1
0
        protected void ddlTranCode_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ddlTranCode.SelectedValue != "-Select-")
                {
                    int           MainCode = Converter.GetInteger(ddlTranCode.SelectedValue);
                    A2ZTRNCODEDTO getDTO   = (A2ZTRNCODEDTO.GetInformation(MainCode));
                    if (getDTO.TrnCode > 0)
                    {
                        lblAccType.Text     = Converter.GetString(getDTO.AccType);
                        lblAccTypeMode.Text = Converter.GetString(getDTO.AccTypeMode);
                        txtTrncode.Text     = Converter.GetString(getDTO.TrnCode);

                        Int16         AccType = Converter.GetSmallInteger(lblAccType.Text);
                        A2ZACCTYPEDTO get1DTO = (A2ZACCTYPEDTO.GetInformation(AccType));
                        if (get1DTO.AccTypeCode > 0)
                        {
                            lblClass.Text = Converter.GetString(get1DTO.AccTypeClass);
                            PayTypedropdown();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void ddlTranCode_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlTranCode.SelectedValue == "-Select-")
            {
                txtcode.Focus();
                txtcode.Text        = string.Empty;
                txtDescription.Text = string.Empty;
                BtnSubmit.Visible   = true;
                BtnUpdate.Visible   = false;
            }

            try
            {
                if (ddlTranCode.SelectedValue != "-Select-")
                {
                    int           MainCode = Converter.GetInteger(ddlTranCode.SelectedValue);
                    A2ZTRNCODEDTO getDTO   = (A2ZTRNCODEDTO.GetInformation(MainCode));
                    if (getDTO.TrnCode > 0)
                    {
                        txtcode.Text        = Converter.GetString(getDTO.TrnCode);
                        txtDescription.Text = Converter.GetString(getDTO.TrnDescription);
                        txtAccType.Text     = Converter.GetString(getDTO.AccType);
                        lblAccTypeMode.Text = Converter.GetString(getDTO.AccTypeMode);

                        if (txtAccType.Text == "99")
                        {
                            lblPayType.Visible = true;
                            txtPaytype.Visible = true;
                            ddlpaytype.Visible = true;
                            txtPaytype.Text    = Converter.GetString(getDTO.PayType);
                            if (txtPaytype.Text != "0")
                            {
                                ddlpaytype.SelectedValue = Converter.GetString(getDTO.PayType);
                            }
                        }



                        BtnSubmit.Visible = false;
                        BtnUpdate.Visible = true;
                        txtDescription.Focus();
                    }
                    else
                    {
                        txtcode.Focus();
                        txtcode.Text        = string.Empty;
                        txtDescription.Text = string.Empty;
                        txtAccType.Text     = string.Empty;
                        BtnSubmit.Visible   = true;
                        BtnUpdate.Visible   = false;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }