/// <summary> Constructor for a new instance of the Item_Aggregation_Complete_Child_Page class </summary> /// <param name="Browse_Type">Flag indicates if this is a browse by, browse, or info page</param> /// <param name="Source_Data_Type">Source and data type of this browse or info page</param> /// <param name="Code">Code for this info or browse page</param> /// <param name="Static_HTML_Source">Filename of the static source file for this browse or info page</param> /// <param name="Label">Label for this browse or info page which will be displayed on the navigation tab</param> public Complete_Item_Aggregation_Child_Page(Item_Aggregation_Child_Visibility_Enum Browse_Type, Item_Aggregation_Child_Source_Data_Enum Source_Data_Type, string Code, string Static_HTML_Source, string Label) { // Create the collections for the labels and static html source Label_Dictionary = new Dictionary<Web_Language_Enum, string>(); Source_Dictionary = new Dictionary<Web_Language_Enum, string>(); // Add the parameter information as the default labels and source Label_Dictionary[Web_Language_Enum.DEFAULT] = Label; Source_Dictionary[Web_Language_Enum.DEFAULT] = Static_HTML_Source; // Save all of these parameters this.Code = Code; this.Browse_Type = Browse_Type; this.Source_Data_Type = Source_Data_Type; //// If this is the special ALL or NEW, then the source will be a database table/set //if ((Code == "all") || (Code == "new")) //{ // Data_Type = Result_Data_Type.Table; //} //else //{ // Data_Type = Result_Data_Type.Text; //} // Add the label if ( Label.Length > 0 ) Label_Dictionary[Web_Language_Enum.English] = Label; }
/// <summary> Constructor for a new instance of the Item_Aggregation_Complete_Child_Page class </summary> /// <param name="Browse_Type">Flag indicates if this is a browse by, browse, or info page</param> /// <param name="Source_Data_Type">Source and data type of this browse or info page</param> /// <param name="Code">Code for this info or browse page</param> /// <param name="Static_HTML_Source">Filename of the static source file for this browse or info page</param> /// <param name="Label">Label for this browse or info page which will be displayed on the navigation tab</param> public Complete_Item_Aggregation_Child_Page(Item_Aggregation_Child_Visibility_Enum Browse_Type, Item_Aggregation_Child_Source_Data_Enum Source_Data_Type, string Code, string Static_HTML_Source, string Label) { // Create the collections for the labels and static html source Label_Dictionary = new Dictionary <Web_Language_Enum, string>(); Source_Dictionary = new Dictionary <Web_Language_Enum, string>(); // Add the parameter information as the default labels and source Label_Dictionary[Web_Language_Enum.DEFAULT] = Label; Source_Dictionary[Web_Language_Enum.DEFAULT] = Static_HTML_Source; // Save all of these parameters this.Code = Code; this.Browse_Type = Browse_Type; this.Source_Data_Type = Source_Data_Type; //// If this is the special ALL or NEW, then the source will be a database table/set //if ((Code == "all") || (Code == "new")) //{ // Data_Type = Result_Data_Type.Table; //} //else //{ // Data_Type = Result_Data_Type.Text; //} // Add the label if (Label.Length > 0) { Label_Dictionary[Web_Language_Enum.English] = Label; } }
/// <summary> Add a new browse or info object to this hierarchical object </summary> /// <param name = "Browse_Type">Flag indicates if this is a BROWSE or INFO object</param> /// <param name = "Browse_Code">SubMode indicator for this object</param> /// <param name = "StaticHtmlSource">Any static HTML source to be used for display</param> /// <param name = "Text">Text to display for this browse</param> /// <returns>The built data object</returns> public Item_Aggregation_Child_Page Add_Child_Page(Item_Aggregation_Child_Visibility_Enum Browse_Type, string Browse_Code, string StaticHtmlSource, string Text) { // Create the new Browse_Info object Item_Aggregation_Child_Page childPage = new Item_Aggregation_Child_Page(Browse_Type, Item_Aggregation_Child_Source_Data_Enum.Database_Table, Browse_Code, StaticHtmlSource, Text); Add_Child_Page(childPage); return(childPage); }
/// <summary> Constructor for a new instance of the Item_Aggregation_Child_Page class </summary> /// <param name="Browse_Type">Flag indicates if this is a browse by, browse, or info page</param> /// <param name="Source_Data_Type">Source and data type of this browse or info page</param> /// <param name="Code">Code for this info or browse page</param> /// <param name="Static_HTML_Source">Filename of the static source file for this browse or info page</param> /// <param name="Label">Label for this browse or info page which will be displayed on the navigation tab</param> public Item_Aggregation_Child_Page(Item_Aggregation_Child_Visibility_Enum Browse_Type, Item_Aggregation_Child_Source_Data_Enum Source_Data_Type, string Code, string Static_HTML_Source, string Label) { // Save all of these parameters this.Code = Code; this.Browse_Type = Browse_Type; this.Source_Data_Type = Source_Data_Type; this.Label = Label; if ( !String.IsNullOrEmpty(Static_HTML_Source)) Source = Static_HTML_Source; //// If this is the special ALL or NEW, then the source will be a database table/set //if ((Code == "all") || (Code == "new")) //{ // Data_Type = Result_Data_Type.Table; //} //else //{ // Data_Type = Result_Data_Type.Text; //} }
/// <summary> Constructor for a new instance of the Item_Aggregation_Child_Page class </summary> /// <param name="Browse_Type">Flag indicates if this is a browse by, browse, or info page</param> /// <param name="Source_Data_Type">Source and data type of this browse or info page</param> /// <param name="Code">Code for this info or browse page</param> /// <param name="Static_HTML_Source">Filename of the static source file for this browse or info page</param> /// <param name="Label">Label for this browse or info page which will be displayed on the navigation tab</param> public Item_Aggregation_Child_Page(Item_Aggregation_Child_Visibility_Enum Browse_Type, Item_Aggregation_Child_Source_Data_Enum Source_Data_Type, string Code, string Static_HTML_Source, string Label) { // Save all of these parameters this.Code = Code; this.Browse_Type = Browse_Type; this.Source_Data_Type = Source_Data_Type; this.Label = Label; if (!String.IsNullOrEmpty(Static_HTML_Source)) { Source = Static_HTML_Source; } //// If this is the special ALL or NEW, then the source will be a database table/set //if ((Code == "all") || (Code == "new")) //{ // Data_Type = Result_Data_Type.Table; //} //else //{ // Data_Type = Result_Data_Type.Text; //} }
/// <summary>Reads the item aggregation browse or info file and returns a built <see cref="Item_Aggregation_Child_Page"/> object for /// inclusion in the item aggregation </summary> /// <param name="FileName"> Filename of the browse or info file</param> /// <param name="Browse_Type"> Flag indicates if this is a browse or info file</param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering</param> /// <returns> Built object containing all of the pertinent details about this info or browse </returns> private static Complete_Item_Aggregation_Child_Page Get_Item_Aggregation_Browse_Info(string FileName, Item_Aggregation_Child_Visibility_Enum Browse_Type, Custom_Tracer Tracer) { HTML_Based_Content fileContent = HTML_Based_Content_Reader.Read_HTML_File(FileName, false, Tracer); Complete_Item_Aggregation_Child_Page returnObject = new Complete_Item_Aggregation_Child_Page(Browse_Type, Item_Aggregation_Child_Source_Data_Enum.Static_HTML, fileContent.Code, FileName, fileContent.Title ?? "Missing Title"); return returnObject; }
/// <summary>Reads the item aggregation browse or info file and returns a built <see cref="Item_Aggregation_Child_Page"/> object for /// inclusion in the item aggregation </summary> /// <param name="FileName"> Filename of the browse or info file</param> /// <param name="Browse_Type"> Flag indicates if this is a browse or info file</param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering</param> /// <returns> Built object containing all of the pertinent details about this info or browse </returns> private static Complete_Item_Aggregation_Child_Page Get_Item_Aggregation_Browse_Info(string FileName, Item_Aggregation_Child_Visibility_Enum Browse_Type, Custom_Tracer Tracer) { HTML_Based_Content fileContent = HTML_Based_Content_Reader.Read_HTML_File(FileName, false, Tracer); Complete_Item_Aggregation_Child_Page returnObject = new Complete_Item_Aggregation_Child_Page(Browse_Type, Item_Aggregation_Child_Source_Data_Enum.Static_HTML, fileContent.Code, FileName, fileContent.Title ?? "Missing Title"); return(returnObject); }
/// <summary> Add a new browse or info object to this hierarchical object </summary> /// <param name = "Browse_Type">Flag indicates if this is a BROWSE or INFO object</param> /// <param name = "Browse_Code">SubMode indicator for this object</param> /// <param name = "StaticHtmlSource">Any static HTML source to be used for display</param> /// <param name = "Text">Text to display for this browse</param> /// <returns>The built data object</returns> public Complete_Item_Aggregation_Child_Page Add_Child_Page(Item_Aggregation_Child_Visibility_Enum Browse_Type, string Browse_Code, string StaticHtmlSource, string Text) { // Create the new Browse_Info object Complete_Item_Aggregation_Child_Page childPage = new Complete_Item_Aggregation_Child_Page(Browse_Type, Item_Aggregation_Child_Source_Data_Enum.Database_Table, Browse_Code, StaticHtmlSource, Text); if (Child_Pages == null) Child_Pages = new List<Complete_Item_Aggregation_Child_Page>(); // Add this to the Hash table Child_Pages.Add(childPage); childPagesHash[Browse_Code.ToUpper()] = childPage; return childPage; }
/// <summary> Add a new browse or info object to this hierarchical object </summary> /// <param name = "Browse_Type">Flag indicates if this is a BROWSE or INFO object</param> /// <param name = "Browse_Code">SubMode indicator for this object</param> /// <param name = "StaticHtmlSource">Any static HTML source to be used for display</param> /// <param name = "Text">Text to display for this browse</param> /// <returns>The built data object</returns> public Item_Aggregation_Child_Page Add_Child_Page(Item_Aggregation_Child_Visibility_Enum Browse_Type, string Browse_Code, string StaticHtmlSource, string Text) { // Create the new Browse_Info object Item_Aggregation_Child_Page childPage = new Item_Aggregation_Child_Page(Browse_Type, Item_Aggregation_Child_Source_Data_Enum.Database_Table, Browse_Code, StaticHtmlSource, Text); Add_Child_Page(childPage); return childPage; }