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


C# ProjectGateway.GetProjectState方法代码示例

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


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

示例1: 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

示例2: Page_PreRender


//.........这里部分代码省略.........
                upnlSaleBillingPricingValues1.Visible = true;

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

                // ... for values that comes from terms po
                //tpTermsPo.Enabled = true;
                upnlTermsPO.Visible = true;
                upnlTermsPO1.Visible = true;
                upnlTermsPO2.Visible = true;
                upnlTermsPO3.Visible = true;

                // ... for values that comes from technical
                //tpTechnical.Enabled = true;
                upnlTechnical.Visible = true;

                // ... for values that comes from engineer subcontractors
                // tpEngineerSubcontractors.Enabled = true;
                // Subcontractor section
                // lblNoResults.Text = "Sub-Contractors are not defined for this proposal";
                upnlEngineerSubcontractors.Visible = true;
                upnlEngineerSubcontractors1.Visible = true;
                upnlEngineerSubcontractors2.Visible = true;
                upnlEngineerSubcontractors3.Visible = true;
                upnlEngineerSubcontractors4.Visible = true;
                upnlEngineerSubcontractors5.Visible = true;
                upnlEngineerSubcontractors6.Visible = true;
                upnlEngineerSubcontractors7.Visible = true;

                // ... for values that comes from cost exceptions
                //tpCostExceptions.Enabled = false;
                pnlCostsExceptions.Visible = false;

                if ((projectGateway.GetProjectState(int.Parse(hdfProjectId.Value)) == "Awarded") || (projectGateway.GetProjectState(int.Parse(hdfProjectId.Value)) == "Bidding"))
                {
                    tpJobInfo.Enabled = true;

                    //tpCostExceptions.Enabled = true;
                    pnlCostsExceptions.Visible = true;
                }

                // ... for values that comes from notes
                //tpNotes.Enabled = true;
                upnlNotes.Visible = true;
            }

            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Project")
            {
                // Set initial tab
                tcDetailedInformation.ActiveTabIndex = Int32.Parse(hdfActiveTab.Value);

                // Left menu
                tkrpbLeftMenuCurrentProject.Items[0].Text = "Current Project";
                tkrpbLeftMenuCurrentProject.Items[0].Items[0].Text = "Project";

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

                lblStartDate.Text = "Start Date";
                lblEndDate.Text = "End Date";

                // Pricing section
                pnlPricing.Visible = false;

                // Tabs visibility
                tpJobInfo.Enabled = true;
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:67,代码来源:project_edit.aspx.cs

示例3: Page_PreRender


//.........这里部分代码省略.........
                // ... for values that comes from terms po
                //tpTermsPo.Enabled = false;
                upnlTermsPO.Visible = false;
                upnlTermsPO1.Visible = false;
                upnlTermsPO2.Visible = false;
                upnlTermsPO3.Visible = false;

                // ... for values that comes from technical
                //tpTechnical.Enabled = false;
                upnlTechnical.Visible = false;

                // ... for values that comes from engineer subcontractors
                // tpEngineerSubcontractors.Enabled = true;
                // Subcontractor section
                // lblNoResults.Text = "Sub-Contractors are not defined for this ballpark";
                upnlEngineerSubcontractors.Visible = false;
                upnlEngineerSubcontractors1.Visible = false;
                upnlEngineerSubcontractors2.Visible = false;
                upnlEngineerSubcontractors3.Visible = false;
                upnlEngineerSubcontractors4.Visible = false;
                upnlEngineerSubcontractors5.Visible = false;
                upnlEngineerSubcontractors6.Visible = false;
                upnlEngineerSubcontractors7.Visible = false;

                // ... for values that comes from cost exceptions
                //tpCostExceptions.Enabled = false;
                pnlCostsExceptions.Visible = false;

                // ... for values that comes from notes
                //tpNotes.Enabled = true;
                upnlNotes.Visible = true;

                // Project state check
                switch (projectGateway.GetProjectState(int.Parse(hdfProjectId.Value)))
                {
                    case "Active":
                        tkrmTop.Items[4].Items[0].Visible = false; //activate
                        tkrmTop.Items[4].Items[1].Visible = true; //cancel
                        tkrmTop.Items[4].Items[2].Visible = true; //hr
                        tkrmTop.Items[4].Items[3].Visible = true; //Promote to proposal
                        tkrmTop.Items[4].Items[4].Visible = true; //Promote to project
                        break;

                    case "Canceled":
                        tkrmTop.Items[4].Items[0].Visible = true; //activate
                        tkrmTop.Items[4].Items[1].Visible = false; //cancel
                        tkrmTop.Items[4].Items[2].Visible = false; //hr
                        tkrmTop.Items[4].Items[3].Visible = false; //Promote to proposal
                        tkrmTop.Items[4].Items[4].Visible = false; //Promote to project
                        break;
                }
            }

            if (projectGateway.GetProjectType(int.Parse(hdfProjectId.Value)) == "Proposal")
            {
                // Set initial tab
                tcDetailedInformation.ActiveTabIndex = Int32.Parse(hdfActiveTab.Value);

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

                // Top Menu
                tkrmTop.Items[1].Visible = true;
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:67,代码来源:project_summary.aspx.cs

示例4: InsertProject

        private void InsertProject(int projectId)
        {
            // ... Data for current project
            ProjectGateway projectGateway = new ProjectGateway(projectTDS);
            projectGateway.LoadByProjectId(projectId);

            // ... Definition of general variables
            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 (projectGateway.GetProjectLeadID(projectId).HasValue) projectLeadId = (int)projectGateway.GetProjectLeadID(projectId);
            int salesmanId = projectGateway.GetSalesmanID(projectId);
            bool deleted = false;
            int? clientPrimaryContactID = null; if (projectGateway.GetClientPrimaryContactID(projectId).HasValue) clientPrimaryContactID = (int)projectGateway.GetClientPrimaryContactID(projectId);
            int? clientSecondaryContactID = null; if (projectGateway.GetClientSecondaryContactID(projectId).HasValue) clientSecondaryContactID = (int)projectGateway.GetClientSecondaryContactID(projectId);
            int? OriginalProjectID = projectId;
            int? projectNumberCopy = null; if (projectGateway.GetLastProjectNumberCopy(projectId).HasValue) projectNumberCopy = (int)projectGateway.GetLastProjectNumberCopy(projectId) + 1; else projectNumberCopy = 1;
            string projectNumber = projectGateway.GetProjectNumber(projectId) + "-" + projectNumberCopy.ToString();
            string projectType = "Proposal";
            string projectState = projectGateway.GetProjectState(projectId);
            string name = projectGateway.GetName(projectId);
            string description = projectGateway.GetDescription(projectId);
            DateTime? proposalDate = null; if (projectGateway.GetProposalDate(projectId).HasValue) proposalDate = projectGateway.GetProposalDate(projectId);
            DateTime? startDate = null; if (projectGateway.GetStartDate(projectId).HasValue) startDate = projectGateway.GetStartDate(projectId);
            DateTime? endDate = null; if (projectGateway.GetEndDate(projectId).HasValue) endDate = projectGateway.GetEndDate(projectId);
            int clientId = projectGateway.GetClientID(projectId);
            string clientProjectNumber = projectGateway.GetClientProjectNumber(projectId);
            int? libraryCategoriesId = null; if (projectGateway.GetLibraryCategoriesId(projectId).HasValue) libraryCategoriesId = (int)projectGateway.GetLibraryCategoriesId(projectId);
            bool fairWageApplies = projectGateway.GetFairWageApplies(projectId);

            // ... Insert Project
            Project project = new Project(projectTDS);
            project.Insert(countryId, officeId, projectLeadId, salesmanId, projectNumber, projectType, projectState, name, description, proposalDate, startDate, endDate, clientId, clientPrimaryContactID, clientSecondaryContactID, clientProjectNumber, deleted, OriginalProjectID, projectNumberCopy, libraryCategoriesId, provinceId, cityId, Int32.Parse(hdfCompanyId.Value.Trim()), countyId, fairWageApplies);

            // ... Insert History
            ProjectHistory projectHistory = new ProjectHistory(projectTDS);
            projectHistory.Insert(0, 1, projectState, DateTime.Now, Convert.ToInt32(Session["loginID"]), Int32.Parse(hdfCompanyId.Value.Trim()));
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:40,代码来源:project_duplicate.aspx.cs

示例5: 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.GetProjectState方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。