コード例 #1
0
        private void FilldropDownPaymentOption()
        {
            BAPaymentOption _bapmntopt  = new BALayer.BAPaymentOption();
            DataTable       _datatable1 = new DataTable();

            _datatable1 = _bapmntopt.SelectPaymentOptionList("GETMerchantOption");
            if (_datatable1.Rows.Count > 0)
            {
                drpPaymentOption.DataTextField  = "PaymentOption";
                drpPaymentOption.DataValueField = "PaymentOptionId";
                drpPaymentOption.DataSource     = _datatable1;
                drpPaymentOption.DataBind();
                if (drpPaymentOption.SelectedItem.Text.Equals("Paypal"))
                {
                    pnlPaypal.Visible       = true;
                    pnlWireTransfer.Visible = false;
                }
                else if (drpPaymentOption.SelectedItem.Text.Equals("Wire Transfer"))
                {
                    pnlWireTransfer.Visible = true;
                    pnlPaypal.Visible       = false;
                }
            }
        }