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


C# ProjectGateway.LoadByProjectId方法代码示例

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


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

示例1: Delete

        // ////////////////////////////////////////////////////////////////////////
        // PUBLIC METHODS
        //
        /// <summary>
        /// Delete
        /// </summary>
        /// <param name="workId">workId</param>
        /// <param name="companyId">companyId</param>
        public void Delete(int workId, int companyId)
        {
            WorkFullLengthLiningM1LateralGateway workFullLengthLiningM1LateralGateway = new WorkFullLengthLiningM1LateralGateway();
            workFullLengthLiningM1LateralGateway.LoadByWorkId(workId, companyId);

            foreach (WorkTDS.LFS_WORK_FULLLENGTHLINING_M1_LATERALRow row in (WorkTDS.LFS_WORK_FULLLENGTHLINING_M1_LATERALDataTable)workFullLengthLiningM1LateralGateway.Table)
            {
                // delete lfs lateral client
                WorkGateway workGateway = new WorkGateway();
                workGateway.LoadByWorkId(workId, companyId);
                int currentProjectId = workGateway.GetProjectId(workId);

                ProjectGateway projectGateway = new ProjectGateway();
                projectGateway.LoadByProjectId(currentProjectId);
                int clientId = projectGateway.GetClientID(currentProjectId);

                LfsAssetSewerLateralClientGateway lfsAssetSewerLateralClientGateway = new LfsAssetSewerLateralClientGateway();
                lfsAssetSewerLateralClientGateway.LoadByAssetIdClientId(row.Lateral, clientId, companyId);

                if (lfsAssetSewerLateralClientGateway.Table.Rows.Count > 0)
                {
                    LfsAssetSewerLateralClient lfsAssetSewerLateralClient = new LfsAssetSewerLateralClient(null);
                    lfsAssetSewerLateralClient.DeleteDirect(row.Lateral, clientId, companyId);
                }

                // Delete work lateral
                workFullLengthLiningM1LateralGateway.Delete(workId, row.Lateral, companyId);

                // Delete section
                LfsAssetSewerLateral lfsAssetSewerLateral = new LfsAssetSewerLateral(null);
                lfsAssetSewerLateral.DeleteDirect(row.Lateral, companyId);
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:41,代码来源:WorkFullLengthLiningM1Lateral.cs

示例2: ddlProject_SelectedIndexChanged

        protected void ddlProject_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlProject.SelectedIndex > 0)
            {
                int projectId = Int32.Parse(ddlProject.SelectedValue);

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

                if (projectGateway.GetFairWageApplies(projectId))
                {
                    lblIncludeAllHours.Visible = true;
                    cbxIncludeAllHours.Visible = true;
                    upnlIncludeAllHours.Update();
                    upnlIncludeAllHoursLabel.Update();
                }
                else
                {
                    lblIncludeAllHours.Visible = false;
                    cbxIncludeAllHours.Visible = false;
                    cbxIncludeAllHours.Checked = false;
                    upnlIncludeAllHours.Update();
                    upnlIncludeAllHoursLabel.Update();
                }
            }
            else
            {
                lblIncludeAllHours.Visible = false;
                cbxIncludeAllHours.Visible = false;
                cbxIncludeAllHours.Checked = false;
                upnlIncludeAllHours.Update();
                upnlIncludeAllHoursLabel.Update();
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:34,代码来源:print_hours_for_payroll_period_with_approval.aspx.cs

示例3: btnAssociate_Click

        // ////////////////////////////////////////////////////////////////////////
        // AUXILIAR EVENTS
        //
        protected void btnAssociate_Click(object sender, EventArgs e)
        {
            Page.Validate();

            if (Page.IsValid)
            {
                string associateCategory = tvCategoriesRoot.SelectedNode.Text;
                int libraryCategoryId = int.Parse(tvCategoriesRoot.SelectedNode.Value);

                if (projectTDS.LFS_PROJECT.Rows.Count > 0)
                {
                    Project project = new Project(projectTDS);
                    project.UpdateLibraryCategoriesId(int.Parse(ViewState["projectId"].ToString()), libraryCategoryId);
                    UpdateDatabase();
                }
                else
                {
                    ProjectGateway projectGatewayForLoad = new ProjectGateway(projectTDS);
                    projectGatewayForLoad.LoadByProjectId(int.Parse(ViewState["projectId"].ToString()));

                    Project project = new Project(projectTDS);
                    project.UpdateLibraryCategoriesId(int.Parse(ViewState["projectId"].ToString()), libraryCategoryId);
                    UpdateDatabase();
                }

                Response.Write("<script language='javascript'> {window.close();}</script>");
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:31,代码来源:project_associate_to_category.aspx.cs

示例4: btnExportList_Click

        protected void btnExportList_Click(object sender, EventArgs e)
        {
            mForm7 master = (mForm7)this.Master;
            ScriptManager scriptManager = (ScriptManager)master.FindControl("ScriptManagerMaster7");

            if (!scriptManager.IsInAsyncPostBack)
            {
                string url = "";
                string headerValues = "";
                int totalColumnsExport = 11;
                int totalColumnsPreview = 11;
                string client = "";
                string name = "";
                string project = "";
                string title = "Manhole Rehabilitation Search Results";
                string columnsForReport = "";
                int j;

                // ... for client
                int companyId = Int32.Parse(hdfCompanyId.Value);
                int currentClientId = Int32.Parse(hdfCurrentClientId.Value.ToString());
                CompaniesGateway companiesGateway = new CompaniesGateway();
                companiesGateway.LoadByCompaniesId(currentClientId, companyId);
                client += "Client: " + companiesGateway.GetName(currentClientId);

                // ... for project
                int currentProjectId = Int32.Parse(hdfCurrentProjectId.Value.ToString());
                ProjectGateway projectGateway = new ProjectGateway();
                projectGateway.LoadByProjectId(currentProjectId);
                project = projectGateway.GetName(currentProjectId);
                name = client + " > Project: " + project + " (" + projectGateway.GetProjectNumber(currentProjectId) + ")";

                // ... for title view
                if (hdfBtnOrigin.Value == "Go")
                {
                    int viewId = Int32.Parse(ddlView.SelectedValue.Trim());

                    // ... Load name view
                    WorkViewGateway workViewGateway = new WorkViewGateway();
                    workViewGateway.LoadByViewId(viewId, companyId);

                    title = workViewGateway.GetName(viewId);
                }

                // ... For comments option
                string comments = "None";

                headerValues = "";
                columnsForReport = "";

                // Establishing header values
                if (grdMRNavigator.Columns[1].Visible) headerValues += "Manhole No";
                if (grdMRNavigator.Columns[2].Visible) headerValues += " * Street";
                if (grdMRNavigator.Columns[3].Visible) headerValues += " * Latitude";
                if (grdMRNavigator.Columns[4].Visible) headerValues += " * Longitude";
                if (grdMRNavigator.Columns[5].Visible) headerValues += " * Shape";
                if (grdMRNavigator.Columns[6].Visible) headerValues += " * Location";
                if (grdMRNavigator.Columns[7].Visible) headerValues += " * Condition Rating";
                if (grdMRNavigator.Columns[8].Visible) headerValues += " * Prepped Date";
                if (grdMRNavigator.Columns[9].Visible) headerValues += " * Sprayed Date";
                if (grdMRNavigator.Columns[10].Visible) headerValues += " * Batch Date";
                if (grdMRNavigator.Columns[11].Visible) headerValues += " * Comments";

                // Establishing columns to display
                string[] columnsExcel = headerValues.Split('*');

                // ... for visible columns
                for (int i = 0; i < columnsExcel.Length; i++)
                {
                    j = i + 1;
                    columnsForReport += "&header" + j + "=" + columnsExcel[i].Trim();
                }

                // ... For not visible columns
                for (int i = columnsExcel.Length; i < totalColumnsExport; i++)
                {
                    j = i + 1;
                    columnsForReport += "&header" + j + "=None";
                }

                // Report call
                Page.Validate();
                if (Page.IsValid)
                {
                    PostPageChanges();
                    title = title.Replace("'", "%27");
                    Response.Write("<script language='javascript'> {window.open('./mr_print_search_results_report.aspx?" + columnsForReport + "&comments=" + comments + "&totalColumnsPreview=" + totalColumnsPreview + "&totalColumnsExport=" + totalColumnsExport + "&totalSelectedColumns=" + columnsExcel.Length + "&name=" + Server.UrlEncode(name) + "&title=" + Server.UrlEncode(title) + "&format=excel', '_blank', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=800, height=680');}</script>");
                }

                if (url != "") Response.Redirect(url);
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:92,代码来源:mr_navigator2.aspx.cs

示例5: TagPage

        private void TagPage()
        {
            hdfWorkType.Value = Request.QueryString["work_type"].ToString();
            hdfCompanyId.Value = Session["companyID"].ToString();
            hdfProjectId.Value = Request.QueryString["project_id"].ToString();

            // Get ids & location
            int projectId = Int32.Parse(hdfProjectId.Value.Trim());
            ProjectGateway projectGateway = new ProjectGateway();
            projectGateway.LoadByProjectId(projectId);

            // ... Get ids
            Int64 currentCountry = projectGateway.GetCountryID(projectId);
            Int64? currentProvince = null; if (projectGateway.GetProvinceID(projectId).HasValue) currentProvince = (Int64)projectGateway.GetProvinceID(projectId);
            Int64? currentCounty = null; if (projectGateway.GetCountyID(projectId).HasValue) currentCounty = (Int64)projectGateway.GetCountyID(projectId);
            Int64? currentCity = null; if (projectGateway.GetCityID(projectId).HasValue) currentCity = (Int64)projectGateway.GetCityID(projectId);

            hdfCountryId.Value = currentCountry.ToString();
            hdfProvinceId.Value = currentProvince.ToString();
            hdfCountyId.Value = currentCounty.ToString();
            hdfCityId.Value = currentCity.ToString();

            // .. Get location
            string projectLocation = "";

            CountryGateway countryGateway = new CountryGateway();
            countryGateway.LoadByCountryId(currentCountry);
            projectLocation = projectLocation + countryGateway.GetName(currentCountry);

            if (currentProvince.HasValue)
            {
                ProvinceGateway provinceGateway = new ProvinceGateway();
                provinceGateway.LoadByProvinceId((Int64)currentProvince);
                projectLocation = projectLocation + ", " + provinceGateway.GetName((Int64)currentProvince);
            }

            if (currentCounty.HasValue)
            {
                CountyGateway countyGateway = new CountyGateway();
                countyGateway.LoadByCountyId((Int64)currentCounty);
                projectLocation = projectLocation + ", " + countyGateway.GetName((Int64)currentCounty);
            }

            if (currentCity.HasValue)
            {
                CityGateway cityGateway = new CityGateway();
                cityGateway.LoadByCityId((Int64)currentCity);
                projectLocation = projectLocation + ", " + cityGateway.GetName((Int64)currentCity);
            }

            hdfSearchTitle.Value = projectLocation;
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:52,代码来源:project_add_sections.aspx.cs

示例6: Load

        // ////////////////////////////////////////////////////////////////////////
        // PUBLIC METHODS
        //
        /// <summary>
        /// Load
        /// </summary>
        /// <param name="projectId">projectId</param>
        /// <param name="startDate">startDate</param>
        /// <param name="endDate">endDate</param>
        /// <param name="companyId">companyId</param>
        public void Load(ArrayList projects, DateTime startDate, DateTime endDate, int companyId)
        {
            foreach (int projectId in projects)
            {
                ProjectGateway projectGateway = new ProjectGateway();
                projectGateway.LoadByProjectId(projectId);

                string project = projectGateway.GetName(projectId);

                DateTime newStartDate = new DateTime();
                newStartDate = startDate;
                DateTime newEndDate = new DateTime();
                newEndDate = endDate;

                ProjectCostingSheetAddOriginalRevenueGateway projectCostingSheetAddOriginalRevenueGateway = new ProjectCostingSheetAddOriginalRevenueGateway(Data);
                projectCostingSheetAddOriginalRevenueGateway.LoadByProjectIdStartDateEndDate(projectId, newStartDate, newEndDate);

                if (projectCostingSheetAddOriginalRevenueGateway.Table.Rows.Count > 0)
                {
                    foreach (ProjectCostingSheetAddTDS.OriginalRevenueRow originalRow in (ProjectCostingSheetAddTDS.OriginalRevenueDataTable)projectCostingSheetAddOriginalRevenueGateway.Table)
                    {
                        ProjectCostingSheetAddTDS.CombinedRevenueInformationRow newRow = ((ProjectCostingSheetAddTDS.CombinedRevenueInformationDataTable)Table).NewCombinedRevenueInformationRow();
                        newRow.CostingSheetID = 0;
                        newRow.RefIDRevenue = originalRow.RefIDRevenue;
                        newRow.Revenue = originalRow.Revenue;
                        newRow.Deleted = false;
                        newRow.InDatabase = false;
                        newRow.COMPANY_ID = companyId;
                        newRow.Comment = ""; if (!originalRow.IsCommentNull()) newRow.Comment = originalRow.Comment;
                        newRow.StartDate = originalRow.Date_;
                        newRow.EndDate = originalRow.Date_;
                        newRow.FromDatabase = true;
                        newRow.ProjectID = projectId;
                        newRow.Project = project;
                        ((ProjectCostingSheetAddTDS.CombinedRevenueInformationDataTable)Table).AddCombinedRevenueInformationRow(newRow);
                    }
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:49,代码来源:ProjectCombinedCostingSheetAddRevenueInformation.cs

示例7: Generate

        private void Generate()
        {
            mReport1 master = (mReport1)this.Master;
            int companyId = Convert.ToInt32(Session["companyID"]);

            ProjectCostingSheetInformationReportInformation projectCostingSheetInformationReportInformation = new ProjectCostingSheetInformationReportInformation();

            if (ddlClient.SelectedValue == "-1")
            {
                projectCostingSheetInformationReportInformation.Load(companyId);
            }
            else
            {
                if (ddlProject.SelectedValue == "-1")
                {
                    projectCostingSheetInformationReportInformation.LoadByCompaniesId(Int32.Parse(ddlClient.SelectedValue), companyId);
                }
                else
                {
                    projectCostingSheetInformationReportInformation.LoadByCompaniesIdProjectId(Int32.Parse(ddlClient.SelectedValue), Int32.Parse(ddlProject.SelectedValue), companyId);
                }
            }

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

            // Get report
            if (projectCostingSheetInformationReportInformation.Table.Rows.Count > 0)
            {
                if (master.Format == "pdf")
                {
                    master.Report = new ConsolidatedCostingSheetReport();
                    int loginId = Convert.ToInt32(Session["loginID"]);

                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(loginId, companyId);
                    string user = loginGateway.GetLastName(loginId, companyId) + " " + loginGateway.GetFirstName(loginId, companyId);
                    master.SetParameter("User", user.Trim());

                    // For process code
                    ProjectCostingSheetInformationReportInformationGateway projectCostingSheetInformationReportInformationGateway = new ProjectCostingSheetInformationReportInformationGateway(projectCostingSheetInformationReportInformation.Data);

                    // ... ... client
                    if (ddlClient.SelectedValue == "-1")
                    {
                        master.SetParameter("client", "All");
                    }
                    else
                    {
                        CompaniesGateway companiesGateway = new CompaniesGateway();
                        companiesGateway.LoadByCompaniesId(Int32.Parse(ddlClient.SelectedValue), Int32.Parse(hdfCompanyId.Value));
                        string clientName = companiesGateway.GetName(Int32.Parse(ddlClient.SelectedValue));
                        master.SetParameter("client", clientName);
                    }

                    // ... ... project
                    if (ddlProject.SelectedValue == "-1")
                    {
                        master.SetParameter("project", "All");
                    }
                    else
                    {
                        int projectId2 = Int32.Parse(ddlProject.SelectedValue);
                        ProjectGateway projectGateway = new ProjectGateway();
                        projectGateway.LoadByProjectId(projectId2);
                        string project = projectGateway.GetName(projectId2);
                        master.SetParameter("project", project);
                    }
                }
                else
                {
                    master.Report = new ConsolidatedCostingSheetPreviewReport();
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:76,代码来源:costing_sheet_report_consolidated.aspx.cs

示例8: Generate2


//.........这里部分代码省略.........
                    if (cbxSectionId.Checked)
                    {
                        ArrayList sectionsId = new ArrayList();
                        foreach (ListItem lst in cbxlSectionId.Items)
                        {
                            if (lst.Selected)
                            {
                                sectionsId.Add(lst.Value);
                            }
                        }

                        flM2Report.LoadByCompaniesIdProjectIdSectionId(int.Parse(hdfCompanyId.Value), int.Parse(ddlClient.SelectedValue), int.Parse(ddlProject.SelectedValue), unitType, sectionsId);
                    }
                    else
                    {
                        if (cbxDate.Checked)
                        {
                            DateTime m1Date = DateTime.Parse(tkrdpDate.SelectedDate.Value.ToShortDateString());
                            flM2Report.LoadByCompaniesIdProjectIdDate(int.Parse(hdfCompanyId.Value), int.Parse(ddlClient.SelectedValue), int.Parse(ddlProject.SelectedValue), unitType, m1Date.ToShortDateString());
                        }
                        else
                        {
                            if (cbxStreet.Checked)
                            {
                                flM2Report.LoadByCompaniesIdProjectIdStreet(int.Parse(hdfCompanyId.Value), int.Parse(ddlClient.SelectedValue), int.Parse(ddlProject.SelectedValue), unitType, tbxStreet.Text.Trim());
                            }
                            else
                            {
                                if (cbxSubArea.Checked)
                                {
                                    flM2Report.LoadByCompaniesIdProjectIdSubArea(int.Parse(hdfCompanyId.Value), int.Parse(ddlClient.SelectedValue), int.Parse(ddlProject.SelectedValue), unitType, tbxSubArea.Text.Trim());
                                }
                                else
                                {
                                    flM2Report.LoadByCompaniesIdProjectId(int.Parse(hdfCompanyId.Value), int.Parse(ddlClient.SelectedValue), int.Parse(ddlProject.SelectedValue), unitType);
                                }
                            }
                        }
                    }
                }
            }

            // ... set properties to master page
            master.Data2 = flM2Report.Data;
            master.Table2 = flM2Report.TableName;

            // Get report
            if (flM2Report.Table.Rows.Count > 0)
            {
                if (master.Format2 == "pdf")
                {
                    master.Report2 = new FlM2Report();
                }
                else
                {
                    master.Report2 = new FlM2ReportExport();
                }

                // ... set parameters to report
                int companyId = Convert.ToInt32(Session["companyID"]);
                if (master.Format2 == "pdf")
                {
                    if (ddlClient.SelectedValue != "-1")
                    {
                        // ... for client
                        int currentCompanyId = Int32.Parse(ddlClient.SelectedValue);
                        CompaniesGateway companiesGateway = new CompaniesGateway();
                        companiesGateway.LoadByCompaniesId(currentCompanyId, companyId);
                        master.SetParameter2("Client", companiesGateway.GetName(currentCompanyId));
                    }
                    else
                    {
                        master.SetParameter2("Client", "All");
                    }

                    if (ddlProject.SelectedValue != "-1")
                    {
                        // ... for project
                        int currentProjectId = Int32.Parse(ddlProject.SelectedValue);
                        ProjectGateway projectGateway = new ProjectGateway();
                        projectGateway.LoadByProjectId(currentProjectId);
                        string name = projectGateway.GetName(currentProjectId);
                        master.SetParameter2("Project", name);
                    }
                    else
                    {
                        master.SetParameter2("Project", "All");
                    }

                    master.SetParameter2("UnitType", unitType);

                    int loginId = Convert.ToInt32(Session["loginID"]);

                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(loginId, companyId);
                    string user = loginGateway.GetLastName(loginId, companyId) + " " + loginGateway.GetFirstName(loginId, companyId);
                    master.SetParameter2("User", user.Trim());
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:fl_m12_report.aspx.cs

示例9: UpdateDataForNavigator

        private void UpdateDataForNavigator()
        {
            foreach (ActualCostsNavigatorTDS.HotelCostsRow row in (ActualCostsNavigatorTDS.HotelCostsDataTable)Table)
            {
                int projectId = row.ProjectID;

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

                if (projectGateway.GetCountryID(projectId) == 1) //Canada
                {
                    row.RateUsd = row.RateCad;
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:15,代码来源:ActualCostsNavigatoHotelCosts.cs

示例10: UpdateDataForNavigator

        private void UpdateDataForNavigator()
        {
            foreach (SubcontractorHoursNavigatorTDS.SubcontractorHoursNavigatorRow row in (SubcontractorHoursNavigatorTDS.SubcontractorHoursNavigatorDataTable)Table)
            {
                int projectId = row.ProjectID;

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

                if (projectGateway.GetCountryID(projectId) == 1) //Canada
                {
                    row.RateUsd = row.RateCad;
                    row.TotalUsd = row.TotalCad;
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:16,代码来源:SubcontractorHoursNavigator.cs

示例11: TagPage

        private void TagPage()
        {
            hdfCompanyId.Value = Session["companyID"].ToString();
            hdfCurrentProjectId.Value = Request.QueryString["project_id"].ToString();
            hdfCurrentClientId.Value = Request.QueryString["client_id"].ToString();
            hdfAssetId.Value = Request.QueryString["asset_id"].ToString();
            hdfActiveTab.Value = Request.QueryString["active_tab"].ToString();

            // Get ids & location
            int projectId = Int32.Parse(hdfCurrentProjectId.Value.Trim());
            int companyId = Int32.Parse(hdfCompanyId.Value);
            int assetId = Int32.Parse(hdfAssetId.Value);

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

            // ... Get ids
            Int64 currentCountry = projectGateway.GetCountryID(projectId);
            Int64? currentProvince = null; if (projectGateway.GetProvinceID(projectId).HasValue) currentProvince = (Int64)projectGateway.GetProvinceID(projectId);
            Int64? currentCounty = null; if (projectGateway.GetCountyID(projectId).HasValue) currentCounty = (Int64)projectGateway.GetCountyID(projectId);
            Int64? currentCity = null; if (projectGateway.GetCityID(projectId).HasValue) currentCity = (Int64)projectGateway.GetCityID(projectId);

            hdfCountryId.Value = currentCountry.ToString();
            hdfProvinceId.Value = currentProvince.ToString();
            hdfCountyId.Value = currentCounty.ToString();
            hdfCityId.Value = currentCity.ToString();

            // Get workId
            WorkGateway workGateway = new WorkGateway();
            workGateway.LoadByProjectIdAssetIdWorkType(projectId, assetId, "Point Repairs", companyId);
            hdfWorkId.Value = workGateway.GetWorkId(assetId, "Point Repairs", projectId).ToString();
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:32,代码来源:pr_summary.aspx.cs

示例12: Page_Load


//.........这里部分代码省略.........
                    {
                        hdfActiveTab.Value = (string)Session["activeTabPr"];

                        // Restore datasets
                        pointRepairsTDS = (PointRepairsTDS)Session["pointRepairsTDS"];
                        pointRepairsRepairsTemp = (PointRepairsTDS.RepairDetailsDataTable)Session["pointRepairsRepairsTemp"];
                        pointRepairsCommentsTemp = (PointRepairsTDS.CommentDetailsDataTable)Session["pointRepairsCommentsTemp"];
                    }

                    tcPrDetails.ActiveTabIndex = Int32.Parse(hdfActiveTab.Value);

                    Session["filterExpression"] = "Deleted = 0";

                    // Store dataset
                    Session["pointRepairsTDS"] = pointRepairsTDS;
                    Session["pointRepairsRepairsTemp"] = pointRepairsRepairsTemp;
                    Session["pointRepairsCommentsTemp"] = pointRepairsCommentsTemp;
                }

                // ... pr_delete.aspx or pr_edit.aspx
                if ((Request.QueryString["source_page"] == "pr_delete.aspx") || (Request.QueryString["source_page"] == "pr_edit.aspx"))
                {
                    StoreNavigatorState();
                    ViewState["update"] = Request.QueryString["update"];

                    // Restore dataset
                    pointRepairsTDS = (PointRepairsTDS)Session["pointRepairsTDS"];
                    pointRepairsRepairsTemp = (PointRepairsTDS.RepairDetailsDataTable)Session["pointRepairsRepairsTemp"];
                    pointRepairsCommentsTemp = (PointRepairsTDS.CommentDetailsDataTable)Session["pointRepairsCommentsTemp"];

                    // ... Set initial tab
                    if ((string)Session["dialogOpenedPr"] != "1")
                    {
                        hdfActiveTab.Value = Request.QueryString["active_tab"];
                    }
                    else
                    {
                        hdfActiveTab.Value = (string)Session["activeTabPr"];
                    }

                    tcPrDetails.ActiveTabIndex = Int32.Parse(hdfActiveTab.Value);

                    ApplyFilter();

                    switch ((string)Session["filterExpression"])
                    {
                        case "Deleted = 0":
                            ddlFilter.SelectedIndex = 0;
                            break;

                        case "Type='Robotic Reaming' AND Deleted = 0":
                            ddlFilter.SelectedIndex = 1;
                            break;

                        case "Type='Point Lining' AND Deleted = 0":
                            ddlFilter.SelectedIndex = 2;
                            break;

                        case "Type='Grouting' AND Deleted = 0":
                            ddlFilter.SelectedIndex = 3;
                            break;

                        default:
                            ddlFilter.SelectedIndex = 0;
                            break;
                    }
                }

                // Prepare initial data
                // ... for client
                int currentClientId = Int32.Parse(hdfCurrentClientId.Value.ToString());

                CompaniesGateway companiesGateway = new CompaniesGateway();
                companiesGateway.LoadByCompaniesId(currentClientId, companyId);
                lblTitleClientName.Text = "Client: " + companiesGateway.GetName(currentClientId);

                // ... for project
                ProjectGateway projectGateway = new ProjectGateway();
                projectGateway.LoadByProjectId(currentProjectId);
                string name = projectGateway.GetName(currentProjectId);
                if (name.Length > 23) name = name.Substring(0, 20) + "...";
                lblTitleProjectName.Text = " > Project: " + name + " (" + projectGateway.GetProjectNumber(currentProjectId) + ") > Selected Section";

                // ... Data for current point repairs work
                LoadPointRepairsData(currentProjectId, assetId, companyId);
            }
            else
            {
                // Restore datasets
                pointRepairsTDS = (PointRepairsTDS)Session["pointRepairsTDS"];
                pointRepairsRepairsTemp = (PointRepairsTDS.RepairDetailsDataTable)Session["pointRepairsRepairsTemp"];
                pointRepairsCommentsTemp = (PointRepairsTDS.CommentDetailsDataTable)Session["pointRepairsCommentsTemp"];

                // Set initial tab
                int activeTab = Int32.Parse(hdfActiveTab.Value);
                tcPrDetails.ActiveTabIndex = activeTab;

                ApplyFilter();
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:pr_summary.aspx.cs

示例13: btnExportList_Click

        protected void btnExportList_Click(object sender, EventArgs e)
        {
            string url = "";
            string headerValues = "";
            int totalColumnsExport = 40;
            int totalColumnsPreview = 39;
            string client = "";
            string name = "";
            string project = "";
            string title = "Point Repairs Search Results";
            string columnsForReport = "";
            int j;

            // ... for client
            int currentClientId = Int32.Parse(hdfCurrentClientId.Value.ToString());
            int companyId = Int32.Parse(hdfCompanyId.Value.Trim());

            CompaniesGateway companiesGateway = new CompaniesGateway();
            companiesGateway.LoadByCompaniesId(currentClientId, companyId);
            client += "Client: " + companiesGateway.GetName(currentClientId);

            // ... for project
            int currentProjectId = Int32.Parse(hdfCurrentProjectId.Value.ToString());
            ProjectGateway projectGateway = new ProjectGateway();
            projectGateway.LoadByProjectId(currentProjectId);
            project = projectGateway.GetName(currentProjectId);
            name = client + " > Project: " + project + " (" + projectGateway.GetProjectNumber(currentProjectId) + ")";

            // ... for title view
            if (hdfBtnOrigin.Value == "Go")
            {
                int viewId = Int32.Parse(ddlView.SelectedValue.Trim());

                // ... Load name view
                WorkViewGateway workViewGateway = new WorkViewGateway();
                workViewGateway.LoadByViewId(viewId, companyId);

                title = workViewGateway.GetName(viewId);
            }

            // ... For comments option
            string comments = "None";

            headerValues = "";
            columnsForReport = "";

            // Establishing header values
            if (grdPrNavigator.Columns[2].Visible) headerValues += "ID (Section)";
            if (grdPrNavigator.Columns[3].Visible) headerValues += " * Sub Area";
            if (grdPrNavigator.Columns[4].Visible) headerValues += " * Street";
            if (grdPrNavigator.Columns[5].Visible) headerValues += " * USMH";
            if (grdPrNavigator.Columns[6].Visible) headerValues += " * USMH Address";
            if (grdPrNavigator.Columns[7].Visible) headerValues += " * DSMH";
            if (grdPrNavigator.Columns[8].Visible) headerValues += " * DSMH Address";
            if (grdPrNavigator.Columns[9].Visible) headerValues += " * Map Size";
            if (grdPrNavigator.Columns[10].Visible) headerValues += " * Confirmed Size";
            if (grdPrNavigator.Columns[11].Visible) headerValues += " * Map Length";
            if (grdPrNavigator.Columns[12].Visible) headerValues += " * Steel Tape Length";
            if (grdPrNavigator.Columns[13].Visible) headerValues += " * Video Length";
            if (grdPrNavigator.Columns[14].Visible) headerValues += " * Laterals";
            if (grdPrNavigator.Columns[15].Visible) headerValues += " * Live Laterals";
            if (grdPrNavigator.Columns[16].Visible) headerValues += " * Client ID";
            if (grdPrNavigator.Columns[17].Visible) headerValues += " * Measurements Taken By";
            if (grdPrNavigator.Columns[18].Visible) headerValues += " * Pre-Flush Date";
            if (grdPrNavigator.Columns[19].Visible) headerValues += " * Pre-Video Date";
            if (grdPrNavigator.Columns[20].Visible) headerValues += " * P1 Date";
            if (grdPrNavigator.Columns[21].Visible) headerValues += " * Repair Confirmation Date";
            if (grdPrNavigator.Columns[22].Visible) headerValues += " * Traffic Control";
            if (grdPrNavigator.Columns[23].Visible) headerValues += " * Material";
            if (grdPrNavigator.Columns[24].Visible) headerValues += " * Bypass Required?";
            if (grdPrNavigator.Columns[25].Visible) headerValues += " * Robotic Prep Required?";
            if (grdPrNavigator.Columns[26].Visible) headerValues += " * CXI&rsquo;s Removed";
            if (grdPrNavigator.Columns[27].Visible) headerValues += " * Robotic Distances";
            if (grdPrNavigator.Columns[28].Visible) headerValues += " * Proposed Lining Date";
            if (grdPrNavigator.Columns[29].Visible) headerValues += " * Deadline Lining Date";
            if (grdPrNavigator.Columns[30].Visible) headerValues += " * Final Video";
            if (grdPrNavigator.Columns[31].Visible) headerValues += " * Estimated Joints";
            if (grdPrNavigator.Columns[32].Visible) headerValues += " * Joints Test Sealed";
            if (grdPrNavigator.Columns[33].Visible) headerValues += " * Issue Identified?";
            if (grdPrNavigator.Columns[34].Visible) headerValues += " * LFS Issue?";
            if (grdPrNavigator.Columns[35].Visible) headerValues += " * Client Issue?";
            if (grdPrNavigator.Columns[36].Visible) headerValues += " * Sales Issue?";
            if (grdPrNavigator.Columns[37].Visible) headerValues += " * Issue Given To Client?";
            if (grdPrNavigator.Columns[38].Visible) headerValues += " * Issue Investigation?";
            if (grdPrNavigator.Columns[39].Visible) headerValues += " * Issue Resolved?";
            if (grdPrNavigator.Columns[40].Visible) headerValues += " * Comments";
            if (grdPrNavigator.Columns[41].Visible) headerValues += " * Repair";

            // Establishing columns to display
            string[] columnsExcel = headerValues.Split('*');

            // ... for visible columns
            for (int i = 0; i < columnsExcel.Length; i++)
            {
                j = i + 1;
                columnsForReport += "&header" + j + "=" + columnsExcel[i].Trim();
            }

            // ... For not visible columns
            for (int i = columnsExcel.Length; i < totalColumnsExport; i++)
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:pr_navigator2.aspx.cs

示例14: Page_Load


//.........这里部分代码省略.........

                // ... fl_delete.aspx or fl_edit.aspx
                if ((Request.QueryString["source_page"] == "fl_delete.aspx") || (Request.QueryString["source_page"] == "fl_edit.aspx"))
                {
                    StoreNavigatorState();
                    ViewState["update"] = Request.QueryString["update"];

                    // Restore dataset
                    fullLengthLiningTDS = (FullLengthLiningTDS)Session["fullLengthLiningTDS"];

                    // ... Set initial tab
                    if ((string)Session["dialogOpenedFll"] != "1")
                    {
                        hdfActiveTab.Value = Request.QueryString["active_tab"];
                    }
                    else
                    {
                        hdfActiveTab.Value = (string)Session["activeTabFll"];
                    }

                    tcFlDetails.ActiveTabIndex = Int32.Parse(hdfActiveTab.Value);
                }

                // Prepare initial data
                // ... for client
                int currentClientId = Int32.Parse(hdfCurrentClientId.Value.ToString());

                CompaniesGateway companiesGateway = new CompaniesGateway();
                companiesGateway.LoadByCompaniesId(currentClientId, companyId);
                lblTitleClientName.Text = "Client: " + companiesGateway.GetName(currentClientId);

                // ... for project
                ProjectGateway projectGateway = new ProjectGateway();
                projectGateway.LoadByProjectId(currentProjectId);
                string name = projectGateway.GetName(currentProjectId);
                if (name.Length > 23) name = name.Substring(0, 20) + "...";
                lblTitleProjectName.Text = " > Project: " + name + " (" + projectGateway.GetProjectNumber(currentProjectId) + ") > Selected Section";

                // ... for wet out section list
                AssetSewerSectionList assetSewerSectionList = new AssetSewerSectionList();
                assetSewerSectionList.LoadAndAddItem(Int32.Parse(hdfCurrentProjectId.Value), hdfWorkType.Value, "-1", "(All)", Int32.Parse(hdfCompanyId.Value));
                cbxlWetOutDataSectionId.DataSource = assetSewerSectionList.Table;
                cbxlWetOutDataSectionId.DataValueField = "SectionID";
                cbxlWetOutDataSectionId.DataTextField = "FlowOrderID";
                cbxlWetOutDataSectionId.DataBind();

                cbxlInversionDataSectionId.DataSource = assetSewerSectionList.Table;
                cbxlInversionDataSectionId.DataValueField = "SectionID";
                cbxlInversionDataSectionId.DataTextField = "FlowOrderID";
                cbxlInversionDataSectionId.DataBind();

                // ... Data for current full length lining work
                LoadFullLengthLiningData(currentProjectId, assetId, companyId);

                // Databind
                Page.DataBind();

                // Especial load for Run details
                string runDetails = hdfRunDetails.Value;
                WorkFullLengthLiningWetOutGateway workFullLengthLiningWetOutGateway = new WorkFullLengthLiningWetOutGateway();
                workFullLengthLiningWetOutGateway.LoadByWorkId(workId, companyId);

                // ... Verify if work has cipp information to load run details
                if (workFullLengthLiningWetOutGateway.Table.Rows.Count > 0)
                {
                    string[] runDetailsList = runDetails.Split('>');
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:67,代码来源:fl_summary.aspx.cs

示例15: Page_Load

        // ////////////////////////////////////////////////////////////////////////
        // EVENTS
        //
        protected void Page_Load(object sender, EventArgs e)
        {
            // Register client scripts
            this.RegisterClientScripts();

            if (!IsPostBack)
            {
                // Security check
                if (!(Convert.ToBoolean(Session["sgLFS_CWP_REHABASSESSMENT_VIEW"]) && Convert.ToBoolean(Session["sgLFS_CWP_REHABASSESSMENT_DELETE"])))
                {
                    Response.Redirect("./../../error_page.aspx?error=" + "You are not authorized to view this page. Contact your system administrator.");
                }

                // Validate query string
                if (((string)Request.QueryString["source_page"] == null) || ((string)Request.QueryString["client_id"] == null) || ((string)Request.QueryString["project_id"] == null))
                {
                    Response.Redirect("./../../error_page.aspx?error=" + "Invalid query string in ra_delete.aspx");
                }

                // Tag Page
                TagPage();

                // Prepare initial data
                // ... for client
                int currentClientId = Int32.Parse(hdfCurrentClientId.Value.ToString());
                int companyId = Int32.Parse(hdfCompanyId.Value);
                CompaniesGateway companiesGateway = new CompaniesGateway();
                companiesGateway.LoadByCompaniesId(currentClientId, companyId);
                lblTitleClientName.Text = "Client: " + companiesGateway.GetName(currentClientId);

                // ... for project
                int currentProjectId = Int32.Parse(hdfCurrentProjectId.Value.ToString());
                ProjectGateway projectGateway = new ProjectGateway();
                projectGateway.LoadByProjectId(currentProjectId);
                string name = projectGateway.GetName(currentProjectId);
                if (name.Length > 23) name = name.Substring(0, 20) + "...";
                lblTitleProjectName.Text = " > Project: " + name + " (" + projectGateway.GetProjectNumber(currentProjectId) + ") > Selected Sections";

                // If coming from
                // ... ra_navigator2.aspx
                if (Request.QueryString["source_page"] == "ra_navigator2.aspx")
                {
                    StoreNavigatorState();
                    ViewState["update"] = "no";

                    rehabAssessmentTDS = new RehabAssessmentTDS();

                    int workId = Int32.Parse(hdfWorkId.Value);

                    RehabAssessmentSectionDetails rehabAssessmentSectionDetails = new RehabAssessmentSectionDetails(rehabAssessmentTDS);
                    rehabAssessmentSectionDetails.LoadByWorkId(workId, companyId);

                    RehabAssessmentWorkDetails rehabAssessmentWorkDetails = new RehabAssessmentWorkDetails(rehabAssessmentTDS);
                    rehabAssessmentWorkDetails.LoadByWorkId(workId, companyId);

                    RehabAssessmentLateralDetails rehabAssessmentLateralDetails = new RehabAssessmentLateralDetails(rehabAssessmentTDS);
                    rehabAssessmentLateralDetails.LoadAllByWorkId(workId, companyId);

                    // Store dataset
                    Session["rehabAssessmentTDS"] = rehabAssessmentTDS;
                }

                // ... ra_summary.aspx
                if (Request.QueryString["source_page"] == "ra_summary.aspx")
                {
                    StoreNavigatorState();
                    ViewState["update"] = Request.QueryString["update"];

                    // Restore dataset
                    rehabAssessmentTDS = (RehabAssessmentTDS)Session["rehabAssessmentTDS"];
                }
            }
            else
            {
                // Restore datasets
                rehabAssessmentTDS = (RehabAssessmentTDS)Session["rehabAssessmentTDS"];
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:81,代码来源:ra_delete.aspx.cs


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