예제 #1
0
        private void ExecuteCommands()
        {
            try
            {
                for (int i = 0; i < Request.Form.Count; i++)
                {
                    string key = Request.Form.Keys[i];
                    string val = Request.Form[i];

                    if (key.StartsWith(_tabView.UniqueID + ":"))                    // TABVIEW
                    {
                        int    index  = key.LastIndexOf(":") + 1;
                        string tabCmd = key.Substring(index, key.Length - index);

                        _contr.Transfer(tabCmd);
                        break;
                    }
                    else if (key == _graphControl.UniqueID + ":btnPivot")
                    {
                        _contr.Pivot();
                        break;
                    }
                    else if (key == _graphControl.UniqueID + ":btnUpdate")
                    {
                        Size size = _graphControl.GraphSize;
                        _contr.SetGraph(_graphControl.GraphType, _graphControl.GraphTheme,
                                        (short)size.Width, (short)size.Height, _graphControl.GraphPieColumns, _graphControl.GraphMixedLinePos,
                                        _graphControl.ShowValues, _graphControl.ShowSeries, _graphControl.ShowCat,
                                        _graphControl.SetScalingBySeries, _graphControl.SetPivot, _graphControl.SetPercentByCategories);
                        break;
                    }
                    else if (key.StartsWith(this._sliceControl.UniqueID + ":slc_del:"))
                    {
                        int    hierIndex = key.LastIndexOf(":") + 1;
                        string hierUn    = key.Substring(hierIndex, key.Length - hierIndex);

                        _contr.SetDefaultMember(hierUn);

                        break;
                    }
                }
            }
            catch (Exception exc)
            {
                this.ShowException(exc);
            }


            // save state
            _report.SaveState();
        }
예제 #2
0
        private void ExecuteCommands()
        {
            try
            {
                for (int i = 0; i < Request.Form.Count; i++)
                {
                    string key = Request.Form.Keys[i];
                    string val = Request.Form[i];

                    if (key.StartsWith(_tabView.UniqueID + ":"))                    // TABVIEW
                    {
                        int    index  = key.LastIndexOf(":") + 1;
                        string tabCmd = key.Substring(index, key.Length - index);

                        _contr.Transfer(tabCmd);
                        break;
                    }
                    else if (key == _graphControl.UniqueID + ":btnPivot")
                    {
                        _contr.Pivot();
                        break;
                    }
                    else if (key == _graphControl.UniqueID + ":btnUpdate")
                    {
                        OnUpdateClick();
                        break;
                    }
                    else if (key.StartsWith(this._sliceControl.UniqueID + ":slc_del:"))
                    {
                        int    hierIndex = key.LastIndexOf(":") + 1;
                        string hierUn    = key.Substring(hierIndex, key.Length - hierIndex);

                        _contr.SetDefaultMember(hierUn);

                        break;
                    }
                }
            }
            catch (Exception exc)
            {
                this.ShowException(exc);
            }


            // save state
            _report.SaveState();
        }
예제 #3
0
        private void ExecuteCommands()
        {
            try
            {
                for (int i = 0; i < Request.Form.Count; i++)
                {
                    string key = Request.Form.Keys[i];
                    string val = Request.Form[i];

                    if (key.StartsWith(_tabView.UniqueID + ":"))                    // TABVIEW
                    {
                        int    index  = key.LastIndexOf(":") + 1;
                        string tabCmd = key.Substring(index, key.Length - index);

                        _contr.Transfer(tabCmd);
                        break;
                    }
                    else if (key == _tableControl.UniqueID + ":btnPivot")
                    {
                        _contr.Pivot();
                        break;
                    }
                    else if (key == _tableControl.UniqueID + ":btnSort")
                    {
                        _contr.SetSort(GetSelectedMemberIdentifiers());
                        break;
                    }
                    else if (key == _tableControl.UniqueID + ":btnDrillDown")
                    {
                        _contr.DrillDown(GetSelectedMemberIdentifiers());
                        break;
                    }
                    else if (key == _tableControl.UniqueID + ":btnDrillUp")
                    {
                        _contr.DrillUp(GetSelectedMemberIdentifiers());
                        break;
                    }
                    else if (key == _tableControl.UniqueID + ":btnRemove")
                    {
                        _contr.Remove(GetSelectedMemberIdentifiers());
                        break;
                    }
                    else if (key.StartsWith(_tableControl.UniqueID + ":tbl_avg:"))
                    {
                        int    hierIndex = key.LastIndexOf(":") + 1;
                        string hierUn    = key.Substring(hierIndex, key.Length - hierIndex);

                        if (key.Substring(hierIndex - 4, 3) == "off")
                        {
                            _contr.RemoveVisualAggr(hierUn, "AVG");
                        }
                        else
                        {
                            _contr.AddVisualAggr(hierUn, "AVG");
                        }

                        break;
                    }
                    else if (key.StartsWith(_tableControl.UniqueID + ":tbl_sum:"))
                    {
                        int    hierIndex = key.LastIndexOf(":") + 1;
                        string hierUn    = key.Substring(hierIndex, key.Length - hierIndex);

                        if (key.Substring(hierIndex - 4, 3) == "off")
                        {
                            _contr.RemoveVisualAggr(hierUn, "SUM");
                        }
                        else
                        {
                            _contr.AddVisualAggr(hierUn, "SUM");
                        }

                        break;
                    }
                    else if (key.StartsWith(_tableControl.UniqueID + ":tbl_min:"))
                    {
                        int    hierIndex = key.LastIndexOf(":") + 1;
                        string hierUn    = key.Substring(hierIndex, key.Length - hierIndex);

                        if (key.Substring(hierIndex - 4, 3) == "off")
                        {
                            _contr.RemoveVisualAggr(hierUn, "MIN");
                        }
                        else
                        {
                            _contr.AddVisualAggr(hierUn, "MIN");
                        }

                        break;
                    }
                    else if (key.StartsWith(_tableControl.UniqueID + ":tbl_max:"))
                    {
                        int    hierIndex = key.LastIndexOf(":") + 1;
                        string hierUn    = key.Substring(hierIndex, key.Length - hierIndex);

                        if (key.Substring(hierIndex - 4, 3) == "off")
                        {
                            _contr.RemoveVisualAggr(hierUn, "MAX");
                        }
                        else
                        {
                            _contr.AddVisualAggr(hierUn, "MAX");
                        }

                        break;
                    }
                    else if (key.StartsWith(this._sliceControl.UniqueID + ":slc_del:"))
                    {
                        int    hierIndex = key.LastIndexOf(":") + 1;
                        string hierUn    = key.Substring(hierIndex, key.Length - hierIndex);

                        _contr.SetDefaultMember(hierUn);

                        break;
                    }
                }
            }
            catch (Exception exc)
            {
                this.ShowException(exc);
            }


            // save state
            _report.SaveState();
        }
예제 #4
0
        private void ExecuteCommands()
        {
            for (int i = 0; i < Request.Form.Count; i++)
            {
                string key = Request.Form.Keys[i];
                string val = Request.Form[i];

                if (key.StartsWith(_tabView.UniqueID + ":"))                // TABVIEW
                {
                    int    index  = key.LastIndexOf(":") + 1;
                    string tabCmd = key.Substring(index, key.Length - index);

                    _contr.Transfer(tabCmd);
                    break;
                }
                else if (key == _selControl.UniqueID + ":btnPivot")
                {
                    try
                    {
                        _contr.Pivot();
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    break;
                }
                else if (key == _selControl.UniqueID + ":btnUpdate")
                {
                    this.UpdateSelectedMembers();

                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_fopen:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string folderName = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.OpenFolder(folderName);
                        _report.SaveHeader();                         // save open nodes
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key.Replace("sel_fopen", "sel_fclose");                    //it will hage it's id
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_fclose:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string folderName = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.CloseFolder(folderName);
                        _report.SaveHeader();                         // save open nodes
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key.Replace("sel_fclose", "sel_fopen");                    //it will hage it's id
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_del:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string hierUn = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.HierarchyToAxis(hierUn, 2);
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key.Replace("sel_del", "sel_torow");                    //it will hage it's id , it's in filter now
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_torow:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string hierUn = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.HierarchyToAxis(hierUn, 1);
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key.Replace("sel_torow", "sel_del");                    //it will hage it's id
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_tocol:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string hierUn = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.HierarchyToAxis(hierUn, 0);
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key.Replace("sel_tocol", "sel_del");                    //it will hage it's id
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_up:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string hierUn = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.HierarchyUp(hierUn);
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key;
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_down:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string hierUn = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.HierarchyDown(hierUn);
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key;
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_hopen:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string hierUn = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.OpenHierarchy(hierUn);
                        _report.SaveHeader();                         // save open nodes
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key.Replace("sel_hopen", "sel_hclose");                    //it will hage it's id
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_hclose:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string hierUn = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.CloseHierarchy(hierUn);
                        _report.SaveHeader();                         // save open nodes
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key.Replace("sel_hclose", "sel_hopen");                    //it will hage it's id
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_hselall:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string hierUn = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.AddHierarchyChildren(hierUn);
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key;
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_hdeselall:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string hierUn = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.RemoveHierarchyChildren(hierUn);
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key;
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_aggr_on:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string hierUn = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.SetHierarchyAggregate(hierUn, true);
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key.Replace("sel_aggr_on", "sel_aggr_off");                    //it will hage it's id
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_aggr_off:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string hierUn = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.SetHierarchyAggregate(hierUn, false);
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key.Replace("sel_aggr_off", "sel_aggr_on");                    //it will hage it's id
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_open:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string identifier = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.OpenMember(identifier);
                        _report.SaveHeader();                         // save open nodes
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key.Replace("sel_open", "sel_close");                    //it will hage it's id
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_close:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string identifier = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.CloseMember(identifier);
                        _report.SaveHeader();                         // save open nodes
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key.Replace("sel_close", "sel_open");                    //it will hage it's id
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_selauto:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string identifier = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.AddMemberChildren(identifier, true);
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key;
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_selall:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string identifier = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.AddMemberChildren(identifier, false);
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key;
                    break;
                }
                else if (key.StartsWith(_selControl.UniqueID + ":sel_deselall:"))
                {
                    int index = key.IndexOf(":");
                    index = key.IndexOf(":", index + 1) + 1;
                    string identifier = key.Substring(index, key.Length - index);

                    try
                    {
                        _contr.RemoveMemberChildren(identifier);
                    }
                    catch (Exception exc)
                    {
                        this.ShowException(exc);
                    }

                    _pageScrollId = key;
                    break;
                }
                else if (key.StartsWith(this._sliceControl.UniqueID + ":slc_del:"))
                {
                    int    hierIndex = key.LastIndexOf(":") + 1;
                    string hierUn    = key.Substring(hierIndex, key.Length - hierIndex);

                    _contr.SetDefaultMember(hierUn);

                    break;
                }
            }

            // save state

            _report.SaveState();
        }