コード例 #1
0
 /// <summary>
 /// InitData
 /// </summary>
 protected override void InitData()
 {
     _data = new ActualCostsReportTDS();
 }
コード例 #2
0
        private void LoadForSubcontractors(mReport1 master, string category, int clientId, int projectId, int companyId, DateTime startDate, DateTime endDate, ActualCostsReportTDS actualCostsReportTDS)
        {
            LiquiForce.LFSLive.BL.LabourHours.ActualCosts.ActualCostsReportGeneral actualCostsReportGeneral = new LiquiForce.LFSLive.BL.LabourHours.ActualCosts.ActualCostsReportGeneral(actualCostsReportTDS);
            actualCostsReportGeneral.LoadForSubcontractors(category, clientId, projectId, startDate, endDate, companyId, ckbxDates.Checked);
            LiquiForce.LFSLive.BL.LabourHours.ActualCosts.ActualCostsReportSubcontractorCosts actualCostsReportSubcontractorCosts = new LiquiForce.LFSLive.BL.LabourHours.ActualCosts.ActualCostsReportSubcontractorCosts(actualCostsReportTDS);

            // Set properties to master page
            master.Data = actualCostsReportSubcontractorCosts.Data;
            master.Table = actualCostsReportSubcontractorCosts.TableName;

            // Get report
            if (actualCostsReportSubcontractorCosts.Table.Rows.Count > 0)
            {
                if (master.Format == "pdf")
                {
                    master.Report = new ActualCostsReport();
                    masterParameters(master);
                }
                else
                {
                    master.Report = new ActualCostsReportExport();
                }

                // Make sections visible
                ((Section)master.Report.ReportDefinition.Sections["sDetailSubcontractorCosts"]).SectionFormat.EnableSuppress = false;
                ((Section)master.Report.ReportDefinition.Sections["sDetailHotelCosts"]).SectionFormat.EnableSuppress = true;
                ((Section)master.Report.ReportDefinition.Sections["sDetailsInsuranceCosts"]).SectionFormat.EnableSuppress = true;
                ((Section)master.Report.ReportDefinition.Sections["sDetailBondingCosts"]).SectionFormat.EnableSuppress = true;
                ((Section)master.Report.ReportDefinition.Sections["sDetailOtherCosts"]).SectionFormat.EnableSuppress = true;
            }
        }
コード例 #3
0
        private void Generate()
        {
            mReport1 master = (mReport1)this.Master;

            // Get Data
            string category = ddlCategory.SelectedValue;
            int companyId = Int32.Parse(hdfCompanyId.Value);
            int clientId = Int32.Parse(ddlClient.SelectedValue);
            int projectId = Int32.Parse(ddlProject.SelectedValue);
            DateTime startDate = DateTime.Parse(tkrdpStartDate.SelectedDate.Value.ToShortDateString());
            DateTime endDate = DateTime.Parse(tkrdpEndDate.SelectedDate.Value.ToShortDateString());
            ActualCostsReportTDS actualCostsReportTDS = new ActualCostsReportTDS();

            // Load Data
            if (category == "All")
            {
                GenerateAll();
            }
            else
            {
                if (category == "Subcontractors")
                {
                    LoadForSubcontractors(master, category, clientId, projectId, companyId, startDate, endDate, actualCostsReportTDS);
                }
                else
                {
                    if (category == "Hotels")
                    {
                        LoadForHotel(master, category, clientId, projectId, companyId, startDate, endDate, actualCostsReportTDS);
                    }
                    else
                    {
                        if (category == "Insurance")
                        {
                            LoadForInsurance(master, category, clientId, projectId, companyId, startDate, endDate, actualCostsReportTDS);
                        }
                        else
                        {
                            if (category == "Bonding")
                            {
                                LoadForBonding(master, category, clientId, projectId, companyId, startDate, endDate, actualCostsReportTDS);
                            }
                            else
                            {
                                LoadForOther(master, category, clientId, projectId, companyId, startDate, endDate, actualCostsReportTDS);
                            }
                        }
                    }
                }
            }
        }
コード例 #4
0
        private void GenerateAll()
        {
            mReport1 master = (mReport1)this.Master;

            // Get Data
            string category = ddlCategory.SelectedValue;
            int companyId = Int32.Parse(hdfCompanyId.Value);
            int clientId = Int32.Parse(ddlClient.SelectedValue);
            int projectId = Int32.Parse(ddlProject.SelectedValue);
            DateTime startDate = DateTime.Parse(tkrdpStartDate.SelectedDate.Value.ToShortDateString());
            DateTime endDate = DateTime.Parse(tkrdpEndDate.SelectedDate.Value.ToShortDateString());
            ActualCostsReportTDS actualCostsReportTDS = new ActualCostsReportTDS();
            bool withDates = ckbxDates.Checked;

            LiquiForce.LFSLive.BL.LabourHours.ActualCosts.ActualCostsReportGeneral actualCostsReportGeneral = new LiquiForce.LFSLive.BL.LabourHours.ActualCosts.ActualCostsReportGeneral(actualCostsReportTDS);

            int rows = actualCostsReportGeneral.LoadAll(category, clientId, projectId, startDate, endDate, companyId, withDates);

            // ... set properties to master page
            master.Data = actualCostsReportGeneral.Data;
            master.Table = actualCostsReportGeneral.TableName;

            // Get report
            if (rows > 0)
            {
                if (master.Format == "pdf")
                {
                    master.Report = new ActualCostsReport();
                    masterParameters(master);
                }
                else
                {
                    master.Report = new ActualCostsReportExport();
                }

                // Make sections visible
                ((Section)master.Report.ReportDefinition.Sections["sDetailSubcontractorCosts"]).SectionFormat.EnableSuppress = false;
                ((Section)master.Report.ReportDefinition.Sections["sDetailHotelCosts"]).SectionFormat.EnableSuppress = false;
                ((Section)master.Report.ReportDefinition.Sections["sDetailsInsuranceCosts"]).SectionFormat.EnableSuppress = false;
                ((Section)master.Report.ReportDefinition.Sections["sDetailBondingCosts"]).SectionFormat.EnableSuppress = false;
                ((Section)master.Report.ReportDefinition.Sections["sDetailOtherCosts"]).SectionFormat.EnableSuppress = false;
            }
        }