namespace builder.Builder.VisitorPages
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using BuilderClasses;
///
/// Summary description for ShowList.
///
public partial class ShowList : System.Web.UI.UserControl
{
#region Propertise
public string Separator;
public string CounterTextFormat = "({0})";
private bool _HasCounter = false;
private string _SortBy = "";
///
/// Determines wether it should add Item_visited property in the db or not
///
public bool HasCounter
{
get
{
return _HasCounter;
}
set
{
_HasCounter = value;
}
}
public string SortBy
{
get
{
return _SortBy;
}
set
{
_SortBy = value;
}
}
private int _PagingSize = 0;
///
/// Sets paging size of the list
///
public int PagingSize
{
get
{
return _PagingSize;
}
set
{
_PagingSize = value;
}
}
///
/// use for Define that if Archive item showed
///
public ItemBool IsArchive = ItemBool.False;
///
/// use for special select
///
public ItemBool IsSpecial = ItemBool.Null;
///
/// True False Null
///
public ItemBool IsItem = ItemBool.Null;
///
/// The ID Of Item For Show
///
public int ItemID = 0;
///
/// use for specail list ignoring list that define for Item in DB
///
public string AscxName = "";
///
/// use for show detail
///
public bool IsDetailList = false;
///
/// For list father of item ID
///
public bool FatherList = false;
///
/// Define that list has for search
/// Default value is false
///
public bool HasForSearch = false;
///
/// only use when set hasforserach=true
///
public string SearchValue = "";
#endregion
public void Page_Load(object sender, System.EventArgs e)
{
builder.Files.ListParent usrList = new builder.Files.List();
List bl = new List();
if (AscxName != "")
usrList = (builder.Files.ListParent)LoadControl(URLS.GetRoot(this.Page) + "files/ascxs/" + AscxName);
else
usrList = (builder.Files.ListParent)LoadControl(URLS.GetRoot(this.Page) + "files/ascxs/" + bl.GetListForItem(ItemID, IsDetailList));
plhList.Controls.Add(usrList);
usrList.IsArchive = this.IsArchive;
usrList.IsSpecial = this.IsSpecial;
usrList.IsItem = this.IsItem;
usrList.ItemID = this.ItemID;
usrList.Separator = this.Separator;
usrList.CounterTextFormat = this.CounterTextFormat;
usrList.HasCounter = this.HasCounter;
usrList.FatherList = this.FatherList;
usrList.HasForSearch = this.HasForSearch;
usrList.SearchValue = this.SearchValue;
usrList.PagingSize = ((this._PagingSize)>0) ? this._PagingSize : bl.GetPagingSizeByItemID(ItemID);
usrList.SortBy = this._SortBy;
usrList.ShowList();
BuilderClasses.Item Item = new Item();
if (HasCounter)
{
Item.Addvisited(this.ItemID);
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
}
#endregion
}
}
namespace builder.Builder.VisitorPages
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using BuilderClasses;
///
/// Summary description for ShowList.
///
public partial class ShowList : System.Web.UI.UserControl
{
#region Propertise
public string Separator;
public string CounterTextFormat = "({0})";
private bool _HasCounter = false;
private string _SortBy = "";
///
/// Determines wether it should add Item_visited property in the db or not
///
public bool HasCounter
{
get
{
return _HasCounter;
}
set
{
_HasCounter = value;
}
}
public string SortBy
{
get
{
return _SortBy;
}
set
{
_SortBy = value;
}
}
private int _PagingSize = 0;
///
/// Sets paging size of the list
///
public int PagingSize
{
get
{
return _PagingSize;
}
set
{
_PagingSize = value;
}
}
///
/// use for Define that if Archive item showed
///
public ItemBool IsArchive = ItemBool.False;
///
/// use for special select
///
public ItemBool IsSpecial = ItemBool.Null;
///
/// True False Null
///
public ItemBool IsItem = ItemBool.Null;
///
/// The ID Of Item For Show
///
public int ItemID = 0;
///
/// use for specail list ignoring list that define for Item in DB
///
public string AscxName = "";
///
/// use for show detail
///
public bool IsDetailList = false;
///
/// For list father of item ID
///
public bool FatherList = false;
///
/// Define that list has for search
/// Default value is false
///
public bool HasForSearch = false;
///
/// only use when set hasforserach=true
///
public string SearchValue = "";
#endregion
public void Page_Load(object sender, System.EventArgs e)
{
builder.Files.ListParent usrList = new builder.Files.List();
List bl = new List();
if (AscxName != "")
usrList = (builder.Files.ListParent)LoadControl(URLS.GetRoot(this.Page) + "files/ascxs/" + AscxName);
else
usrList = (builder.Files.ListParent)LoadControl(URLS.GetRoot(this.Page) + "files/ascxs/" + bl.GetListForItem(ItemID, IsDetailList));
plhList.Controls.Add(usrList);
usrList.IsArchive = this.IsArchive;
usrList.IsSpecial = this.IsSpecial;
usrList.IsItem = this.IsItem;
usrList.ItemID = this.ItemID;
usrList.Separator = this.Separator;
usrList.CounterTextFormat = this.CounterTextFormat;
usrList.HasCounter = this.HasCounter;
usrList.FatherList = this.FatherList;
usrList.HasForSearch = this.HasForSearch;
usrList.SearchValue = this.SearchValue;
usrList.PagingSize = ((this._PagingSize)>0) ? this._PagingSize : bl.GetPagingSizeByItemID(ItemID);
usrList.SortBy = this._SortBy;
usrList.ShowList();
BuilderClasses.Item Item = new Item();
if (HasCounter)
{
Item.Addvisited(this.ItemID);
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
}
#endregion
}
}