/// <summary> /// Loads the bread crumbs. /// </summary> private void LoadBreadCrumbs() { BreadCrumbs bc = GetBreadCrumbsControl(); bc.ClearLinks(); bc.AddLink("Company Inventory", string.Format("~/Inventory/CompanyInventory.aspx?CompanyId={0}", this.CompanyId)); bc.AddLink("My Bookings", null); bc.LoadControl(); bc.UpdateBreadCrumb(); }
/// <summary> /// Loads the bread crumbs. /// </summary> /// <param name="company">The company.</param> private void LoadBreadCrumbs(Data.Company company) { bool isCompanyAdmin = Support.IsCompanyAdministrator(this.CompanyId); BreadCrumbs bc = GetBreadCrumbsControl(); bc.ClearLinks(); bc.AddLink("Company Inventory", isCompanyAdmin ? string.Format("~/Inventory/CompanyInventory.aspx?CompanyId={0}", this.CompanyId) : null); bc.AddLink("My Bookings", string.Format("~/Inventory/MyBookings.aspx?CompanyId={0}", this.CompanyId)); bc.AddLink("Booking Details", string.Format("~/Inventory/MyBookingDetails.aspx?BookingId={0}&CompanyId={1}", BookingId, CompanyId)); bc.AddLink("Change Booking Dates", null); bc.LoadControl(); bc.UpdateBreadCrumb(); }
/// <summary> /// Loads the bread crumbs. /// </summary> /// <param name="company">The company.</param> private void LoadBreadCrumbs(Data.Company company) { if (this.CompanyId > 0) { bool isCompanyAdmin = Support.IsCompanyAdministrator(this.CompanyId); BreadCrumbs bc = GetBreadCrumbsControl(); bc.ClearLinks(); bc.AddLink("Company Inventory", isCompanyAdmin ? string.Format("~/Inventory/CompanyInventory.aspx?CompanyId={0}", this.CompanyId) : null); bc.AddLink("My Bookings", string.Format("~/Inventory/MyBookings.aspx?CompanyId={0}", this.CompanyId)); bc.AddLink(string.Concat(Support.TruncateString(GetBL <InventoryBL>().GetNonProjectBooking(BookingId).Name, 30)), null); bc.LoadControl(); bc.UpdateBreadCrumb(); } }
/// <summary> /// Loads the bread crumbs. /// </summary> /// <param name="company">The company.</param> private void LoadBreadCrumbs(Data.Company company) { if (this.CompanyId > 0) { bool isCompanyAdmin = Support.IsCompanyAdministrator(this.CompanyId); BreadCrumbs bc = GetBreadCrumbsControl(); bc.ClearLinks(); bc.AddLink(company.CompanyName, isCompanyAdmin ? string.Format("~/Company/CompanyDashboard.aspx?CompanyId={0}", this.CompanyId) : null); bc.AddLink("Company Inventory", string.Format("~/Inventory/CompanyInventory.aspx?CompanyId={0}", this.CompanyId)); bc.AddLink("Manage Inventory", string.Format("~/Inventory/InventorySharing.aspx?CompanyId={0}", this.CompanyId)); bc.AddLink("Booking Details", null); bc.LoadControl(); bc.UpdateBreadCrumb(); } }
/// <summary> /// Loads the bread crumbs. /// </summary> /// <param name="item">The item.</param> /// <param name="company">The company.</param> private void LoadBreadCrumbs(StageBitz.Data.Item item) { var company = DataContext.Companies.Where(c => c.CompanyId == this.CompanyId).FirstOrDefault(); if (item != null && company != null) { BreadCrumbs bc = GetBreadCrumbsControl(); bc.ClearLinks(); string companyUrl = null; if (Support.IsCompanyAdministrator(this.CompanyId)) { companyUrl = string.Format("~/Company/CompanyDashboard.aspx?CompanyId={0}", this.CompanyId); } bc.AddLink(company.CompanyName, companyUrl); bc.AddLink("Company Inventory", this.CompanyInventoryNavigateUrl, "InventoryLink"); bc.AddLink(DisplayTitle, null); bc.LoadControl(); bc.UpdateBreadCrumb(); } }