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


C# ProjectGateway.GetProjectNumber方法代码示例

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


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

示例1: btnSearch_Click

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            // Get data from database gateway
            ProjectSectionsNavigatorTDS projectSectionsNavigatorTDS = SubmitSearch();

            // Show results
            if (projectSectionsNavigatorTDS.LFS_PROJECT_SECTIONS_NAVIGATOR.DefaultView.Count > 0)
            {
                // ... Store data
                Session["lfsProjectSectionsNavigatorTDS"] = projectSectionsNavigatorTDS;

                // ... Go to the results page
                Response.Redirect("./project_sections_navigator2.aspx?source_page=project_sections_navigator.aspx&project_id=" + hdfProjectId.Value + GetNavigatorState() + "&origin=" + (string)ViewState["origin"] + "&update=" + (string)ViewState["update"] + "&data_changed=" + hdfDataChanged.Value + "&state=" + (string)ViewState["state"] + "&update_section=no&active_tab=" + (string)ViewState["active_tab"]);
            }
            else
            {
                ProjectGateway projectGateway = new ProjectGateway(projectTDS);
                lblTitleProjectName.Text = projectGateway.GetName(int.Parse(hdfProjectId.Value)) + " (" + projectGateway.GetProjectNumber(int.Parse(hdfProjectId.Value)) + ")";
                tNoResults.Visible = true;
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:21,代码来源:project_sections_navigator.aspx.cs

示例2: 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_JUNCTIONLINING_VIEW"])))
                {
                    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 jls_navigator2.aspx");
                }

                // Tag Page
                hdfCompanyId.Value = Session["companyID"].ToString();
                hdfCurrentProjectId.Value = Request.QueryString["project_id"].ToString();
                hdfCurrentClientId.Value = Request.QueryString["client_id"].ToString();

                // Prepare initial data
                // ... For sortByList
                odsSortByList.DataBind();
                ddlSortBy.DataSourceID = "odsSortByList";
                ddlSortBy.DataValueField = "SortID";
                ddlSortBy.DataTextField = "Name";
                ddlSortBy.DataBind();

                // ... For
                odsViewForDisplayList.DataBind();
                ddlCondition1.DataSourceID = "odsViewForDisplayList";
                ddlCondition1.DataValueField = "ConditionID";
                ddlCondition1.DataTextField = "Name";
                ddlCondition1.DataBind();

                // ... 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) + ")";

                // If coming from

                // ... jls_navigator.aspx or jls_navigator2.aspx
                if ((Request.QueryString["source_page"] == "jls_navigator.aspx") || (Request.QueryString["source_page"] == "jls_navigator2.aspx"))
                {
                    RestoreNavigatorState();

                    jlsNavigatorTDS = (JlsNavigatorTDS)Session["jlsNavigatorTDS"];
                }

                // ... flat_section_jls_edit.aspx, flat_section_jls_summary.aspx or jls_delete.aspx
                if ((Request.QueryString["source_page"] == "flat_section_jls_edit.aspx") || (Request.QueryString["source_page"] == "flat_section_jls_summary.aspx") || (Request.QueryString["source_page"] == "jls_delete.aspx"))
                {
                    RestoreNavigatorState();

                    if (Request.QueryString["update"] == "no")
                    {
                        jlsNavigatorTDS = (JlsNavigatorTDS)Session["jlsNavigatorTDS"];
                    }
                    else
                    {
                        // ... Delete store data
                        Session.Contents.Remove("jlsNavigatorTDS");

                        // ... Search data with updates
                        jlsNavigatorTDS = SubmitSearch();

                        // ... store datasets
                        Session["jlsNavigatorTDS"] = jlsNavigatorTDS;

                        // ... control of existing records
                        if (jlsNavigatorTDS.JlsNavigator.Rows.Count == 0)
                        {
                            string url = "./jls_navigator.aspx?source_page=jls_navigator2.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + GetNavigatorState() + "&no_results=yes";
                            Response.Redirect(url);
                        }
                    }
                }

                // For the grid
                grdJLNavigator.DataSource = jlsNavigatorTDS.JlsNavigator;
                grdJLNavigator.DataBind();
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:jls_navigator2.aspx.cs

示例3: 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_MANHOLEREHABILITATION_VIEW"])))
                {
                    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) || ((string)Request.QueryString["in_project"] == null))
                {
                    Response.Redirect("./../../error_page.aspx?error=" + "Invalid query string in mr_navigator2.aspx");
                }

                // Tag Page
                hdfCompanyId.Value = Session["companyID"].ToString();
                hdfCurrentProjectId.Value = Request.QueryString["project_id"].ToString();
                hdfCurrentClientId.Value = Request.QueryString["client_id"].ToString();
                hdfInProject.Value = Request.QueryString["in_project"].ToString();
                hdfWorkType.Value = "Manhole Rehabilitation";

                // Prepare initial data
                // ... For sortByList
                odsSortByList.DataBind();
                ddlSortBy.DataSourceID = "odsSortByList";
                ddlSortBy.DataValueField = "SortID";
                ddlSortBy.DataTextField = "Name";
                ddlSortBy.DataBind();

                // ... For
                odsViewForDisplayList.DataBind();
                ddlCondition1.DataSourceID = "odsViewForDisplayList";
                ddlCondition1.DataValueField = "ConditionID";
                ddlCondition1.DataTextField = "Name";
                ddlCondition1.DataBind();

                // ... For view ddl
                int companyId = Int32.Parse(hdfCompanyId.Value.Trim());
                string workType = hdfWorkType.Value;
                int loginId = Convert.ToInt32(Session["loginID"]);
                string viewTypeGlobal = "";
                string viewTypePersonal = "Personal";

                // Global Views check
                if (Convert.ToBoolean(Session["sgLFS_GLOBALVIEWS_VIEW"]))
                {
                    viewTypeGlobal = "Global";
                }

                WorkViewList workViewList = new WorkViewList();
                workViewList.LoadAndAddItem(workType, viewTypeGlobal, viewTypePersonal, loginId, companyId);
                ddlView.DataSource = workViewList.Table;
                ddlView.DataValueField = "ViewID";
                ddlView.DataTextField = "Name";
                ddlView.DataBind();
                ddlView.SelectedIndex = 1;

                // Validate top information
                if ((hdfCurrentClientId.Value != "0") && (hdfCurrentProjectId.Value != "0"))
                {
                    // ... 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
                    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) + ")";
                }
                else
                {
                    lblTitleClientName.Text = "";
                    lblTitleProjectName.Text = "";
                }

                // If coming from
                // ... mr_navigator.aspx or mr_navigator2.aspx
                if ((Request.QueryString["source_page"] == "mr_navigator.aspx") || (Request.QueryString["source_page"] == "mr_navigator2.aspx"))
                {
                    RestoreNavigatorState();

                    mrNavigatorTDS = (MrNavigatorTDS)Session["mrNavigatorTDS"];
                }

                // ... mr_edit.aspx, mr_summary.aspx or mr_delete.aspx
                if ((Request.QueryString["source_page"] == "mr_edit.aspx") || (Request.QueryString["source_page"] == "mr_summary.aspx") || (Request.QueryString["source_page"] == "mr_delete.aspx"))
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:mr_navigator2.aspx.cs

示例4: Page_Load

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

            if (!IsPostBack)
            {
                // Validate query string
                if (((string)Request.QueryString["source_page"] == null) && ((string)Request.QueryString["others"] == null) && ((string)Request.QueryString["employee_id"] == null) && ((string)Request.QueryString["period_id"] == null) && ((string)Request.QueryString["projecttime_id"] == null))
                {
                    Response.Redirect("./../../error_page.aspx?error=" + "Invalid query string in timesheet_summary.aspx");
                }

                // Security check
                if (!Convert.ToBoolean(Session["sgLFS_LABOUR_HOURS_FULL_EDITING"]))
                {
                    if (Request.QueryString["others"] == "no")
                    {
                        if (!Convert.ToBoolean(Session["sgLFS_LABOUR_HOURS_MY_TIMESHEETS_VIEW"]))
                        {
                            if (!Convert.ToBoolean(Session["sgLFS_LABOUR_HOURS_MY_TIMESHEETS_MANAGEMENT"]))
                            {
                                if (!Convert.ToBoolean(Session["sgLFS_LABOUR_HOURS_MY_TIMESHEETS_MANAGEMENT_WED"]))
                                {
                                    Response.Redirect("./../../error_page.aspx?error=" + "You are not authorized to view this page. Contact your system administrator.");
                                }
                            }
                        }
                    }
                    else
                    {
                        if (!Convert.ToBoolean(Session["sgLFS_LABOUR_HOURS_MY_TIMESHEETS_VIEW"]))
                        {
                            if (!Convert.ToBoolean(Session["sgLFS_LABOUR_HOURS_MY_TIMESHEETS_MANAGEMENT"]))
                            {
                                if (!Convert.ToBoolean(Session["sgLFS_LABOUR_HOURS_MY_TIMESHEETS_MANAGEMENT_WED"]))
                                {
                                    if (!Convert.ToBoolean(Session["sgLFS_LABOUR_HOURS_OTHERS_TIMESHEETS_VIEW"]))
                                    {
                                        if (!Convert.ToBoolean(Session["sgLFS_LABOUR_HOURS_OTHERS_TIMESHEETS_MANAGEMENT"]))
                                        {
                                            if (!Convert.ToBoolean(Session["sgLFS_LABOUR_HOURS_OTHERS_TIMESHEETS_MANAGEMENT_WED"]))
                                            {
                                                Response.Redirect("./../../error_page.aspx?error=" + "You are not authorized to view this page. Contact your system administrator.");
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                // Initialize viewstate's variables
                ViewState["others"] = Request.QueryString["others"];
                ViewState["employee_id"] = int.Parse(Request.QueryString["employee_id"]);
                ViewState["period_id"] = int.Parse(Request.QueryString["period_id"]);
                ViewState["projecttime_id"] = int.Parse(Request.QueryString["projecttime_id"]);
                System.Configuration.AppSettingsReader appSettingReader = new System.Configuration.AppSettingsReader();
                ViewState["LHMode"] = appSettingReader.GetValue("LABOUR_HOURS_OPERATION_MODE", typeof(System.String)).ToString();

                // Get ProjectTime record
                projectTimeTDS =  new ProjectTimeTDS();

                ProjectTimeGateway projectTimeGateway = new ProjectTimeGateway(projectTimeTDS);
                projectTimeGateway.LoadByProjectTimeId((int)ViewState["projecttime_id"]);

                // Store datasets
                Session["projectTimeTDS"] = projectTimeTDS;

                // Databind
                tbxDate.DataBind();
                tbxWorkingDetails.DataBind();
                tbxStartTime.DataBind();
                tbxEndTime.DataBind();
                tbxLunch.DataBind();
                tbxComments.DataBind();
                tbxState.DataBind();

                // Prepare initial data for client
                StoreNavigatorState();

                EmployeeGateway employeeGateway = new EmployeeGateway(new DataSet());
                employeeGateway.LoadByEmployeeId((int)ViewState["employee_id"]);
                tbxEmployee.Text = employeeGateway.GetFullName((int)ViewState["employee_id"]);

                int companyId = Int32.Parse(Session["companyID"].ToString());

                CompaniesGateway companiesGateway = new CompaniesGateway(new DataSet());
                companiesGateway.LoadAllByCompaniesId(projectTimeGateway.GetCompaniesId((int)ViewState["projecttime_id"]), companyId);
                tbxClient.Text = companiesGateway.GetName(projectTimeGateway.GetCompaniesId((int)ViewState["projecttime_id"]));

                ProjectGateway projectGateway = new ProjectGateway(new DataSet());
                projectGateway.LoadByProjectId(projectTimeGateway.GetProjectId((int)ViewState["projecttime_id"]));
                tbxProject.Text = projectGateway.GetName(projectTimeGateway.GetProjectId((int)ViewState["projecttime_id"])) + "(" + projectGateway.GetProjectNumber(projectTimeGateway.GetProjectId((int)ViewState["projecttime_id"])) + ")";

                if (projectGateway.GetFairWageApplies(projectTimeGateway.GetProjectId((int)ViewState["projecttime_id"])))
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:timesheet_summary.aspx.cs

示例5: 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_POINTREPAIRS_VIEW"]))
                {
                    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 pr_lining_plan.aspx");
                }

                // Tag Page
                hdfCompanyId.Value = Session["companyID"].ToString();
                hdfCurrentProjectId.Value = Request.QueryString["project_id"].ToString();
                hdfCurrentClientId.Value = Request.QueryString["client_id"].ToString();
                hdfWorkType.Value = "Point Repairs";

                // 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) + ") > Lining Plan";

                // ... for the grid
                prLiningPlanTDS = new PlLiningPlanTDS();
                int projectId = Int32.Parse(hdfCurrentProjectId.Value);

                PrLiningPlanGateway prLiningPlanGateway = new PrLiningPlanGateway(prLiningPlanTDS);
                prLiningPlanGateway.ClearBeforeFill = false;
                prLiningPlanGateway.Load(projectId, companyId);

                grdLiningPlan.DataSource = prLiningPlanGateway.Table;
                grdLiningPlan.DataBind();

                // Check results
                if (prLiningPlanTDS.PlLiningPlan.Rows.Count > 0)
                {
                    tPreview.Visible = true;
                    tdNoResults.Visible = false;
                    tbFooterToolbar.Visible = true;
                }
                else
                {
                    tPreview.Visible = false;
                    tdNoResults.Visible = true;
                    tbFooterToolbar.Visible = false;
                }

                // Check results
                if (prLiningPlanTDS.PlLiningPlan.Rows.Count == 1)
                {
                    tbFooterToolbar.Visible = false;
                }

                // Store dataset
                Session["prLiningPlanTDS"] = prLiningPlanTDS;
            }
            else
            {
                // Restore dataset
                prLiningPlanTDS = (PlLiningPlanTDS)Session["prLiningPlanTDS"];

                // ... for the grid
                PrLiningPlanGateway prLiningPlanGateway = new PrLiningPlanGateway(prLiningPlanTDS);
                grdLiningPlan.DataSource = prLiningPlanGateway.Table;
                grdLiningPlan.DataBind();
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:91,代码来源:pr_lining_plan.aspx.cs

示例6: Page_Load


//.........这里部分代码省略.........
                        ProjectNavigatorProjectBondingsBudget projectNavigatorProjectBondingsBudget = new ProjectNavigatorProjectBondingsBudget(projectNavigatorTDS);
                        projectNavigatorProjectBondingsBudget.LoadAllByProjectId(projectId);

                        // Get Insurances Budget
                        ProjectNavigatorProjectInsurancesBudget projectNavigatorProjectInsurancesBudget = new ProjectNavigatorProjectInsurancesBudget(projectNavigatorTDS);
                        projectNavigatorProjectInsurancesBudget.LoadAllByProjectId(projectId);

                        // Get Other Costs Budget
                        ProjectNavigatorProjectOtherCostsBudget projectNavigatorProjectOtherCostsBudget = new ProjectNavigatorProjectOtherCostsBudget(projectNavigatorTDS);
                        projectNavigatorProjectOtherCostsBudget.LoadAllByProjectId(projectId);

                        // Get Notes
                        ProjectNavigatorProjectNotes projectNavigatorProjectNotes = new ProjectNavigatorProjectNotes(projectNavigatorTDS);
                        projectNavigatorProjectNotes.LoadAllByProjectId(projectId);

                        //grdNotes.DataBind();
                        //grdServices.DataBind();
                        grdTypeOfWorkFunctionClassification.DataBind();
                        grdJobClassClassification.DataBind();
                        grdBudget.DataBind();
                        /*grdSubcontractorsBudget.DataBind();
                        grdHotelsBudget.DataBind();
                        grdBondingsBudget.DataBind();
                        grdInsurancesBudget.DataBind();*/
                        grdOtherCostsBudget.DataBind();

                        // Store dataset
                        Session["lfsProjectTDS"] = projectTDS;
                        Session["projectNavigatorTDS"] = projectNavigatorTDS;
                        Session["projectNotes"] = projectNavigatorTDS.ProjectNotes;
                        Session["projectServices"] = projectNavigatorTDS.ProjectService;
                        Session["projectTypeOfWorkFunctionClassification"] = projectNavigatorTDS.LFS_PROJECT_WORK_FUNCTION_FAIR_WAGE;
                        Session["projectJobClassClassification"] = projectNavigatorTDS.LFS_PROJECT_JOB_CLASS_TYPE_RATE;
                        Session["projectBudget"] = projectNavigatorTDS.ProjectWorkFunctionBudget;
                        Session["unitsBudget"] = projectNavigatorTDS.ProjectUnitsBudget;
                        Session["materialsBudget"] = projectNavigatorTDS.ProjectMaterialsBudget;
                        Session["subcontractorsBudget"] = projectNavigatorTDS.ProjectSubcontractorsBudget;
                        Session["hotelsBudget"] = projectNavigatorTDS.ProjectHotelsBudget;
                        Session["bondingsBudget"] = projectNavigatorTDS.ProjectBondingsBudget;
                        Session["insurancesBudget"] = projectNavigatorTDS.ProjectInsurancesBudget;
                        Session["otherCostsBudget"] = projectNavigatorTDS.ProjectOtherCostsBudget;
                    }
                }

                // Data for current project
                ProjectGateway projectGateway = new ProjectGateway(projectTDS);

                // ... for project
                int currentProjectId = Int32.Parse(hdfProjectId.Value.ToString());
                string name = projectGateway.GetName(currentProjectId);
                if (name.Length > 23) name = name.Substring(0, 20) + "...";
                lblTitleProjectName.Text = name + " (" + projectGateway.GetProjectNumber(currentProjectId) + ")";

                // ... for client
                int companyId = Int32.Parse(hdfCompanyId.Value);
                int currentClientId = projectGateway.GetClientID(Int32.Parse(hdfProjectId.Value.ToString()));
                CompaniesGateway companiesGateway = new CompaniesGateway();
                companiesGateway.LoadAllByCompaniesId(currentClientId, companyId);
                lblTitleClientName.Text = "Client: " + companiesGateway.GetName(currentClientId);

                // Load Data
                LoadData();

                // Store Dataset
                Session["lfsProjectTDS"] = projectTDS;

                //// ... For total cost at services
                //ProjectNavigatorProjectService projectNavigatorProjectServiceForCost = new ProjectNavigatorProjectService(projectNavigatorTDS);
                //tbxTotalCost.Text = Decimal.Round(projectNavigatorProjectServiceForCost.GetTotalCost(), 2).ToString();
            }
            else
            {
                // Restore dataset
                projectTDS = (ProjectTDS)Session["lfsProjectTDS"];
                projectNavigatorTDS = (ProjectNavigatorTDS)Session["projectNavigatorTDS"];
                projectNotes = (ProjectNavigatorTDS.ProjectNotesDataTable)Session["projectNotes"];
                projectServices = (ProjectNavigatorTDS.ProjectServiceDataTable)Session["projectServices"];
                projectJobClassClassification = (ProjectNavigatorTDS.LFS_PROJECT_JOB_CLASS_TYPE_RATEDataTable)Session["projectJobClassClassification"];
                projectTypeOfWorkFunctionClassification = (ProjectNavigatorTDS.LFS_PROJECT_WORK_FUNCTION_FAIR_WAGEDataTable)Session["projectTypeOfWorkFunctionClassification"];
                projectBudget = (ProjectNavigatorTDS.ProjectWorkFunctionBudgetDataTable)Session["projectBudget"];
                unitsBudget = (ProjectNavigatorTDS.ProjectUnitsBudgetDataTable)Session["unitsBudget"];
                materialsBudget = (ProjectNavigatorTDS.ProjectMaterialsBudgetDataTable)Session["materialsBudget"];
                subcontractorsBudget = (ProjectNavigatorTDS.ProjectSubcontractorsBudgetDataTable)Session["subcontractorsBudget"];
                hotelsBudget = (ProjectNavigatorTDS.ProjectHotelsBudgetDataTable)Session["hotelsBudget"];
                bondingsBudget = (ProjectNavigatorTDS.ProjectBondingsBudgetDataTable)Session["bondingsBudget"];
                insurancesBudget = (ProjectNavigatorTDS.ProjectInsurancesBudgetDataTable)Session["insurancesBudget"];
                otherCostsBudget = (ProjectNavigatorTDS.ProjectOtherCostsBudgetDataTable)Session["otherCostsBudget"];

                tbxProjectNumber.DataBind();

                if (Session["lfsLibraryTDS"] != null)
                {
                    libraryTDS = (LibraryTDS)Session["lfsLibraryTDS"];
                }
                else
                {
                    libraryTDS = new LibraryTDS();
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:project_edit.aspx.cs

示例7: Save

        // ////////////////////////////////////////////////////////////////////////
        // METHODS
        //
        private void Save()
        {
            bool existsAtGrid = false;

            // Validate page
            if (Page.IsValid)
            {
                SelectProjectLastUsedProjectsGateway selectProjectLastUsedProjectsVerifyGateway = new SelectProjectLastUsedProjectsGateway(selectProjectTDS);
                if (selectProjectLastUsedProjectsVerifyGateway.Table.Rows.Count > 0)
                {
                    // If exists the project in the grid
                    foreach (GridViewRow row in grdProjects.Rows)
                    {
                        // Grid Data
                        int gridClientId = Int32.Parse(((Label)row.FindControl("lblClientId")).Text.Trim());
                        int gridProjectId = Int32.Parse(((Label)row.FindControl("lblProjectId")).Text.Trim());
                        int gridUserId = Int32.Parse(((Label)row.FindControl("lblUserId")).Text.Trim());
                        int gridCompanyId = Int32.Parse(((Label)row.FindControl("lblCompanyId")).Text.Trim());
                        DateTime gridLastLoggedInDate = DateTime.Parse(((Label)row.FindControl("lblLastLoggedInDate")).Text.Trim());
                        string workType = hdfWorkType.Value;

                        // New Data
                        DateTime newLastLoggedInDate = DateTime.Now;

                        if ((gridClientId.ToString() == ddlClient.SelectedValue) && (gridProjectId.ToString() == ddlProject.SelectedValue) && (gridUserId == Int32.Parse(hdfLoginId.Value)) && (gridCompanyId == Int32.Parse(hdfCompanyId.Value)))
                        {
                            // Update if exists
                            SelectProjectLastUsedProjects model = new SelectProjectLastUsedProjects(selectProjectTDS);
                            model.UpdateLogginDate(gridClientId, gridProjectId, gridUserId, gridLastLoggedInDate, gridCompanyId, false, workType, newLastLoggedInDate);
                            existsAtGrid = true;
                        }

                        Session["selectProjectTDS"] = selectProjectTDS;
                        Session["lastUsedProjects"] = selectProjectTDS.LastUsedProjects;

                        grdProjects.DataBind();
                        grdProjects.PageIndex = grdProjects.PageCount - 1;
                    }
                }

                // If doesn't exists at grid
                if (!existsAtGrid)
                {
                    if (grdProjects.Rows.Count < 5)
                    {
                        // Add data if exist at grid's foot
                        GrdProjectAdd();
                    }
                    else
                    {
                        int index = 1;
                        foreach (GridViewRow row in grdProjects.Rows)
                        {
                            if (index == 5)
                            {
                                // Grid Data
                                int gridClientId = Int32.Parse(((Label)row.FindControl("lblClientId")).Text.Trim());
                                int gridProjectId = Int32.Parse(((Label)row.FindControl("lblProjectId")).Text.Trim());
                                int gridUserId = Int32.Parse(((Label)row.FindControl("lblUserId")).Text.Trim());
                                int gridCompanyId = Int32.Parse(((Label)row.FindControl("lblCompanyId")).Text.Trim());
                                DateTime gridLastLoggedInDate = DateTime.Parse(((Label)row.FindControl("lblLastLoggedInDate")).Text.Trim());
                                string workType = hdfWorkType.Value;

                                // New Data
                                int newProjectId = Int32.Parse(ddlProject.SelectedValue);
                                int newClientId = Int32.Parse(ddlClient.SelectedValue);
                                int newCompanyId = Int32.Parse(hdfCompanyId.Value);
                                int newUserId = Convert.ToInt32(Session["loginID"]);
                                DateTime newLastLoggedInDate = DateTime.Now;
                                string newWorkType = hdfWorkType.Value;

                                ProjectGateway projectGateway = new ProjectGateway();
                                projectGateway.LoadByProjectId(newProjectId);
                                string newProjectName = projectGateway.GetName(newProjectId) + " (" + projectGateway.GetProjectNumber(newProjectId) + ")";

                                int companyId = Int32.Parse(hdfCompanyId.Value);
                                CompaniesGateway companiesGateway = new CompaniesGateway();
                                companiesGateway.LoadByCompaniesId(newClientId, companyId);
                                string newClientName = companiesGateway.GetName(newClientId);

                                // Update if exists
                                SelectProjectLastUsedProjects model = new SelectProjectLastUsedProjects(selectProjectTDS);
                                model.Update(gridClientId, gridProjectId, gridUserId, gridCompanyId, workType, newClientId, newProjectId, newUserId, newLastLoggedInDate, newCompanyId, false, newWorkType, newProjectName, newClientName);
                            }

                            index = index + 1;
                        }

                        Session["selectProjectTDS"] = selectProjectTDS;
                        Session["lastUsedProjects"] = selectProjectTDS.LastUsedProjects;

                        grdProjects.DataBind();
                        grdProjects.PageIndex = grdProjects.PageCount - 1;
                    }
                }

                // Update data at bd
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:select_project.aspx.cs

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

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

示例10: btnExportList_Click

        protected void btnExportList_Click(object sender, EventArgs e)
        {
            string url = "";

            string headerValues = "";
            int totalColumnsExport = 53;
            int totalColumnsPreview = 52;
            string client = "";
            string name = "";
            string project = "";
            string title = "Rehab Assessment 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 (grdRANavigator.Columns[2].Visible) headerValues += "ID (Section)";
            if (grdRANavigator.Columns[3].Visible) headerValues += " * Old CWP ID";
            if (grdRANavigator.Columns[4].Visible) headerValues += " * Sub Area";
            if (grdRANavigator.Columns[5].Visible) headerValues += " * Street";
            if (grdRANavigator.Columns[6].Visible) headerValues += " * USMH";
            if (grdRANavigator.Columns[7].Visible) headerValues += " * DSMH";
            if (grdRANavigator.Columns[8].Visible) headerValues += " * Pre-Flush Date";
            if (grdRANavigator.Columns[9].Visible) headerValues += " * Pre-Video Date";
            if (grdRANavigator.Columns[10].Visible) headerValues += " * Map Size";
            if (grdRANavigator.Columns[11].Visible) headerValues += " * Map Length";
            if (grdRANavigator.Columns[12].Visible) headerValues += " * Thickness";
            if (grdRANavigator.Columns[13].Visible) headerValues += " * Size_";
            if (grdRANavigator.Columns[14].Visible) headerValues += " * Length";
            if (grdRANavigator.Columns[15].Visible) headerValues += " * Comments";
            if (grdRANavigator.Columns[16].Visible) headerValues += " * VideoLength";
            if (grdRANavigator.Columns[17].Visible) headerValues += " * Laterals";
            if (grdRANavigator.Columns[18].Visible) headerValues += " * LiveLaterals";
            if (grdRANavigator.Columns[19].Visible) headerValues += " * ClientID";
            if (grdRANavigator.Columns[20].Visible) headerValues += " * P1Date";
            if (grdRANavigator.Columns[21].Visible) headerValues += " * CXIsRemoved";
            if (grdRANavigator.Columns[22].Visible) headerValues += " * M1Date";
            if (grdRANavigator.Columns[23].Visible) headerValues += " * MeasurementTakenBy";
            if (grdRANavigator.Columns[24].Visible) headerValues += " * MaterialType";
            if (grdRANavigator.Columns[25].Visible) headerValues += " * USMHAddress";
            if (grdRANavigator.Columns[26].Visible) headerValues += " * USMHDepth";
            if (grdRANavigator.Columns[27].Visible) headerValues += " * USMHMouth12";
            if (grdRANavigator.Columns[28].Visible) headerValues += " * USMHMouth1";
            if (grdRANavigator.Columns[29].Visible) headerValues += " * USMHMouth2";
            if (grdRANavigator.Columns[30].Visible) headerValues += " * USMHMouth3";
            if (grdRANavigator.Columns[31].Visible) headerValues += " * USMHMouth4";
            if (grdRANavigator.Columns[32].Visible) headerValues += " * USMHMouth5";
            if (grdRANavigator.Columns[33].Visible) headerValues += " * DSMHAddress";
            if (grdRANavigator.Columns[34].Visible) headerValues += " * DSMHDepth";
            if (grdRANavigator.Columns[35].Visible) headerValues += " * DSMHMouth12";
            if (grdRANavigator.Columns[36].Visible) headerValues += " * DSMHMouth1";
            if (grdRANavigator.Columns[37].Visible) headerValues += " * DSMHMouth2";
            if (grdRANavigator.Columns[38].Visible) headerValues += " * DSMHMouth3";
            if (grdRANavigator.Columns[39].Visible) headerValues += " * DSMHMouth4";
            if (grdRANavigator.Columns[40].Visible) headerValues += " * DSMHMouth5";
            if (grdRANavigator.Columns[41].Visible) headerValues += " * TrafficControl";
            if (grdRANavigator.Columns[42].Visible) headerValues += " * SiteDetails";
            if (grdRANavigator.Columns[43].Visible) headerValues += " * PipeSizeChange";
            if (grdRANavigator.Columns[44].Visible) headerValues += " * StandardBypass";
            if (grdRANavigator.Columns[45].Visible) headerValues += " * StandardBypassComments";
            if (grdRANavigator.Columns[46].Visible) headerValues += " * TrafficControlDetails";
            if (grdRANavigator.Columns[47].Visible) headerValues += " * MeasurementType";
            if (grdRANavigator.Columns[48].Visible) headerValues += " * MeasurementFromMH";
            if (grdRANavigator.Columns[49].Visible) headerValues += " * VideoDoneFromMH";
            if (grdRANavigator.Columns[50].Visible) headerValues += " * VideoDoneToMH";
            if (grdRANavigator.Columns[51].Visible) headerValues += " * RoboticPrepCompleted";
            if (grdRANavigator.Columns[52].Visible) headerValues += " * RoboticPrepCompleted Date";

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

示例11: Save

        // ////////////////////////////////////////////////////////////////////////
        // PRIVATE METHODS
        //
        private void Save()
        {
            bool exists = false;

            // Validate page
            if (Page.IsValid)
            {
                int projectIdToSave = Int32.Parse(hdfSelectedProjectId.Value);

                ProjectSelectProjectLastUsedProjectsGateway projectSelectProjectLastUsedProjectsVerifyGateway = new ProjectSelectProjectLastUsedProjectsGateway(projectSelectProjectTDS);
                ProjectSelectProjectLastUsedProjects projectSelectProjectLastUsedProjectsVerify = new ProjectSelectProjectLastUsedProjects(projectSelectProjectLastUsedProjectsVerifyGateway.Data);
                exists = projectSelectProjectLastUsedProjectsVerify.ExistProject(projectIdToSave);

                if (exists)
                {
                    // New Data
                    DateTime newLastLoggedInDate = DateTime.Now;

                    // Update if exists
                    ProjectSelectProjectLastUsedProjects model = new ProjectSelectProjectLastUsedProjects(projectSelectProjectTDS);
                    model.UpdateLogginDate(projectIdToSave, newLastLoggedInDate);

                    Session["projectSelectProjectTDS"] = projectSelectProjectTDS;
                    Session["projectLastUsedProjects"] = projectSelectProjectTDS.LastUsedProjects;
                }

                // If doesn't exists at grid
                if (!exists)
                {
                    if (projectSelectProjectLastUsedProjectsVerifyGateway.Table.Rows.Count < 5)
                    {
                        // Add data if exist at grid's
                        ProjectAdd();
                    }
                    else
                    {
                        if (projectSelectProjectLastUsedProjectsVerifyGateway.Table.Rows.Count == 5)
                        {
                            // New Data
                            int newProjectId = Int32.Parse(hdfSelectedProjectId.Value);
                            int newCompanyId = Int32.Parse(hdfCompanyId.Value);
                            int newUserId = Convert.ToInt32(Session["loginID"]);
                            DateTime newLastLoggedInDate = DateTime.Now;

                            ProjectGateway projectGateway = new ProjectGateway();
                            projectGateway.LoadByProjectId(newProjectId);
                            string newProjectName = projectGateway.GetName(newProjectId) + " (" + projectGateway.GetProjectNumber(newProjectId) + ")";

                            // Update if exists
                            ProjectSelectProjectLastUsedProjects model = new ProjectSelectProjectLastUsedProjects(projectSelectProjectTDS);
                            model.Update(newProjectId, newUserId, newLastLoggedInDate, newCompanyId, false, newProjectName);

                            Session["projectSelectProjectTDS"] = projectSelectProjectTDS;
                            Session["projectLastUsedProjects"] = projectSelectProjectTDS.LastUsedProjects;
                        }
                    }
                }

                // Update data at bd
                UpdateDatabase();
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:65,代码来源:Projects2.aspx.cs

示例12: ProjectAdd

        private void ProjectAdd()
        {
            if (Page.IsValid)
            {
                int projectId = Int32.Parse(hdfSelectedProjectId.Value);
                int companyId = Int32.Parse(hdfCompanyId.Value);
                int loginId = Convert.ToInt32(Session["loginID"]);
                DateTime lastLoggedInDate = DateTime.Now;
                bool deleted = false;

                ProjectGateway projectGateway = new ProjectGateway();
                projectGateway.LoadByProjectId(projectId);
                string projectName = projectGateway.GetName(projectId) + " (" + projectGateway.GetProjectNumber(projectId) + ")";

                ProjectSelectProjectLastUsedProjects model = new ProjectSelectProjectLastUsedProjects(projectSelectProjectTDS);
                model.Insert(projectId, loginId, lastLoggedInDate, companyId, deleted, projectName, false);

                Session.Remove("lastUsedProjectsDummy");
                Session["projectSelectProjectTDS"] = projectSelectProjectTDS;
                Session["projectLastUsedProjects"] = projectSelectProjectTDS.LastUsedProjects;
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:22,代码来源:Projects2.aspx.cs

示例13: 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 = 85;
                int totalColumnsPreview = 84;
                string client = "";
                string name = "";
                string project = "";
                string title = "Full Length Lining 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 (grdFLNavigator.Columns[2].Visible) headerValues += "ID (Section)";
                if (grdFLNavigator.Columns[3].Visible) headerValues += " * Old CWP ID";
                if (grdFLNavigator.Columns[4].Visible) headerValues += " * Sub Area";
                if (grdFLNavigator.Columns[5].Visible) headerValues += " * Street";
                if (grdFLNavigator.Columns[6].Visible) headerValues += " * USMH";
                if (grdFLNavigator.Columns[7].Visible) headerValues += " * DSMH";
                if (grdFLNavigator.Columns[8].Visible) headerValues += " * Proposed Lining Date";
                if (grdFLNavigator.Columns[9].Visible) headerValues += " * Deadline Lining Date";
                if (grdFLNavigator.Columns[10].Visible) headerValues += " * P1 Date";
                if (grdFLNavigator.Columns[11].Visible) headerValues += " * M1 Date";
                if (grdFLNavigator.Columns[12].Visible) headerValues += " * M2 Date";
                if (grdFLNavigator.Columns[13].Visible) headerValues += " * Install Date";
                if (grdFLNavigator.Columns[14].Visible) headerValues += " * Final Video Date";
                if (grdFLNavigator.Columns[15].Visible) headerValues += " * Confirmed Size";
                if (grdFLNavigator.Columns[16].Visible) headerValues += " * Actual Length";
                if (grdFLNavigator.Columns[17].Visible) headerValues += " * Thickness";
                if (grdFLNavigator.Columns[18].Visible) headerValues += " * Comments";
                if (grdFLNavigator.Columns[19].Visible) headerValues += " * Map Size";
                if (grdFLNavigator.Columns[20].Visible) headerValues += " * Map Length";
                if (grdFLNavigator.Columns[21].Visible) headerValues += " * Video Length";
                if (grdFLNavigator.Columns[22].Visible) headerValues += " * Laterals";
                if (grdFLNavigator.Columns[23].Visible) headerValues += " * Live Laterals";
                if (grdFLNavigator.Columns[24].Visible) headerValues += " * Client ID";
                if (grdFLNavigator.Columns[25].Visible) headerValues += " * Pre-Flush Date";
                if (grdFLNavigator.Columns[26].Visible) headerValues += " * Pre-Video Date";
                if (grdFLNavigator.Columns[27].Visible) headerValues += " * Issue Identified";
                if (grdFLNavigator.Columns[28].Visible) headerValues += " * Issue LFS";
                if (grdFLNavigator.Columns[29].Visible) headerValues += " * Issue Client";
                if (grdFLNavigator.Columns[30].Visible) headerValues += " * Issue Sales";
                if (grdFLNavigator.Columns[31].Visible) headerValues += " * Issue Given To Client";
                if (grdFLNavigator.Columns[32].Visible) headerValues += " * Issue Investigation";
                if (grdFLNavigator.Columns[33].Visible) headerValues += " * Issue Resolved";
                if (grdFLNavigator.Columns[34].Visible) headerValues += " * CXIs Removed";
                if (grdFLNavigator.Columns[35].Visible) headerValues += " * Material Type";
                if (grdFLNavigator.Columns[36].Visible) headerValues += " * USMH Address";
                if (grdFLNavigator.Columns[37].Visible) headerValues += " * USMH Depth";
                if (grdFLNavigator.Columns[38].Visible) headerValues += " * USMH Mouth12";
                if (grdFLNavigator.Columns[39].Visible) headerValues += " * USMH Mouth1";
                if (grdFLNavigator.Columns[40].Visible) headerValues += " * USMH Mouth2";
                if (grdFLNavigator.Columns[41].Visible) headerValues += " * USMH Mouth3";
                if (grdFLNavigator.Columns[42].Visible) headerValues += " * USMH Mouth4";
                if (grdFLNavigator.Columns[43].Visible) headerValues += " * USMH Mouth5";
                if (grdFLNavigator.Columns[44].Visible) headerValues += " * DSMH Address";
                if (grdFLNavigator.Columns[45].Visible) headerValues += " * DSMH Depth";
                if (grdFLNavigator.Columns[46].Visible) headerValues += " * DSMH Mouth12";
                if (grdFLNavigator.Columns[47].Visible) headerValues += " * DSMH Mouth1";
                if (grdFLNavigator.Columns[48].Visible) headerValues += " * DSMH Mouth2";
                if (grdFLNavigator.Columns[49].Visible) headerValues += " * DSMH Mouth3";
                if (grdFLNavigator.Columns[50].Visible) headerValues += " * DSMH Mouth4";
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:fl_navigator2.aspx.cs

示例14: btnPrintLateralLocationSheet_Click

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

            if (!scriptManager.IsInAsyncPostBack)
            {
                string url = "";
                string client = "";
                string name = "";
                string project = "";
                string title = "Full Length Lining Search Results";

                // ... for client
                int currentClientId = Int32.Parse(hdfCurrentClientId.Value.ToString());
                int companyId = Int32.Parse(hdfCompanyId.Value);
                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);
                }

                // Report call
                Page.Validate();
                if (Page.IsValid)
                {
                    PostPageChanges();

                    int assetId = GetAssetId();
                    if (assetId > 0)
                    {
                        WorkGateway workGateway = new WorkGateway();
                        workGateway.LoadByProjectIdAssetIdWorkType(Int32.Parse(hdfCurrentProjectId.Value), assetId, "Full Length Lining", Int32.Parse(hdfCompanyId.Value));
                        int workId = workGateway.GetWorkId(assetId, "Full Length Lining", Int32.Parse(hdfCurrentProjectId.Value));

                        FullLengthLiningWorkDetailsGateway fullLengthLiningWorkDetailsGateway = new FullLengthLiningWorkDetailsGateway();
                        fullLengthLiningWorkDetailsGateway.LoadByWorkIdAssetId(workId, assetId, Int32.Parse(hdfCompanyId.Value));
                        string measuredFrom = fullLengthLiningWorkDetailsGateway.GetMeasurementFromMh(workId);

                        Response.Write("<script language='javascript'> {window.open('./../../CWP/Common/lateral_location_sheet_report.aspx?source_page=lm&project_id=" + hdfCurrentProjectId.Value + "&client_id=" + hdfCurrentClientId.Value + "&work_id=" + workId.ToString() + "&measured_from=" + measuredFrom + "&asset_id=" + assetId.ToString() + "', '_blank', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=800, height=680');}</script>");
                    }
                    else
                    {
                        cvSelection.IsValid = false;
                    }
                }

                if (url != "") Response.Redirect(url);
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:67,代码来源:fl_navigator2.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_JUNCTIONLINING_VIEW"])))
                {
                    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 jls_navigator.aspx");
                }

                // Tag Page
                hdfCompanyId.Value = Session["companyID"].ToString();
                hdfCurrentProjectId.Value = Request.QueryString["project_id"].ToString();
                hdfCurrentClientId.Value = Request.QueryString["client_id"].ToString();

                // Prepare initial data
                // ... For sortByList
                odsSortByList.DataBind();
                ddlSortBy.DataSourceID = "odsSortByList";
                ddlSortBy.DataValueField = "SortID";
                ddlSortBy.DataTextField = "Name";
                ddlSortBy.DataBind();

                // ... For
                odsViewForDisplayList.DataBind();
                ddlCondition1.DataSourceID = "odsViewForDisplayList";
                ddlCondition1.DataValueField = "ConditionID";
                ddlCondition1.DataTextField = "Name";
                ddlCondition1.DataBind();

                // ... 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) + ")";

                // If coming from

                // ... Left Menu
                if ((Request.QueryString["source_page"] == "lm") || (Request.QueryString["source_page"] == "select_project.aspx"))
                {
                    tdNoResults.Visible = false;
                }

                // ... jls_navigator2.aspx
                if (Request.QueryString["source_page"] == "jls_navigator2.aspx")
                {
                    RestoreNavigatorState();
                    if ((string)Request.QueryString["no_results"] == "yes")
                    {
                        tdNoResults.Visible = true;
                    }
                    else
                    {
                        tdNoResults.Visible = true;
                    }
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:81,代码来源:jls_navigator.aspx.cs


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