private void BindCollection(Guid id) { ItemCollectionFacade facade = new ItemCollectionFacade(); int totalCount; IList<ItemDetailInfo> list = facade.GetChildrenItemList(id, gvList.PageIndex, gvList.PageSize, out totalCount, "LastUpdateDate", J.SLS.Database.ORM.SortDirection.Desc); gvList.DataSource = list; gvList.DataBind(); }
private void BindCollection(Guid id) { ItemCollectionFacade facade = new ItemCollectionFacade(); int totalCount; IList <ItemDetailInfo> list = facade.GetChildrenItemList(id, gvList.PageIndex, gvList.PageSize, out totalCount, "LastUpdateDate", J.SLS.Database.ORM.SortDirection.Desc); gvList.DataSource = list; gvList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { string collectionId = Request["cid"]; if (string.IsNullOrEmpty(collectionId)) { RedirectToUrl("Default.aspx"); } Guid id = new Guid(collectionId); ItemCollectionFacade facade = new ItemCollectionFacade(); hlnkAdd.Text = "添加 - " + facade.GetItemById(id).Name; hlnkAdd.NavigateUrl = "CollectionEdit.aspx?t=a&cid=" + collectionId; BindCollection(id); }
protected void Page_Load(object sender, EventArgs e) { if (BlockObject != null) { if (BlockObject is ItemCollectionInfo) { ItemCollectionFacade facade = new ItemCollectionFacade(); int totalCount; int pageIndex = 0; IList<ItemDetailInfo> itemList = facade.GetChildrenItemList(BlockObject.Id, pageIndex, DisplayCount, out totalCount, OrderBy, Direction); rptList.DataSource = itemList; rptList.DataBind(); } else { throw new ArgumentOutOfRangeException("类型\"" + BlockObject.GetType().FullName + "\"的内容不能在列表模块中展示。"); } } }
protected void Page_Load(object sender, EventArgs e) { if (BlockObject != null) { if (BlockObject is ItemCollectionInfo) { ItemCollectionFacade facade = new ItemCollectionFacade(); int totalCount; int pageIndex = 0; IList <ItemDetailInfo> itemList = facade.GetChildrenItemList(BlockObject.Id, pageIndex, DisplayCount, out totalCount, OrderBy, Direction); rptList.DataSource = itemList; rptList.DataBind(); } else { throw new ArgumentOutOfRangeException("类型\"" + BlockObject.GetType().FullName + "\"的内容不能在列表模块中展示。"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string type = Request["t"]; string collectionId = Request["cid"]; string url = "CollectionManagement.aspx?cid=" + collectionId; Guid cid = new Guid(collectionId); ItemCollectionFacade facade = new ItemCollectionFacade(); ItemCollectionInfo collection = facade.GetItemById(cid) as ItemCollectionInfo; if (collection == null) { JavascriptAlertAndRedirect("参数错误 - 未找到集合!", url); return; } else { hlnkCancel.NavigateUrl = url; } switch (type.ToLower()) { case "a": ClearText(); lbtnSave.Text = "添加"; break; case "e": string id = Request["id"]; BindItem(id, url); lbtnSave.Text = "修改"; break; default: JavascriptAlertAndRedirect("参数错误 - 缺少类型!", url); break; } } }