当前位置: 首页>>代码示例>>C#>>正文


C# ProjectGateway.GetProjectType方法代码示例

本文整理汇总了C#中LiquiForce.LFSLive.DA.Projects.Projects.ProjectGateway.GetProjectType方法的典型用法代码示例。如果您正苦于以下问题:C# ProjectGateway.GetProjectType方法的具体用法?C# ProjectGateway.GetProjectType怎么用?C# ProjectGateway.GetProjectType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LiquiForce.LFSLive.DA.Projects.Projects.ProjectGateway的用法示例。


在下文中一共展示了ProjectGateway.GetProjectType方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadGeneralData


//.........这里部分代码省略.........
                ddlClientSecondaryContactId.DataTextField = "Name";

                if (projectGateway.GetClientSecondaryContactID(int.Parse(hdfProjectId.Value)).HasValue)
                {
                    ddlClientSecondaryContactId.SelectedValue = projectGateway.GetClientSecondaryContactID(int.Parse(hdfProjectId.Value)).ToString();
                }
                else
                {
                    ddlClientSecondaryContactId.SelectedValue = "-1";
                }

                ddlClientSecondaryContactId.DataBind();

                // ... for resources
                // ...  ... for project lead
                EmployeeList employeeList = new EmployeeList();
                employeeList.LoadAndAddItem(-1, " ");
                ddlProjectLeadId.DataSource = employeeList.Table;
                ddlProjectLeadId.DataValueField = "EmployeeID";
                ddlProjectLeadId.DataTextField = "FullName";
                ddlProjectLeadId.SelectedValue = (projectGateway.GetProjectLeadID(int.Parse(hdfProjectId.Value)).HasValue) ? ((int)projectGateway.GetProjectLeadID(int.Parse(hdfProjectId.Value))).ToString() : "-1";
                ddlProjectLeadId.DataBind();

                // ... ... for salesman
                SalesmanListGateway salesmanListGateway = new SalesmanListGateway(new DataSet());
                salesmanListGateway.Load();
                ddlSalesmanId.DataSource = salesmanListGateway.Table;
                ddlSalesmanId.DataValueField = "SalesmanID";
                ddlSalesmanId.DataTextField = "FullName";
                ddlSalesmanId.SelectedValue = ((int)projectGateway.GetSalesmanID(int.Parse(hdfProjectId.Value))).ToString();
                ddlSalesmanId.DataBind();

                // ... ... for Pricing
                if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Ballpark")
                {
                    ProjectSaleBillingPricingGateway projectSaleBillingPricingGateway = new ProjectSaleBillingPricingGateway(projectTDS);

                    if (projectSaleBillingPricingGateway.Table.Rows.Count > 0)
                    {
                        tbxBillPrice.DataBind();
                        ddlBillMoney.DataBind();
                    }
                    else
                    {
                        if (projectGateway.GetCountryID(int.Parse(hdfProjectId.Value)) == 1)
                        {
                            ddlBillMoney.SelectedValue = "CAD";
                        }
                        else
                        {
                            ddlBillMoney.SelectedValue = "USD";
                        }
                    }
                }
            }

            cbxFairWageApplies.DataBind();

            // Data for unit budget tab
            ProjectNavigatorProjectUnitsBudgetGateway projectNavigatorProjectUnitsBudgetGateway = new ProjectNavigatorProjectUnitsBudgetGateway(projectNavigatorTDS);

            if (projectNavigatorProjectUnitsBudgetGateway.Table.Rows.Count > 0)
            {
                tbxUnitsBudget.Text = projectNavigatorProjectUnitsBudgetGateway.GetBudget(int.Parse(hdfProjectId.Value)).ToString("n2");
            }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:66,代码来源:project_edit.aspx.cs

示例2: PostPageChanges

        private void PostPageChanges()
        {
            ProjectGateway projectGateway = new ProjectGateway(projectTDS);
            int projectId = int.Parse(hdfProjectId.Value);

            // General Data
            Int64 countryId = projectGateway.GetCountryID(projectId);
            int officeId = projectGateway.GetOfficeID(projectId);
            Int64? provinceId = projectGateway.GetProvinceID(projectId);
            Int64? cityId = projectGateway.GetCityID(projectId);
            Int64? countyId = projectGateway.GetCountyID(projectId);
            int? projectLeadId = null; if ((ddlProjectLeadId.SelectedValue != "-1") && (ddlProjectLeadId.SelectedIndex > -1)) projectLeadId = int.Parse(ddlProjectLeadId.SelectedValue);
            int salesmanId = int.Parse(ddlSalesmanId.SelectedValue);
            string projectType = projectGateway.GetProjectType(projectId);
            string projectState = projectGateway.GetProjectState(projectId);
            string name = tbxName.Text.Trim();
            string description = tbxDescription.Text.Trim();
            DateTime? proposalDate = null; if (tkrdpProposalDate.SelectedDate.HasValue) proposalDate = tkrdpProposalDate.SelectedDate.Value;
            DateTime? startDate = null; if (tkrdpStartDate.SelectedDate.HasValue) startDate = tkrdpStartDate.SelectedDate.Value;
            DateTime? endDate = null; if (tkrdpEndDate.SelectedDate.HasValue) endDate = tkrdpEndDate.SelectedDate.Value;
            int clientId = projectGateway.GetClientID(projectId);
            string clientProjectNumber = tbxClientProjectNumber.Text.Trim();
            int? clientPrimaryContactId = null; if ((ddlClientPrimaryContactId.SelectedValue != "-1") && (ddlClientPrimaryContactId.SelectedIndex > -1)) clientPrimaryContactId = int.Parse(ddlClientPrimaryContactId.SelectedValue);
            int? clientSecondaryContactId = null; if ((ddlClientSecondaryContactId.SelectedValue != "-1") && (ddlClientSecondaryContactId.SelectedIndex > -1)) clientSecondaryContactId = int.Parse(ddlClientSecondaryContactId.SelectedValue);
            bool deleted = projectGateway.GetDeleted(projectId);
            int? libraryCategoriesId = null; if (projectGateway.GetLibraryCategoriesId(projectId).HasValue) libraryCategoriesId = (int)projectGateway.GetLibraryCategoriesId(projectId);
            bool fairWageApplies = cbxFairWageApplies.Checked;

            // ... Update Project Number
            Project project = new Project(projectTDS);
            string projectNumber;

            if (projectGateway.GetOriginalProjectID(projectId) == null)
            {
                projectNumber = project.UpdateProjectNumber(projectId, salesmanId);
            }
            else
            {
                projectNumber = projectGateway.GetProjectNumber(projectId);
            }

            // ... Update Project
            project.Update(projectId, countryId, officeId, projectLeadId, salesmanId, projectNumber, projectType, projectState, name, description, proposalDate, startDate, endDate, clientId, clientProjectNumber, clientPrimaryContactId, clientSecondaryContactId, deleted, libraryCategoriesId, provinceId, cityId, Int32.Parse(hdfCompanyId.Value.Trim()), countyId, fairWageApplies);

            // ... If project type is Ballpark update Bill Price and Bill Money
            if (projectType == "Ballpark")
            {
                ProjectSaleBillingPricing projectSaleBillingPricingForGeneralData = new ProjectSaleBillingPricing(projectTDS);

                decimal? billPrice = null; if (tbxBillPrice.Text != "") billPrice = Convert.ToDecimal(tbxBillPrice.Text);
                string billMoney = ddlBillMoney.SelectedValue;

                projectSaleBillingPricingForGeneralData.UpdateBillPrice(projectId, billPrice, billMoney);
            }

            if ((projectType != "Ballpark") && (projectType != "Internal"))
            {
                // Sale/Billing/Pricing
                //bool saleBidProject = cbxSaleBidProject.Checked;
                //bool saleRFP = cbxSaleRFP.Checked;
                //bool saleSoleSource = cbxSaleSoleSource.Checked;
                //bool saleTermContract = cbxSaleTermContract.Checked;
                //string saleTermContractDetail = tbxSaleTermContractDetail.Text.Trim();
                //bool saleOther = cbxSaleOther.Checked;
                //string saleOtherDetail = tbxSaleOtherDetail.Text.Trim();
                //int? saleGettingJob = null; if (tbxSaleGettingJob.Text.Trim() != "") saleGettingJob = int.Parse(tbxSaleGettingJob.Text.Trim());
                decimal? billPriceSaleBillingPricing = null; if (tbxBillPriceSaleBillingPricing.Text.Trim() != "") billPriceSaleBillingPricing = decimal.Parse(tbxBillPriceSaleBillingPricing.Text.Trim());
                string billMoneySaleBillingPricing = ddlBillMoneySaleBillingPricing.SelectedValue;
                decimal? billSubcontractorAmount = null; if (tbxBillSubcontractorAmount.Text.Trim() != "") billSubcontractorAmount = decimal.Parse(tbxBillSubcontractorAmount.Text.Trim());
                //string billBidHardDollar = tbxBillBidHardDollar.Text.Trim();
                //bool billPerUnit = cbxBillPerUnit.Checked;
                //bool billHourly = cbxBillHourly.Checked;
                //string billExpectExtras = tbxBillExpectExtras.Text.Trim();
                //bool chargesWater = cbxChargesWater.Checked;
                //decimal? chargesWaterAmount = null; if (tbxChargesWaterAmount.Text.Trim() != "") chargesWaterAmount = decimal.Parse(tbxChargesWaterAmount.Text.Trim());
                //bool chargesDisposal = cbxChargesDisposal.Checked;
                //decimal? chargesDisposalAmount = null; if (tbxChargesDisposalAmount.Text.Trim() != "") chargesDisposalAmount = decimal.Parse(tbxChargesDisposalAmount.Text.Trim());

                // ... Update Sale/Billing/Pricing
                ProjectSaleBillingPricing projectSaleBillingPricing = new ProjectSaleBillingPricing(projectTDS);
                //projectSaleBillingPricing.Update(projectId, saleBidProject, saleRFP, saleSoleSource, saleTermContract, saleTermContractDetail, saleOther, saleOtherDetail, saleGettingJob, billPriceSaleBillingPricing, billMoneySaleBillingPricing, billBidHardDollar, billPerUnit, billHourly, billExpectExtras, billSubcontractorAmount, chargesWater, chargesWaterAmount, chargesDisposal, chargesDisposalAmount, Int32.Parse(hdfCompanyId.Value.Trim()));
                projectSaleBillingPricing.Update(projectId, billPriceSaleBillingPricing, billMoneySaleBillingPricing, billSubcontractorAmount, Int32.Parse(hdfCompanyId.Value.Trim()));

                // ... Update job info
                bool typeOfWorkMhRehab = ckbxMhRehab.Checked;
                bool typeOfWorkJunctionLining = ckbxJunctionLining.Checked;
                bool typeOfWorkProjectManagement = ckbxProjectManagement.Checked;
                bool typeOfWorkFullLenghtLining = ckbxFullLengthLining.Checked;
                bool typeOfWorkPointRepairs = ckbxPointRepairs.Checked;
                bool typeOfWorkRehabAssessment = ckbxRehabAssessment.Checked;
                bool typeOfWorkGrout = ckbxGrout.Checked;
                bool typeOfWorkOther = ckbxOther.Checked;
                bool agreement = cbxSubcontractorAgreement.Checked;
                bool writtenQuote = cbxSubcontractorWrittenQuote.Checked;
                string role = tbxSubcontractorRole.Text;

                ProjectNavigatorProjectJobInfo projectNavigatorProjectJobInfo = new ProjectNavigatorProjectJobInfo(projectNavigatorTDS);
                projectNavigatorProjectJobInfo.Update(projectId, typeOfWorkMhRehab, typeOfWorkJunctionLining, typeOfWorkProjectManagement, typeOfWorkFullLenghtLining, typeOfWorkPointRepairs, typeOfWorkRehabAssessment, typeOfWorkGrout, typeOfWorkOther, agreement, writtenQuote, role);

                // Costing Updates
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:project_edit.aspx.cs

示例3: Page_PreRender

        protected void Page_PreRender(object sender, EventArgs e)
        {
            // Set ddlTools
            DropDownList ddlTools = (DropDownList)tkrpbLeftMenuCurrentProject.FindItemByValue("Tools").FindControl("ddlTools");
            ddlTools.Attributes.Add("onchange", "return OpenTools(this);");

            // Set active toolbar
            mForm6 master = (mForm6)this.Master;
            master.ActiveToolbar = "Projects";

            lblHeaderTitle.Text = "Project Sections";

            // Project type check
            ProjectGateway projectGateway = new ProjectGateway();
            projectGateway.LoadByProjectId(Int32.Parse(hdfProjectId.Value));

            if (projectGateway.GetProjectType(Int32.Parse(hdfProjectId.Value)) == "Proposal")
            {
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Proposal";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Proposal";

                lblTitleProject.Text = " > Proposal: ";

                tkrpbLeftMenuCurrentProject.Items[0].Items[3].Visible = false; //mSections
                tkrpbLeftMenuCurrentProject.Items[0].Items[4].Visible = false; //mTools
                tkrpbLeftMenuCurrentProject.Items[0].Items[5].Visible = false; //mSeparator
            }

            if (projectGateway.GetProjectType(Int32.Parse(hdfProjectId.Value)) == "Project")
            {
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Project";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Project";

                lblTitleProject.Text = " > Project: ";
            }

            if (projectGateway.GetProjectType(Int32.Parse(hdfProjectId.Value)) == "Internal")
            {
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Internal Project";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Internal Project";

                lblTitleProject.Text = " > Internal Project: ";

                tkrpbLeftMenuCurrentProject.Items[0].Items[3].Visible = false; //mSections
                tkrpbLeftMenuCurrentProject.Items[0].Items[4].Visible = false; //mTools
                tkrpbLeftMenuCurrentProject.Items[0].Items[5].Visible = false; //mSeparator
            }

            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Ballpark")
            {
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Ballpark";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Ballpark";

                lblTitleProject.Text = " > Ballpark: ";

                tkrpbLeftMenuCurrentProject.Items[0].Items[3].Visible = false; //mSections
                tkrpbLeftMenuCurrentProject.Items[0].Items[4].Visible = false; //mTools
                tkrpbLeftMenuCurrentProject.Items[0].Items[5].Visible = false; //mSeparator
            }

            // Security check
            if (!Convert.ToBoolean(Session["sgLFS_PROJECTS_ADMIN"]))
            {
                tkrpbLeftMenuReports.Visible = false;
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:66,代码来源:project_sections_navigator2.aspx.cs

示例4: Page_PreRender

        protected void Page_PreRender(object sender, EventArgs e)
        {
            // Reload data for work and functions depending if it's faire wage or not.
            grdTypeOfWorkFunctionClassification.DataBind();

            // Security check
            ProjectGateway projectGateway = new ProjectGateway(projectTDS);

            if (!Convert.ToBoolean(Session["sgLFS_PROJECTS_ADMIN"]))
            {
                // ... menu reports
                tkrpbLeftMenuReports.Visible = false;

                // ... for job info tab
                tpJobInfo.Enabled = true;

                // ... for values that comes from sales billing pricing tab
                //tpSaleBillingPricing.Enabled = false;
                upnlSaleBillingPricingValues.Visible = false;
                upnlSaleBillingPricingValues1.Visible = false;

                // ... for values that comes from costing updates
                //tpCostingUpdates.Enabled = false;
            }
            else
            {
                // ... menu reports
                tkrpbLeftMenuReports.Visible = true;

                // ... for job info tab
                tpJobInfo.Enabled = true;

                // ... for values that comes from sales billing pricing
                //tpSaleBillingPricing.Enabled = true;
                upnlSaleBillingPricingValues.Visible = true;
                upnlSaleBillingPricingValues1.Visible = true;

                // ... for values that comes from costing updates
                //tpCostingUpdates.Enabled = true;
            }

            // Country check
            if (projectGateway.GetCountryID(int.Parse(hdfProjectId.Value)) == 1)
            {
                //ddlGeneralMOLForm.Visible = true;
                //tbxGeneralMOLForm.Visible = false;
                //lblGeneralNoticeProject.Visible = true;
                //rbtnGeneralNoticeProject.Visible = true;
                //lblGeneralForm1000.Visible = true;
                //rbtnGeneralForm1000.Visible = true;

                grdJobClassClassification.Columns[4].HeaderText = "Rate (CAD)";
                grdJobClassClassification.Columns[5].HeaderText = "Fringe Rate (CAD)";
            }
            else
            {
                //ddlGeneralMOLForm.Visible = false;
                //tbxGeneralMOLForm.Visible = true;
                //lblGeneralNoticeProject.Visible = false;
                //rbtnGeneralNoticeProject.Visible = false;
                //lblGeneralForm1000.Visible = false;
                //rbtnGeneralForm1000.Visible = false;

                grdJobClassClassification.Columns[4].HeaderText = "Rate (USD)";
                grdJobClassClassification.Columns[5].HeaderText = "Fringe Rate (USD)";
            }

            // Set active toolbar
            mForm6 master = (mForm6)this.Master;
            master.ActiveToolbar = "Projects";

            // Project type check
            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Ballpark")
            {
                // Active Tab
                tcDetailedInformation.ActiveTabIndex = 1;

                // Left menu
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Ballpark";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Ballpark";
                tkrpbLeftMenuCurrentProject.Items[0].Items[2].Visible = false; //mSeparator
                tkrpbLeftMenuCurrentProject.Items[0].Items[3].Visible = false; //mSections

                lblHeaderTitle.Text = "Ballpark Summary";
                lblTitleProject.Text = " > Ballpark: ";

                // Initial section
                lblProposalDate.Text = "Ballpark Date";
                lblStartDate.Text = "Potential Start Date";
                lblEndDate.Text = "Potential End Date";
                lblStartDate.Visible = true;
                tkrdpStartDate.Visible = true;
                lblEndDate.Visible = true;
                tkrdpEndDate.Visible = true;

                // Client section
                lblClientProjectNumber.Visible = false;
                tbxClientProjectNumber.Visible = false;
                lblClientPrimaryContactId.Visible = false;
                ddlClientPrimaryContactId.Visible = false;
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:project_edit.aspx.cs

示例5: Page_PreRender


//.........这里部分代码省略.........
                    grdUnits.Columns[13].Visible = false;
                    grdUnits.Columns[14].Visible = true;
                    grdUnits.Columns[15].Visible = true;

                    grdSubcontractors.Columns[9].Visible = false;
                    grdSubcontractors.Columns[10].Visible = false;
                    grdSubcontractors.Columns[11].Visible = true;
                    grdSubcontractors.Columns[12].Visible = true;

                    // Materials grid
                    grdMaterials.Columns[10].Visible = false;
                    grdMaterials.Columns[11].Visible = false;
                    grdMaterials.Columns[12].Visible = true;
                    grdMaterials.Columns[13].Visible = true;

                    // Other costs
                    grdOtherCosts.Columns[9].Visible = false;
                    grdOtherCosts.Columns[10].Visible = false;
                    grdOtherCosts.Columns[11].Visible = true;
                    grdOtherCosts.Columns[12].Visible = true;

                    // Totals
                    lblGrandTotalCost.Text = "Total Cost (USD) : ";
                    tbxTotalCostCad.Visible = false;
                    tbxTotalCostUsd.Visible = true;

                    lblTeamMembersTotalCost.Text = "Total Cost (USD) : ";
                    tbxTeamMembersTotalCostCAD.Visible = false;
                    tbxTeamMembersTotalCostUSD.Visible = true;

                    lblUnitsTotalCosts.Text = "Total Cost (USD) : ";
                    tbxUnitsTotalCostsCAD.Visible = false;
                    tbxUnitsTotalCostsUSD.Visible = true;

                    lblSubcontractorsTotalCosts.Text = "Total Cost (USD) : ";
                    tbxSubcontractorsTotalCostsCAD.Visible = false;
                    tbxSubcontractorsTotalCostsUSD.Visible = true;

                    lblMaterialsTotalCosts.Text = "Total Cost (USD) : ";
                    tbxMaterialsTotalCostsCAD.Visible = false;
                    tbxMaterialsTotalCostsUSD.Visible = true;

                    lblOtherCostsTotalCosts.Text = "Total Cost (USD) : ";
                    tbxOtherCostsTotalCostsCAD.Visible = false;
                    tbxOtherCostsTotalCostsUSD.Visible = true;

                    lblGrandTotal.Text = "Grand Total (USD)";
                }
            }

            if (projectGateway.GetProjectType(Int32.Parse(hdfProjectId.Value)) == "Proposal")
            {
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Proposal";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Proposal";

                lblTitleProject.Text = " > Proposal: ";

                tkrpbLeftMenuCurrentProject.Items[0].Items[3].Visible = false; //mSections
                tkrpbLeftMenuCurrentProject.Items[0].Items[4].Visible = false; //mTools
                tkrpbLeftMenuCurrentProject.Items[0].Items[5].Visible = false; //mSeparator
            }

            if (projectGateway.GetProjectType(Int32.Parse(hdfProjectId.Value)) == "Project")
            {
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Project";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Project";

                lblTitleProject.Text = " > Project: ";
            }

            if (projectGateway.GetProjectType(Int32.Parse(hdfProjectId.Value)) == "Internal")
            {
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Internal Project";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Internal Project";

                lblTitleProject.Text = " > Internal Project: ";

                tkrpbLeftMenuCurrentProject.Items[0].Items[3].Visible = false; //mSections
                tkrpbLeftMenuCurrentProject.Items[0].Items[4].Visible = false; //mTools
                tkrpbLeftMenuCurrentProject.Items[0].Items[5].Visible = false; //mSeparator
            }

            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Ballpark")
            {
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Ballpark";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Ballpark";

                lblTitleProject.Text = " > Ballpark: ";

                tkrpbLeftMenuCurrentProject.Items[0].Items[3].Visible = false; //mSections
                tkrpbLeftMenuCurrentProject.Items[0].Items[4].Visible = false; //mTools
                tkrpbLeftMenuCurrentProject.Items[0].Items[5].Visible = false; //mSeparator
            }

            // Security check
            if (!Convert.ToBoolean(Session["sgLFS_PROJECTS_ADMIN"]))
            {
                tkrpbLeftMenuReports.Visible = false;
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:project_combined_costing_sheets_edit.aspx.cs

示例6: Generate

        private void Generate()
        {
            mReport1 master = (mReport1)this.Master;
            int projectId = Int32.Parse(Request.QueryString["project_id"]);

            // Get Data
            // ... For SubContractorName
            int companyId = Int32.Parse(hdfCompanyId.Value);

            LiquiForce.LFSLive.BL.Projects.Projects.ProjectSynopsisReport projectSynopsisReport = new LiquiForce.LFSLive.BL.Projects.Projects.ProjectSynopsisReport();
            projectSynopsisReport.Load(projectId, companyId);

            ProjectGateway projectGateway = new ProjectGateway();
            projectGateway.LoadByProjectId(projectId);

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

            // Get report
            if (projectSynopsisReport.Table.Rows.Count > 0)
            {
                if (master.Format == "pdf")
                {
                    master.Report = new ProjectSynopsisReport();

                    // Report format
                    master.Report.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
                    master.Report.PrintOptions.PaperSize = PaperSize.PaperLegal;

                    // Security check
                    if (!Convert.ToBoolean(Session["sgLFS_PROJECTS_ADMIN"]))
                    {
                        ((Section)master.Report.ReportDefinition.Sections["SaleBillingPricingDetails1Section"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["SaleBillingPricingDetails2Section"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["SaleBillingPricingDetails3Section"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["SaleBillingPricingDetails4Section"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["SaleBillingPricingDetails5Section"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["SaleBillingPricingDetails6Section"]).SectionFormat.EnableSuppress = true;

                        ((Section)master.Report.ReportDefinition.Sections["ServicesDetailSection1"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ServicesDetailsSection"]).SectionFormat.EnableSuppress = true;

                        ((Section)master.Report.ReportDefinition.Sections["ServicesTotalAveragePriceDetailsSection"]).SectionFormat.EnableSuppress = true;

                        ReportObject subServiceReport = master.Report.ReportDefinition.ReportObjects["subService"];
                        ReportDocument ee = master.Report.OpenSubreport(subServiceReport.Name);
                        ((Section)ee.ReportDefinition.Sections["ServicesAveragePriceDetailsSection"]).SectionFormat.EnableSuppress = true;
                    }

                    if (projectGateway.GetProjectType(projectId) == "Ballpark")
                    {
                        // ... Header of Ballpark
                        ((Section)master.Report.ReportDefinition.Sections["ReportHeaderProjectProposal"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ReportHeaderBallpark"]).SectionFormat.EnableSuppress = false;
                        ((Section)master.Report.ReportDefinition.Sections["ReportHeaderInternalProjects"]).SectionFormat.EnableSuppress = true;

                        // ... Hide Section
                        ((Section)master.Report.ReportDefinition.Sections["ContactInfoDetailSection1"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ContactInfoDetailSection2"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ContactInfoDetailSection3"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ContactInfoDetailSection4"]).SectionFormat.EnableSuppress = true;

                        ((Section)master.Report.ReportDefinition.Sections["ChargesDetailSection1"]).SectionFormat.EnableSuppress = true;

                        ((Section)master.Report.ReportDefinition.Sections["ServicesDetailSection1"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ServicesTotalAveragePriceDetailsSection"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ServicesDetailsSection"]).SectionFormat.EnableSuppress = true;

                        ((Section)master.Report.ReportDefinition.Sections["TermsPurchaseOrderDetailSection1"]).SectionFormat.EnableSuppress = true;

                        ((Section)master.Report.ReportDefinition.Sections["ClientLfsRelationshipDetailSection1"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ClientLfsRelationshipDetailSection2"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ClientLfsRelationshipDetailSection3"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ClientLfsRelationshipDetailSection4"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ClientLfsRelationshipDetailSection5"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ClientLfsRelationshipDetailSection6"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["ClientLfsRelationshipDetailSection7"]).SectionFormat.EnableSuppress = true;

                        ((Section)master.Report.ReportDefinition.Sections["PurchaseOrderDetailSection1"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["PurchaseOrderDetailSection2"]).SectionFormat.EnableSuppress = true;

                        ((Section)master.Report.ReportDefinition.Sections["TechnicalDetailSection1"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["TechnicalDetailSection2"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["TechnicalDetailSection3"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["TechnicalDetailSection4"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["TechnicalDetailSection5"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["TechnicalDetailSection6"]).SectionFormat.EnableSuppress = true;

                        ((Section)master.Report.ReportDefinition.Sections["EngineerSubcontractorsDetailSection1"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["subContractorsDetailSection1"]).SectionFormat.EnableSuppress = true;

                        ((Section)master.Report.ReportDefinition.Sections["SaleBillingPricingDetails1Section"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["SaleBillingPricingDetails2Section"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["SaleBillingPricingDetails3Section"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["SaleBillingPricingDetails4Section"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["SaleBillingPricingDetails5Section"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["SaleBillingPricingDetails6Section"]).SectionFormat.EnableSuppress = true;

                        // Security check
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:project_synopsis_report.aspx.cs

示例7: LoadGeneralData


//.........这里部分代码省略.........
            // ... ... for primary contact
            if (projectGateway.GetClientPrimaryContactID(int.Parse(hdfProjectId.Value)).HasValue)
            {
                hdfClientPrimaryContactID.Value = ((int)projectGateway.GetClientPrimaryContactID(int.Parse(hdfProjectId.Value))).ToString();
                ContactsGateway contactsGatewayForPrimaryContact = new ContactsGateway();
                contactsGatewayForPrimaryContact.LoadAllByContactId(int.Parse(hdfClientPrimaryContactID.Value), companyId);
                tbxClientPrimaryContact.Text = contactsGatewayForPrimaryContact.GetCompleteName(int.Parse(hdfClientPrimaryContactID.Value));
            }

            // ... ... for secondary contact
            if (projectGateway.GetClientSecondaryContactID(int.Parse(hdfProjectId.Value)).HasValue)
            {
                hdfClientSecondaryContactID.Value = ((int)projectGateway.GetClientSecondaryContactID(int.Parse(hdfProjectId.Value))).ToString();
                ContactsGateway contactsGatewayForSecondaryContact = new ContactsGateway();
                contactsGatewayForSecondaryContact.LoadAllByContactId(int.Parse(hdfClientSecondaryContactID.Value), companyId);
                tbxClientSecondaryContact.Text = contactsGatewayForSecondaryContact.GetCompleteName(int.Parse(hdfClientSecondaryContactID.Value));
            }

            // ... for resources
            // ... ... for project lead
            if (projectGateway.GetProjectLeadID(int.Parse(hdfProjectId.Value)).HasValue)
            {
                EmployeeGateway employeeGateway = new EmployeeGateway();
                employeeGateway.LoadByEmployeeId((int)projectGateway.GetProjectLeadID(int.Parse(hdfProjectId.Value)));
                tbxProjectLead.Text = employeeGateway.GetFullName((int)projectGateway.GetProjectLeadID(int.Parse(hdfProjectId.Value)));
            }

            // ... ... for salesman
            SalesmanGateway salesmanGateway = new SalesmanGateway();
            salesmanGateway.LoadExpandedBySalesmanId(projectGateway.GetSalesmanID(int.Parse(hdfProjectId.Value)));
            tbxSalesman.Text = salesmanGateway.GetFullName(projectGateway.GetSalesmanID(int.Parse(hdfProjectId.Value)));

            // ... ... for Pricing
            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Ballpark")
            {
                ProjectSaleBillingPricingGateway projectSaleBillingPricingGateway = new ProjectSaleBillingPricingGateway(projectTDS);

                if (projectSaleBillingPricingGateway.Table.Rows.Count > 0)
                {
                    if (projectSaleBillingPricingGateway.GetBillPrice(int.Parse(hdfProjectId.Value)).HasValue) tbxBillPrice.Text = ((decimal)projectSaleBillingPricingGateway.GetBillPrice(int.Parse(hdfProjectId.Value))).ToString("n2");
                    tbxBillMoney.Text = projectSaleBillingPricingGateway.GetBillMoney(int.Parse(hdfProjectId.Value));
                }
                else
                {
                    if (projectGateway.GetCountryID(int.Parse(hdfProjectId.Value)) == 1)
                    {
                        tbxBillMoney.Text = "CAD";
                    }
                    else
                    {
                        tbxBillMoney.Text = "USD";
                    }
                }
            }

            // Data for unit budget tab
            ProjectNavigatorProjectUnitsBudgetGateway projectNavigatorProjectUnitsBudgetGateway = new ProjectNavigatorProjectUnitsBudgetGateway(projectNavigatorTDS);

            if (projectNavigatorProjectUnitsBudgetGateway.Table.Rows.Count > 0)
            {
                tbxUnitsBudget.Text = projectNavigatorProjectUnitsBudgetGateway.GetBudget(int.Parse(hdfProjectId.Value)).ToString("n2");
            }

            // Data for materials budget tab
            ProjectNavigatorProjectMaterialsBudgetGateway projectNavigatorProjectMaterialsBudgetGateway = new ProjectNavigatorProjectMaterialsBudgetGateway(projectNavigatorTDS);
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:66,代码来源:project_summary.aspx.cs

示例8: Page_PreRender

        protected void Page_PreRender(object sender, EventArgs e)
        {
            ProjectGateway projectGateway = new ProjectGateway(projectTDS);

            // Set active toolbar
            mForm6 master = (mForm6)this.Master;
            master.ActiveToolbar = "Projects";

            // Security check
            if (!Convert.ToBoolean(Session["sgLFS_PROJECTS_ADMIN"]))
            {
                // ... menu reports
                tkrpbLeftMenuReports.Visible = false;

                // ... for job info tab
                tpJobInfo.Enabled = true;

                // ... for values that comes from sales billing pricing tab
                //tpSaleBillingPricing.Enabled = false;
                upnlSaleBillingPricingValues.Visible = false;
                upnlSaleBillingPricingValues1.Visible = false;

                // ... for values that comes from costing updates
                //tpCostingUpdates.Enabled = false;
            }
            else
            {
                // ... menu reports
                tkrpbLeftMenuReports.Visible = true;

                // ... for job info tab
                tpJobInfo.Enabled = true;

                // ... for values that comes from sales billing pricing
                //tpSaleBillingPricing.Enabled = true;
                upnlSaleBillingPricingValues.Visible = true;
                upnlSaleBillingPricingValues1.Visible = true;

                // ... for values that comes from costing updates
                //tpCostingUpdates.Enabled = true;
            }

            // Country check
            if (projectGateway.GetCountryID(int.Parse(hdfProjectId.Value)) == 1)
            {
                //lblGeneralNoticeProject.Visible = true;
                //rbtnGeneralNoticeProject.Visible = true;
                //lblGeneralForm1000.Visible = true;
                //rbtnGeneralForm1000.Visible = true;

                grdJobClassClassification.Columns[4].HeaderText = "Rate (CAD)";
                grdJobClassClassification.Columns[5].HeaderText = "Fringe Rate (CAD)";
            }
            else
            {
                //lblGeneralNoticeProject.Visible = false;
                //rbtnGeneralNoticeProject.Visible = false;
                //lblGeneralForm1000.Visible = false;
                //rbtnGeneralForm1000.Visible = false;

                grdJobClassClassification.Columns[4].HeaderText = "Rate (USD)";
                grdJobClassClassification.Columns[5].HeaderText = "Fringe Rate (USD)";
            }

            // Project type check
            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Ballpark")
            {
                // Active Tab
                tcDetailedInformation.ActiveTabIndex = 1;

                // Left menu
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Ballpark";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Ballpark";
                tkrpbLeftMenuCurrentProject.Items[0].Items[2].Visible = false; //mSeparator
                tkrpbLeftMenuCurrentProject.Items[0].Items[3].Visible = false; //mSections

                // Top Menu
                tkrmTop.Items[1].Visible = false;
                tkrmTop.Items[2].Visible = false;
                tkrmTop.Items[3].Visible = false;
                tkrmTop.Items[4].Visible = true;

                lblHeaderTitle.Text = "Ballpark Summary";
                lblTitleProject.Text = " > Ballpark: ";

                // Initial section
                lblProposalDate.Text = "Ballpark Date";
                lblStartDate.Text = "Potential Start Date";
                lblEndDate.Text = "Potential End Date";
                lblStartDate.Visible = true;
                tbxStartDate.Visible = true;
                lblEndDate.Visible = true;
                tbxEndDate.Visible = true;

                // Client section
                lblClientProjectNumber.Visible = false;
                tbxClientProjectNumber.Visible = false;
                lblClientPrimaryContactId.Visible = false;
                tbxClientPrimaryContact.Visible = false;
                btnClientPrimaryContact.Visible = false;
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:project_summary.aspx.cs

示例9: Page_PreRender

        protected void Page_PreRender(object sender, EventArgs e)
        {
            // Set active toolbar
            mForm6 master = (mForm6)this.Master;
            master.ActiveToolbar = "Projects";

            // Security check
            if (!Convert.ToBoolean(Session["sgLFS_PROJECTS_ADMIN"]))
            {
                tkrpbLeftMenuReports.Visible = false;
            }

            int projectId = Int32.Parse(hdfProjectId.Value);
            ProjectGateway projectGateway = new ProjectGateway();
            projectGateway.LoadByProjectId(projectId);

            if (projectGateway.GetProjectType(Int32.Parse(hdfProjectId.Value)) == "Proposal")
            {
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Proposal";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Proposal";

                lblTitleProject.Text = " > Proposal: ";

                tkrpbLeftMenuCurrentProject.Items[0].Items[3].Visible = false; //mSections
                tkrpbLeftMenuCurrentProject.Items[0].Items[4].Visible = false; //mTools
                tkrpbLeftMenuCurrentProject.Items[0].Items[5].Visible = false; //mSeparator
            }

            if (projectGateway.GetProjectType(Int32.Parse(hdfProjectId.Value)) == "Project")
            {
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Project";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Project";

                lblTitleProject.Text = " > Project: ";
            }

            if (projectGateway.GetProjectType(Int32.Parse(hdfProjectId.Value)) == "Internal")
            {
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Internal Project";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Internal Project";

                lblTitleProject.Text = " > Internal Project: ";

                tkrpbLeftMenuCurrentProject.Items[0].Items[3].Visible = false; //mSections
                tkrpbLeftMenuCurrentProject.Items[0].Items[4].Visible = false; //mTools
                tkrpbLeftMenuCurrentProject.Items[0].Items[5].Visible = false; //mSeparator
            }

            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Ballpark")
            {
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Ballpark";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Ballpark";

                lblTitleProject.Text = " > Ballpark: ";

                tkrpbLeftMenuCurrentProject.Items[0].Items[3].Visible = false; //mSections
                tkrpbLeftMenuCurrentProject.Items[0].Items[4].Visible = false; //mTools
                tkrpbLeftMenuCurrentProject.Items[0].Items[5].Visible = false; //mSeparator
            }

            // Security check
            if (!Convert.ToBoolean(Session["sgLFS_PROJECTS_ADMIN"]))
            {
                tkrpbLeftMenuReports.Visible = false;
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:66,代码来源:project_costing_sheets_navigator.aspx.cs

示例10: Page_PreRender

        protected void Page_PreRender(object sender, EventArgs e)
        {
            // Set active toolbar
            mForm6 master = (mForm6)this.Master;
            master.ActiveToolbar = "Projects";

            // Project type check
            ProjectGateway projectGateway = new ProjectGateway(projectTDS);
            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Proposal")
            {
                lblHeaderTitle.Text = "Delete Proposal";
                lblTitleProject.Text = " > Proposal: ";
            }

            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Project")
            {
                lblHeaderTitle.Text = "Delete Project";
                lblTitleProject.Text = " > Project: ";
            }

            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Internal")
            {
                lblHeaderTitle.Text = "Delete Internal Project";
                lblTitleProject.Text = " > Internal Project: ";
            }

            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Ballpark")
            {
                lblHeaderTitle.Text = "Delete Ballpark";
                lblTitleProject.Text = " > Ballpark: ";
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:32,代码来源:project_delete.aspx.cs

示例11: Page_PreRender

        protected void Page_PreRender(object sender, EventArgs e)
        {
            // Set active toolbar
            mForm6 master = (mForm6)this.Master;
            master.ActiveToolbar = "Projects";

            // Project type check
            ProjectGateway projectGateway = new ProjectGateway(projectTDS);
            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Ballpark")
            {
                lblHeaderTitle.Text = "Ballpark State";
                lblTitleProject.Text = " > Ballpark: ";
            }
            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Proposal")
            {
                lblHeaderTitle.Text = "Proposal State";
                lblTitleProject.Text = " > Proposal: ";
            }

            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Project")
            {
                lblHeaderTitle.Text = "Project State";
                lblTitleProject.Text = " > Project: ";
            }

            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Internal")
            {
                lblHeaderTitle.Text = "Internal Project State";
                lblTitleProject.Text = " > Internal Project: ";
            }

            // Operation check
            switch ((string)Request.QueryString["state"])
            {
                //Proposal
                case "proposal_award":
                    // ...Proposal
                    tkrmTop.Items[0].Visible = true; //Award
                    tkrmTop.Items[1].Visible = false;//Lost Bid
                    tkrmTop.Items[2].Visible = false;//Cancel
                    tkrmTop.Items[3].Visible = false;//Bidding
                    tkrmTop.Items[4].Visible = false;//Unpromote
                    tkrmTop.Items[5].Visible = false;//Promote

                    // ...Project
                    tkrmTop.Items[6].Visible = false;//Waiting
                    tkrmTop.Items[7].Visible = false;//Active
                    tkrmTop.Items[8].Visible = false;//Inactive
                    tkrmTop.Items[9].Visible = false;//Complete
                    tkrmTop.Items[10].Visible = false;//Cancel
                    tkrmTop.Items[11].Visible = false;//Unpromote to ballpark
                    tkrmTop.Items[12].Visible = false;//Unpromote to proposal
                    tkrmTop.Items[13].Visible = false;//Tag as Internal

                    // ... Internal Project
                    tkrmTop.Items[14].Visible = false;//Active
                    tkrmTop.Items[15].Visible = false;//Complete
                    tkrmTop.Items[16].Visible = false;//Cancel
                    tkrmTop.Items[17].Visible = false;//Promote to proposal
                    tkrmTop.Items[18].Visible = false;//Promote to Project

                    // ... Ballpark Project
                    tkrmTop.Items[19].Visible = false;//Active
                    tkrmTop.Items[20].Visible = false;//Cancel
                    tkrmTop.Items[21].Visible = false;//Promote to proposal
                    tkrmTop.Items[22].Visible = false;//Promote to Project

                    // ...Cancel
                    tkrmTop.Items[23].Visible = true;
                    break;

                case "proposal_lost_bid":
                    // ...Proposal
                    tkrmTop.Items[0].Visible = false; //Award
                    tkrmTop.Items[1].Visible = true;//Lost Bid
                    tkrmTop.Items[2].Visible = false;//Cancel
                    tkrmTop.Items[3].Visible = false;//Bidding
                    tkrmTop.Items[4].Visible = false;//Unpromote
                    tkrmTop.Items[5].Visible = false;//Promote

                    // ...Project
                    tkrmTop.Items[6].Visible = false;//Waiting
                    tkrmTop.Items[7].Visible = false;//Active
                    tkrmTop.Items[8].Visible = false;//Inactive
                    tkrmTop.Items[9].Visible = false;//Complete
                    tkrmTop.Items[10].Visible = false;//Cancel
                    tkrmTop.Items[11].Visible = false;//Unpromote to ballpark
                    tkrmTop.Items[12].Visible = false;//Unpromote to proposal
                    tkrmTop.Items[13].Visible = false;//Tag as Internal

                    // ... Internal Project
                    tkrmTop.Items[14].Visible = false;//Active
                    tkrmTop.Items[15].Visible = false;//Complete
                    tkrmTop.Items[16].Visible = false;//Cancel
                    tkrmTop.Items[17].Visible = false;//Promote to proposal
                    tkrmTop.Items[18].Visible = false;//Promote to Project

                    // ... Ballpark Project
                    tkrmTop.Items[19].Visible = false;//Active
                    tkrmTop.Items[20].Visible = false;//Cancel
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:project_state.aspx.cs

示例12: UpdateState

        private void UpdateState()
        {
            ProjectGateway projectGateway = new ProjectGateway(projectTDS);
            int projectId = int.Parse(hdfProjectId.Value);
            projectGateway.LoadByProjectId(projectId);

            Int64 countryId = projectGateway.GetCountryID(projectId);
            int officeId = projectGateway.GetOfficeID(projectId);
            Int64? provinceId = projectGateway.GetProvinceID(projectId);
            Int64? cityId = projectGateway.GetCityID(projectId);
            Int64? countyId = projectGateway.GetCountyID(projectId);
            int? projectLeadId = projectGateway.GetProjectLeadID(projectId);
            int salesmanId = projectGateway.GetSalesmanID(projectId);
            string projectType = projectGateway.GetProjectType(projectId);
            string projectState = null;

            switch ((string)Request.QueryString["state"])
            {
                //Proposal
                case "proposal_award":
                    projectState = "Awarded";
                    break;

                case "proposal_lost_bid":
                    projectState = "Lost Bid";
                    break;

                case "proposal_cancel":
                    projectState = "Canceled";
                    break;

                case "proposal_bidding":
                    projectState = "Bidding";
                    break;

                case "proposal_unpromote_to_ballpark":
                    projectState = "Active";
                    projectType = "Ballpark";
                    break;

                case "proposal_promote_to_project":
                    projectState = "Active";
                    projectType = "Project";
                    break;

                //Project
                case "project_waiting":
                    projectState = "Waiting";
                    break;

                case "project_activate":
                    projectState = "Active";
                    break;

                case "project_inactivate":
                    projectState = "Inactive";
                    break;

                case "project_complete":
                    projectState = "Complete";
                    break;

                case "project_cancel":
                    projectState = "Canceled";
                    break;

                case "project_unpromote_to_ballpark":
                    projectState = "Active";
                    projectType = "Ballpark";
                    break;

                case "project_unpromote_to_proposal":
                    projectState = "Awarded";
                    projectType = "Proposal";
                    break;

                case "project_tagAsInternal":
                    projectState = "Active";
                    projectType = "Internal";
                    break;

                //Internal Project
                case "internalProject_activate":
                    projectState = "Active";
                    break;

                case "internalProject_complete":
                    projectState = "Complete";
                    break;

                case "internalProject_cancel":
                    projectState = "Canceled";
                    break;

                case "internalProject_promote_to_proposal":
                    projectState = "Awarded";
                    projectType = "Proposal";
                    break;

                case "internalProject_promote_to_project":
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:project_state.aspx.cs

示例13: cvProject_ServerValidate

        protected void cvProject_ServerValidate(object source, ServerValidateEventArgs args)
        {
            ProjectGateway projectGateway = new ProjectGateway();
            projectGateway.LoadByProjectId(Convert.ToInt32(ddlProject.SelectedValue));

            if (projectGateway.GetProjectState(Convert.ToInt32(ddlProject.SelectedValue)) != "Active")
            {
                if (projectGateway.GetProjectType(Convert.ToInt32(ddlProject.SelectedValue)) != "Ballpark")
                {
                    cvProject.ErrorMessage = "Please select an active project or an active internal project";
                }

                if (projectGateway.GetProjectType(Convert.ToInt32(ddlProject.SelectedValue)) == "Ballpark")
                {
                    cvProject.ErrorMessage = "Please select an active ballpark";
                }

                args.IsValid = false;
            }
            else
            {
                args.IsValid = true;
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:24,代码来源:timesheet_team.aspx.cs


注:本文中的LiquiForce.LFSLive.DA.Projects.Projects.ProjectGateway.GetProjectType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。