示例#1
0
        public void OnEventHandler(CommandSelectedAggregatedEvent e)
        {
            if (e.CommandId == BudgetConst.COMMAND_IMPORT)
            {
                ProceedImport();
            }

            if (e.CommandId == BudgetConst.COMMAND_INSERT)
            {
                ProceedInsert();
            }

            if (e.CommandId == BudgetConst.COMMAND_RULES)
            {
                ProceedAttachRules();
            }

            if (e.CommandId == BudgetConst.COMMAND_INSERT_PIVOT)
            {
                ProcedInsertPivot();
            }

            if (e.CommandId == BudgetConst.COMMAND_EDIT_RULES)
            {
                ProceedEditRules();
            }

            if (e.CommandId == BudgetConst.COMMAND_IMPORT_EXCEL)
            {
                ProceedImportExcel();
            }

            if (e.CommandId == BudgetConst.COMMAND_UPDATE_EXCEL)
            {
                ProceedUpdateExcel();
            }

            if (e.CommandId == BudgetConst.COMMAND_LOAD_RULES)
            {
                ProcedLoadRules();
            }

            if (e.CommandId == BudgetConst.COMMAND_SAVE_RULES)
            {
                ProceedSaveRules();
            }

            if (e.CommandId == BudgetConst.COMMAND_LOAD)
            {
                ProceedLoadReports();
            }

            if (e.CommandId == BudgetConst.COMMAND_SAVE)
            {
                ProceedSaveReports();
            }

            if (e.CommandId == BudgetConst.COMMAND_SORT)
            {
                ProceedSort();
            }

            if (e.CommandId == BudgetConst.COMMAND_CLEAR_ITEM)
            {
                ProceedClearItem();
            }

            if (e.CommandId == BudgetConst.EXCEL_SHOW_ALL_DATA)
            {
                _IExcel.ClearFilters();
                return;
            }

            if (e.CommandId == BudgetConst.EXCEL_ATTACH_FILTER)
            {
                ExcelTransactionHitInfo hitInfo = _IExcel.GetTransactionHitInfo();
                _IExcel.SetFilter("xxx", hitInfo.Transaction.Category);
                return;
            }
        }