internal override void ToCube(Controls.Cube.RadarCube cube)
        {
            base.ToCube(cube);
            var c = (MOlapCube)cube;

            c.rcs = rcs;
            rcs   = null;

            c.ConnectionString = ConnectionString;
            c.CubeName         = CubeName;
        }
        internal override void FromCube(Controls.Cube.RadarCube cube)
        {
            base.FromCube(cube);
            var c = (MOlapCube)cube;

            rcs   = c.rcs;
            c.rcs = null;

            ConnectionString = c.ConnectionString;
            CubeName         = c.CubeName;
        }
示例#3
0
        internal void RestoreAfterSerialization(OlapControl grid)
        {
            var old = grid.Engine;

            FGrid = grid;
            FCube = grid.Cube;

            FCube.FEngineList.Remove(old);
            FCube.FEngineList.Add(this);
            if (FCube.fCallbackException != null)
            {
                FGrid.callbackException = FCube.fCallbackException;
            }

            FGrid.FEngine = this;
            foreach (var m in FMetaLines.Values)
            {
                m.FGrid = grid;
            }
        }
示例#4
0
        internal virtual void ToCube(Controls.Cube.RadarCube cube)
        {
            cube.frcDimensions    = Dimensions;
            Dimensions            = null;
            cube.Dimensions.FCube = cube;
            foreach (var d in cube.Dimensions)
            {
                d.FCube = cube;
            }

            cube.frcMeasures    = Measures;
            Measures            = null;
            cube.Measures.FCube = cube;
            foreach (var m in cube.Measures)
            {
                m.FCube = cube;
            }

            cube.FActive     = Active;
            cube.FLevelsList = LevelsList;
            LevelsList       = null;
        }
示例#5
0
        internal virtual void FromCube(Controls.Cube.RadarCube cube)
        {
            Dimensions         = cube.Dimensions;
            cube.frcDimensions = null;
            Dimensions.FCube   = null;
            foreach (var d in Dimensions)
            {
                d.FCube = null;
            }

            Measures         = cube.Measures;
            cube.frcMeasures = null;
            Measures.FCube   = null;
            foreach (var m in Measures)
            {
                m.FCube = null;
            }

            Active           = cube.FActive;
            LevelsList       = cube.FLevelsList;
            cube.FLevelsList = null;
            cube.FEngineList = null;
        }
示例#6
0
 internal Engine(Controls.Cube.RadarCube ACube, OlapControl AGrid)
     : this()
 {
     FCube = ACube;
     FGrid = AGrid;
 }
 internal MdEngine(Controls.Cube.RadarCube ACube, OlapControl AGrid)
     : base(ACube, AGrid)
 {
 }
示例#8
0
        internal static JsonDialog RenderException(Controls.Cube.RadarCube Cube, OlapControl Grid, Exception E)
        {
            var result = new JsonDialog();

            result.title = RadarUtils.GetResStr("rsException");

            var writer = new HtmlTextWriter();

            writer.AddAttribute(HtmlTextWriterAttribute.Width, "500");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            writer.RenderBeginTag(HtmlTextWriterTag.P);
            writer.Write(string.Format(RadarUtils.GetResStr("rsExceptionRaised"), E.GetType().FullName));
            writer.RenderEndTag(); //p
            writer.RenderBeginTag(HtmlTextWriterTag.P);
            writer.RenderBeginTag(HtmlTextWriterTag.B);
            writer.Write(string.Format(RadarUtils.GetResStr("rsErrorMessage"), E.GetType().FullName));
            writer.RenderEndTag(); //b
            writer.RenderEndTag(); //p

            writer.AddStyleAttribute(HtmlTextWriterStyle.Width, "490px");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Margin, "5px");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Overflow, "auto");
            writer.AddStyleAttribute("border", "2px inset #C0C0C0;");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Color, "#404040;");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Height, "90px");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            writer.Write(E.Message.Replace("\n", "<br />"));
            writer.RenderEndTag(); //div

            writer.RenderBeginTag(HtmlTextWriterTag.P);
            writer.Write(string.Format(RadarUtils.GetResStr("rsAdditionalInfo"), E.GetType().FullName));
            writer.RenderEndTag(); //p


            writer.AddStyleAttribute(HtmlTextWriterStyle.Width, "490px");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Margin, "5px");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Overflow, "auto");
            writer.AddStyleAttribute("border", "2px inset #C0C0C0;");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Color, "#404040;");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Height, "350px");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            if (E.StackTrace != null)
            {
                writer.Write("----- The stack trace -----<br />");
                writer.Write(WebUtility.HtmlEncode(E.StackTrace).Replace("\r\n", "<br />"));
            }

            if (Grid.callbackExceptionData != null)
            {
                writer.Write("<br />----- The additional information -----<br />");
                foreach (var item in Grid.callbackExceptionData)
                {
                    writer.Write(item.Key + ": ");
                    if (item.Value != null)
                    {
                        writer.Write(WebUtility.HtmlEncode(item.Value).Replace("|", "&#x7C;"));
                    }
                    else
                    {
                        writer.Write("NULL");
                    }
                }
            }
            writer.RenderEndTag(); //div
            writer.RenderEndTag(); //div

            var buttons = new List <JsonDialogButton>();

            if (!string.IsNullOrEmpty(Grid.SupportEMail))
            {
                var subj = "RadarCube ASP.NET OLAP Grid error";
                if (Cube != null)
                {
                    if (Cube.GetProductID() == "RC-ASP-MSAS")
                    {
                        subj = "RadarCube ASP.NET for MSAS error";
                    }
                    if (Cube.GetProductID() == "RC-ASP-DESK")
                    {
                        subj = "RadarCube ASP.NET Desktop error";
                    }
                }

                buttons.Add(new JsonDialogButton
                {
                    text = RadarUtils.GetResStr("rsSendToSupport"),
                    code = "window.location = window.location.pathname; " +
                           //"window.open('mailto:" + Grid.SupportEMail + "?subject=" + DoEncode(subj) +
                           //"&body=" + DoEncode(E.Message + "\n" + E.StackTrace) + "'); " +
                           "RadarSoft.$(this).dialog('close');"
                });
            }

            buttons.Add(new JsonDialogButton
            {
                text = RadarUtils.GetResStr("rsClose"),
                code = "RadarSoft.$(this).dialog('close')"
            });

            result.data    = writer.ToString();
            result.buttons = buttons.ToArray();
            return(result);
        }
 /// <summary>
 ///     Creates an instance of the CubeMeasures collection
 /// </summary>
 /// <param name="ACube"></param>
 public CubeMeasures(Controls.Cube.RadarCube ACube)
 {
     FCube = ACube;
 }
 internal SessionState(Controls.Cube.RadarCube Cube)
 {
     fCube = Cube;
 }
 public CubeDimension(Controls.Cube.RadarCube ACube)
     : this()
 {
     Init(ACube);
 }
示例#12
0
 /// <summary>
 ///     Creates an instance of CubeDimension type
 /// </summary>
 /// <param name="ACube">Owner of this collection</param>
 public CubeDimensions(Controls.Cube.RadarCube ACube)
 {
     FCube = ACube;
 }
 public CubeMeasure(Controls.Cube.RadarCube ACube)
     : this()
 {
     Init(ACube);
 }