Exemple #1
0
 /// <summary>
 /// Advances the enumerator to the next queue of the enumeration, if one is currently available.
 /// </summary>
 /// <returns>true, if the enumerator was succesfully advanced to the next queue; false, if the enumerator has reached the end of the enumeration.</returns>
 public bool MoveNext()
 {
     if ((_index
          < (_collection.Count - 1)))
     {
         _index          = (_index + 1);
         _currentElement = _collection[_index];
         return(true);
     }
     _index = _collection.Count;
     return(false);
 }
Exemple #2
0
        private void RenderReport(Report report, HtmlTextWriter html)
        {
            html.AddAttribute(HtmlAttr.Width, report.Width);
            html.AddAttribute(HtmlAttr.Cellpadding, "0");
            html.AddAttribute(HtmlAttr.Cellspacing, "0");
            html.AddAttribute(HtmlAttr.Border, "0");
            html.RenderBeginTag(HtmlTag.Table);

            html.RenderBeginTag(HtmlTag.Tr);
            html.AddAttribute(HtmlAttr.Class, "tbl-border");
            html.RenderBeginTag(HtmlTag.Td);

            html.AddAttribute(HtmlAttr.Width, "100%");
            html.AddAttribute(HtmlAttr.Cellpadding, "4");
            html.AddAttribute(HtmlAttr.Cellspacing, "1");
            html.RenderBeginTag(HtmlTag.Table);

            html.RenderBeginTag(HtmlTag.Tr);
            html.AddAttribute(HtmlAttr.Colspan, "10");
            html.AddAttribute(HtmlAttr.Width, "100%");
            html.AddAttribute(HtmlAttr.Align, "center");
            html.AddAttribute(HtmlAttr.Class, "header");
            html.RenderBeginTag(HtmlTag.Td);
            html.Write(report.Name);
            html.RenderEndTag();
            html.RenderEndTag();

            bool isNamed = false;

            for (int i = 0; i < report.Columns.Count && !isNamed; ++i)
            {
                isNamed = (report.Columns[i].Name != null);
            }

            if (isNamed)
            {
                html.RenderBeginTag(HtmlTag.Tr);

                for (int i = 0; i < report.Columns.Count; ++i)
                {
                    ReportColumn column = report.Columns[i];

                    html.AddAttribute(HtmlAttr.Class, "header");
                    html.AddAttribute(HtmlAttr.Width, column.Width);
                    html.AddAttribute(HtmlAttr.Align, column.Align);
                    html.RenderBeginTag(HtmlTag.Td);

                    html.Write(column.Name);

                    html.RenderEndTag();
                }

                html.RenderEndTag();
            }

            for (int i = 0; i < report.Items.Count; ++i)
            {
                ReportItem item = report.Items[i];

                html.RenderBeginTag(HtmlTag.Tr);

                for (int j = 0; j < item.Values.Count; ++j)
                {
                    if (!isNamed && j == 0)
                    {
                        html.AddAttribute(HtmlAttr.Width, report.Columns[j].Width);
                    }

                    html.AddAttribute(HtmlAttr.Align, report.Columns[j].Align);
                    html.AddAttribute(HtmlAttr.Class, "entry");
                    html.RenderBeginTag(HtmlTag.Td);

                    if (item.Values[j].Format == null)
                    {
                        html.Write(item.Values[j].Value);
                    }
                    else
                    {
                        html.Write(int.Parse(item.Values[j].Value).ToString(item.Values[j].Format));
                    }

                    html.RenderEndTag();
                }

                html.RenderEndTag();
            }

            html.RenderEndTag();
            html.RenderEndTag();
            html.RenderEndTag();
            html.RenderEndTag();
        }
 /// <summary>
 /// Insert a Server.Engines.Reports.ReportColumn instance into this collection at a specified index.
 /// </summary>
 /// <param name="index">Zero-based index.</param>
 /// <param name="value">The Server.Engines.Reports.ReportColumn instance to insert.</param>
 public void Insert(int index, ReportColumn value)
 {
     List.Insert(index, value);
 }
 /// <summary>
 /// Removes a specified Server.Engines.Reports.ReportColumn instance from this collection.
 /// </summary>
 /// <param name="value">The Server.Engines.Reports.ReportColumn instance to remove.</param>
 public void Remove(ReportColumn value)
 {
     List.Remove(value);
 }
 /// <summary>
 /// Retrieve the index a specified Server.Engines.Reports.ReportColumn instance is in this collection.
 /// </summary>
 /// <param name="value">Server.Engines.Reports.ReportColumn instance to find.</param>
 /// <returns>The zero-based index of the specified Server.Engines.Reports.ReportColumn instance. If the object is not found, the return value is -1.</returns>
 public int IndexOf(ReportColumn value)
 {
     return List.IndexOf(value);
 }
 /// <summary>
 /// Determines whether a specified Server.Engines.Reports.ReportColumn instance is in this collection.
 /// </summary>
 /// <param name="value">Server.Engines.Reports.ReportColumn instance to search for.</param>
 /// <returns>True if the Server.Engines.Reports.ReportColumn instance is in the collection; otherwise false.</returns>
 public bool Contains(ReportColumn value)
 {
     return List.Contains(value);
 }
 /// <summary>
 /// Append a Server.Engines.Reports.ReportColumn entry to this collection.
 /// </summary>
 /// <param name="value">Server.Engines.Reports.ReportColumn instance.</param>
 /// <returns>The position into which the new element was inserted.</returns>
 public int Add(ReportColumn value)
 {
     return List.Add(value);
 }
 /// <summary>
 /// Advances the enumerator to the next queue of the enumeration, if one is currently available.
 /// </summary>
 /// <returns>true, if the enumerator was succesfully advanced to the next queue; false, if the enumerator has reached the end of the enumeration.</returns>
 public bool MoveNext()
 {
     if ((_index 
                 < (_collection.Count - 1)))
     {
         _index = (_index + 1);
         _currentElement = _collection[_index];
         return true;
     }
     _index = _collection.Count;
     return false;
 }
 /// <summary>
 /// Reset the cursor, so it points to the beginning of the enumerator.
 /// </summary>
 public void Reset()
 {
     _index = -1;
     _currentElement = null;
 }
Exemple #10
0
 /// <summary>
 /// Insert a Server.Engines.Reports.ReportColumn instance into this collection at a specified index.
 /// </summary>
 /// <param name="index">Zero-based index.</param>
 /// <param name="value">The Server.Engines.Reports.ReportColumn instance to insert.</param>
 public void Insert(int index, ReportColumn value)
 {
     List.Insert(index, value);
 }
Exemple #11
0
 /// <summary>
 /// Removes a specified Server.Engines.Reports.ReportColumn instance from this collection.
 /// </summary>
 /// <param name="value">The Server.Engines.Reports.ReportColumn instance to remove.</param>
 public void Remove(ReportColumn value)
 {
     List.Remove(value);
 }
Exemple #12
0
 /// <summary>
 /// Retrieve the index a specified Server.Engines.Reports.ReportColumn instance is in this collection.
 /// </summary>
 /// <param name="value">Server.Engines.Reports.ReportColumn instance to find.</param>
 /// <returns>The zero-based index of the specified Server.Engines.Reports.ReportColumn instance. If the object is not found, the return value is -1.</returns>
 public int IndexOf(ReportColumn value)
 {
     return(List.IndexOf(value));
 }
Exemple #13
0
 /// <summary>
 /// Determines whether a specified Server.Engines.Reports.ReportColumn instance is in this collection.
 /// </summary>
 /// <param name="value">Server.Engines.Reports.ReportColumn instance to search for.</param>
 /// <returns>True if the Server.Engines.Reports.ReportColumn instance is in the collection; otherwise false.</returns>
 public bool Contains(ReportColumn value)
 {
     return(List.Contains(value));
 }
Exemple #14
0
 /// <summary>
 /// Append a Server.Engines.Reports.ReportColumn entry to this collection.
 /// </summary>
 /// <param name="value">Server.Engines.Reports.ReportColumn instance.</param>
 /// <returns>The position into which the new element was inserted.</returns>
 public int Add(ReportColumn value)
 {
     return(List.Add(value));
 }
Exemple #15
0
 /// <summary>
 /// Reset the cursor, so it points to the beginning of the enumerator.
 /// </summary>
 public void Reset()
 {
     _index          = -1;
     _currentElement = null;
 }
Exemple #16
0
        private void RenderReport(Report report, XmlWriter html)
        {
            html.WriteStartElement("table");
            html.WriteAttributeString("width", report.Width);
            html.WriteAttributeString("cellpadding", "0");
            html.WriteAttributeString("cellspacing", "0");
            html.WriteAttributeString("border", "0");

            html.WriteStartElement("tr");
            html.WriteStartElement("td");
            html.WriteAttributeString("class", "tbl-border");

            html.WriteStartElement("table");
            html.WriteAttributeString("width", "100%");
            html.WriteAttributeString("cellpadding", "4");
            html.WriteAttributeString("cellspacing", "1");

            html.WriteStartElement("tr");
            html.WriteStartElement("td");
            html.WriteAttributeString("colspan", "10");
            html.WriteAttributeString("width", "100%");
            html.WriteAttributeString("align", "center");
            html.WriteAttributeString("class", "header");
            html.WriteValue(report.Name);
            html.WriteEndElement();
            html.WriteEndElement();

            bool isNamed = false;

            for (int i = 0; i < report.Columns.Count && !isNamed; ++i)
            {
                isNamed = (report.Columns[i].Name != null);
            }

            if (isNamed)
            {
                html.WriteStartElement("tr");

                for (int i = 0; i < report.Columns.Count; ++i)
                {
                    ReportColumn column = report.Columns[i];

                    html.WriteStartElement("td");
                    html.WriteAttributeString("class", "header");
                    html.WriteAttributeString("width", column.Width);
                    html.WriteAttributeString("align", column.Align);

                    html.WriteValue(column.Name);

                    html.WriteEndElement();
                }

                html.WriteEndElement();
            }

            for (int i = 0; i < report.Items.Count; ++i)
            {
                ReportItem item = report.Items[i];

                html.WriteStartElement("tr");

                for (int j = 0; j < item.Values.Count; ++j)
                {
                    html.WriteStartElement("td");
                    if (!isNamed && j == 0)
                    {
                        html.WriteAttributeString("width", report.Columns[j].Width);
                    }

                    html.WriteAttributeString("align", report.Columns[j].Align);
                    html.WriteAttributeString("class", "entry");

                    if (item.Values[j].Format == null)
                    {
                        html.WriteValue(item.Values[j].Value);
                    }
                    else
                    {
                        html.WriteValue(int.Parse(item.Values[j].Value).ToString(item.Values[j].Format));
                    }

                    html.WriteEndElement();
                }

                html.WriteEndElement();
            }

            html.WriteEndElement();
            html.WriteEndElement();
            html.WriteEndElement();
            html.WriteEndElement();
        }