private void LoadBrokerCode()
        {
            ProductEquityBo productEquityBo = new ProductEquityBo();

            try
            {
                DataTable dt = productEquityBo.GetBrokerCode(portfolioId, ddlTradeAcc.SelectedItem.Text.ToString());
                txtBroker.Text = XMLBo.GetBrokerName(path, dt.Rows[0]["XB_BrokerCode"].ToString());
            }
            catch (BaseApplicationException ex)
            {
                throw ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "ViewEquityTransaction.ascx:LoadBrokerCode()");
                object[] objects = new object[2];
                objects[0]   = portfolioId;
                objects[1]   = path;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
        private void LoadViewField()
        {
            try
            {
                SetViewFields(1);
                if (eqTransactionVo.IsSourceManual == 1)
                {
                    LinkButton1.Visible = true;
                }
                else
                {
                    LinkButton1.Visible = false;
                }
                // LoadExchangeType(path);
                ddlExchange.SelectedValue = eqTransactionVo.Exchange.ToString();

                LoadTransactionType(path);
                if (eqTransactionVo.TransactionCode == 1)
                {
                    ddlTranType.SelectedValue = "PUR";
                }
                else if (eqTransactionVo.TransactionCode == 2)
                {
                    ddlTranType.SelectedValue = "SELL";
                }
                else if (eqTransactionVo.TransactionCode == 13)
                {
                    ddlTranType.SelectedValue = "HOLD";
                }

                LoadEquityTradeNumbers();
                ddlTradeAcc.SelectedValue = eqTransactionVo.AccountId.ToString();

                txtTradeDate.Text = eqTransactionVo.TradeDate.ToShortDateString().ToString();
                if (eqTransactionVo.BrokerCode != "")
                {
                    txtBroker.Text = XMLBo.GetBrokerName(path, eqTransactionVo.BrokerCode);
                }
                txtBrokerage.Text        = eqTransactionVo.Brokerage.ToString();
                txtNumShares.Text        = eqTransactionVo.Quantity.ToString();
                txtOtherCharge.Text      = eqTransactionVo.OtherCharges.ToString();
                txtRate.Text             = eqTransactionVo.Rate.ToString();
                txtRateIncBrokerage.Text = eqTransactionVo.RateInclBrokerage.ToString();
                txtScrip.Text            = productEqutiyBo.GetScripName(eqTransactionVo.ScripCode);
                txtSTT.Text   = eqTransactionVo.STT.ToString();
                txtTax.Text   = eqTransactionVo.ServiceTax.ToString();
                txtTotal.Text = eqTransactionVo.TradeTotal.ToString();

                DataSet ds = productEqutiyBo.GetScripCode(txtScrip.Text.ToString());
                txtTicker.Text = ds.Tables[0].Rows[0]["PEM_Ticker"].ToString();
            }
            catch (BaseApplicationException ex)
            {
                throw ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "ViewEquityTransaction.ascx:LoadViewField()");
                object[] objects = new object[1];
                objects[0]   = eqTransactionVo;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }