コード例 #1
0
        protected void btnViewDetails_OnClick(object sender, EventArgs e)
        {
            LinkButton btnViewDetails = (LinkButton)sender;
            Hashtable  hshTranDates;

            try
            {
                int transactionId;

                GridDataItem gvr         = (GridDataItem)btnViewDetails.NamingContainer;
                int          selectedRow = gvr.ItemIndex + 1;
                transactionId = int.Parse(gvEquityTransactions.MasterTableView.DataKeyValues[selectedRow - 1]["TransactionId"].ToString());
                Session["EquityTransactionVo"] = customerTransactionBo.GetEquityTransaction(transactionId, ddl_type.SelectedValue.ToString());


                hshTranDates = new Hashtable();
                hshTranDates.Add("From", txtFromTran.SelectedDate.Value);
                hshTranDates.Add("To", txtToTran.SelectedDate.Value);
                Session["tranDates"] = hshTranDates;
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('ViewEquityTransaction','none');", true);
                Session["EQUITYEditValue"] = "Value";
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "EquityTransactionsView.ascx:gvEquityTransactions_RowCommand()");
                object[] objects = new object[1];
                objects[0]   = index;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }