Exemplo n.º 1
0
        /// <summary>
        /// Loads the bread crumbs.
        /// </summary>
        private void LoadBreadCrumbs()
        {
            BreadCrumbs bc = GetBreadCrumbsControl();

            StageBitz.Data.Company company = DataContext.Companies.Where(c => c.CompanyId == CompanyId).FirstOrDefault();
            bc.AddLink(DisplayTitle, null);
            bc.LoadControl();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Loads the bread crumbs.
        /// </summary>
        private void LoadBreadCrumbs()
        {
            BreadCrumbs bc = GetBreadCrumbsControl();

            StageBitz.Data.Company company = DataContext.Companies.Where(c => c.CompanyId == CompanyId).FirstOrDefault();
            bc.AddLink(company.CompanyName, string.Format("~/Company/CompanyDashboard.aspx?CompanyId={0}", company.CompanyId));
            bc.AddLink("Manage Company Team", null);

            bc.LoadControl();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Loads the bread crumbs.
        /// </summary>
        private void LoadBreadCrumbs()
        {
            BreadCrumbs bc = GetBreadCrumbsControl();

            StageBitz.Data.Company company = DataContext.Companies.Where(c => c.CompanyId == CompanyID).FirstOrDefault();
            string companyUrl = Support.IsCompanyAdministrator(company.CompanyId) ?
                                string.Format("~/Company/CompanyDashboard.aspx?CompanyId={0}", company.CompanyId) : null;

            bc.AddLink(company.CompanyName, companyUrl);

            bc.AddLink("Create New Project", null);
            bc.LoadControl();
        }
Exemplo n.º 4
0
        /// <summary>
        /// Loads the bread crumbs.
        /// </summary>
        /// <param name="project">The project.</param>
        private void LoadBreadCrumbs(StageBitz.Data.Project project)
        {
            BreadCrumbs bc = GetBreadCrumbsControl();

            StageBitz.Data.Company company = project.Company;

            string companyUrl = Support.IsCompanyAdministrator(company.CompanyId) ? string.Format("~/Company/CompanyDashboard.aspx?CompanyId={0}", company.CompanyId) : null;

            bc.AddLink(company.CompanyName, companyUrl);
            bc.AddLink(project.ProjectName, string.Format("~/Project/ProjectDashboard.aspx?projectid={0}", project.ProjectId));
            bc.AddLink("Updates Report", null);
            bc.LoadControl();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Loads the bread crumbs.
        /// </summary>
        private void LoadBreadCrumbs()
        {
            BreadCrumbs bc = GetBreadCrumbsControl();

            StageBitz.Data.Project project = DataContext.Projects.Where(p => p.ProjectId == ProjectId).FirstOrDefault();
            StageBitz.Data.Company company = project.Company;

            string companyUrl = Support.IsCompanyAdministrator(company.CompanyId) ? string.Format("~/Company/CompanyDashboard.aspx?CompanyId={0}", company.CompanyId) : null;

            bc.AddLink(company.CompanyName, companyUrl);
            bc.AddLink(project.ProjectName, string.Format("~/Project/ProjectDashboard.aspx?ProjectId={0}", project.ProjectId));
            bc.AddLink(DisplayTitle, null);

            bc.LoadControl();
        }
Exemplo n.º 6
0
        private void LoadData()
        {
            StageBitz.Data.Company company = DataContext.Companies.Where(c => c.CompanyId == CompanyId).FirstOrDefault();

            #region Header Details

            Support.AssignTextToLabel(lblCompanyName, company.CompanyName, 80);

            if (company.CreatedByUserId == null)
            {
                lblCreatedBy.Text = "System";
            }
            else
            {
                StageBitz.Data.User user = DataContext.Users.Where(u => u.UserId == company.CreatedByUserId).FirstOrDefault();
                string userFullName      = (user.FirstName + " " + user.LastName).Trim();

                Support.AssignTextToLabel(lblCreatedBy, userFullName, 80);
            }

            ltrlCreatedDate.Text = Support.FormatDate(company.CreatedDate);

            int invoiceFailedCodeId = Utils.GetCodeIdByCodeValue("InvoiceStatus", "FAILED");
            //Check if there any pending invoice exist
            int paymentFailedInvoiceCount = (from i in DataContext.Invoices
                                             join p in DataContext.Projects on i.RelatedID equals p.ProjectId
                                             where i.RelatedTableName == "Project" && i.InvoiceStatusCodeId == invoiceFailedCodeId && p.CompanyId == CompanyId
                                             select i).Count();

            if (paymentFailedInvoiceCount == 1)
            {
                imgPaymentError.Attributes.Add("Title", "There is a project with a payment failure.");
            }
            else if (paymentFailedInvoiceCount > 1)
            {
                imgPaymentError.Attributes.Add("Title", "There are projects with payment failures.");
            }
            else if (FinanceSupport.GetCreditCardToken("Company", CompanyId) == null)
            {
                imgPaymentError.Attributes.Add("Title", "Credit card details not provided.");
            }
            else
            {
                imgPaymentError.Visible = false;
            }
            #endregion

            #region Contact Details

            int truncateLength = 30;
            Support.AssignTextToLabel(lblAddressLine1, company.AddressLine1, truncateLength);
            Support.AssignTextToLabel(lblAddressLine2, company.AddressLine2, truncateLength);
            Support.AssignTextToLabel(lblCity, company.City, truncateLength);
            Support.AssignTextToLabel(lblState, company.State, truncateLength);
            Support.AssignTextToLabel(lblPostCode, company.PostCode, truncateLength);

            if (company.Country != null)
            {
                Support.AssignTextToLabel(lblCountry, company.Country.CountryName, truncateLength);
            }

            Support.AssignTextToLabel(lblPhone, company.Phone, truncateLength);
            Support.AssignTextToLabel(lblWebsite, company.Website, truncateLength);

            #endregion

            SetCompanySuspensionCheckBox();

            LoadCompanyAdministrators();
        }