コード例 #1
0
        protected void txtCarrExchPartyCode_TextChanged(object sender, EventArgs e)
        {
            if (txtCarrExchPartyCode.Text != string.Empty)
            {
                int PartyCode = Converter.GetInteger(txtCarrExchPartyCode.Text);
                A2ZCARREXCHPARTYDTO getDTO = (A2ZCARREXCHPARTYDTO.GetCarrExchPartyByPartyCode(PartyCode));

                if (getDTO.CPartyName == null)
                {
                    ddlPartyName.SelectedIndex = 0;
                    txtPartyAddressL1.Text     = string.Empty;
                    txtPartyAddressL2.Text     = string.Empty;
                    txtPartyAddressL3.Text     = string.Empty;
                    txtMobileNo.Text           = string.Empty;
                    txtPartyEmail.Text         = string.Empty;


                    txtCarrExchPartyCode.Text = string.Empty;
                    txtCarrExchPartyCode.Focus();
                }

                else
                {
                    ddlPartyName.SelectedValue = Converter.GetString(getDTO.CPartyCode);
                    txtPartyAddressL1.Text     = Converter.GetString(getDTO.CPartyAddresssLine1);
                    txtPartyAddressL2.Text     = Converter.GetString(getDTO.CPartyAddresssLine2);
                    txtPartyAddressL3.Text     = Converter.GetString(getDTO.CPartyAddresssLine3);
                    txtMobileNo.Text           = Converter.GetString(getDTO.CPartyMobileNo);
                    txtPartyEmail.Text         = Converter.GetString(getDTO.CPartyEmail);
                    txtPartyName.Text          = Converter.GetString(getDTO.CPartyName);
                }
            }
        }
コード例 #2
0
        protected void ddlPartyName_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlPartyName.SelectedIndex != 0)
            {
                int PartyCode = Converter.GetInteger(ddlPartyName.SelectedValue);
                A2ZCARREXCHPARTYDTO getDTO = (A2ZCARREXCHPARTYDTO.GetCarrExchPartyByPartyCode(PartyCode));

                if (getDTO.CPartyName != string.Empty)
                {
                    txtCarrExchPartyCode.Text = Converter.GetString(getDTO.CPartyCode);
                    txtPartyAddressL1.Text    = Converter.GetString(getDTO.CPartyAddresssLine1);
                    txtPartyAddressL2.Text    = Converter.GetString(getDTO.CPartyAddresssLine2);
                    txtPartyAddressL3.Text    = Converter.GetString(getDTO.CPartyAddresssLine3);
                    txtMobileNo.Text          = Converter.GetString(getDTO.CPartyMobileNo);
                    txtPartyEmail.Text        = Converter.GetString(getDTO.CPartyEmail);
                    txtPartyName.Text         = Converter.GetString(getDTO.CPartyName);
                }
            }
        }