Exemplo n.º 1
0
        void cffGGV_TransactionGridView_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
        {
            int rowIndex = Convert.ToInt32(e.CommandArgument);

            if (e.CommandName == "Expand" && ((((System.Web.UI.WebControls.GridView)(sender)).Rows).Count > 0))
            {   //assign a datasource to the child and call databind
                bool isExpanded = false;
                if ((((System.Web.UI.WebControls.GridView)(sender)).Rows[rowIndex]).Controls.Count > 0)
                {
                    isExpanded = ((Cff.SaferTrader.Web.UserControls.gGridViewControls.CffCommandField)((((System.Web.UI.WebControls.DataControlFieldCell)((((System.Web.UI.WebControls.GridView)(sender)).Rows[rowIndex]).Controls[0]))).ContainingField)).isExpanded;
                }

                HistoricalTransaction o = (HistoricalTransaction)(((IList <HistoricalTransaction>)cffGGV_TransactionGridView.DataSource)[rowIndex]);
                Date date = new Date(Convert.ToDateTime(o.YrMonth));

                if (SessionWrapper.Instance.Get != null && this.CurrentScope() == Scope.CustomerScope)
                {  //customer view
                    IList <Transaction> details = presenter.LoadTransactionHistoryDetails(date, SessionWrapper.Instance.Get.CustomerFromQueryString.Id);
                    cffGGV_TransactionGridView.BindNestedGrid(sender, details);
                }
            }
        }