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


C# ProjectGateway.GetProvinceID方法代码示例

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


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

示例1: TagPage

        private void TagPage()
        {
            hdfCompanyId.Value = Session["companyID"].ToString();
            hdfCurrentProjectId.Value = Request.QueryString["project_id"].ToString();
            hdfCurrentClientId.Value = Request.QueryString["client_id"].ToString();
            hdfWorkType.Value = "Full Length Lining";
            hdfAssetId.Value = Request.QueryString["asset_id"].ToString();
            hdfErrorFieldList.Value = "";

            // Get ids & location
            int projectId = Int32.Parse(hdfCurrentProjectId.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 workId
            int companyId = Int32.Parse(hdfCompanyId.Value);
            int assetId = Int32.Parse(hdfAssetId.Value);
            string workType = hdfWorkType.Value;

            WorkGateway workGateway = new WorkGateway();
            workGateway.LoadByProjectIdAssetIdWorkType(projectId, assetId, workType, companyId);
            hdfWorkId.Value = workGateway.GetWorkId(assetId, workType, projectId).ToString();
            hdfWorkIdJl.Value = GetWorkId(projectId, assetId, "Junction Lining Section", companyId).ToString();
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:35,代码来源:fl_edit.aspx.cs

示例2: UpdateDatabase

        private void UpdateDatabase()
        {
            // Get ids & location
            int projectId = Int32.Parse(hdfCurrentProjectId.Value.Trim());
            ProjectGateway projectGateway = new ProjectGateway();
            projectGateway.LoadByProjectId(projectId);

            Int64 countryId = projectGateway.GetCountryID(projectId);
            Int64? provinceId = null; if (projectGateway.GetProvinceID(projectId).HasValue) provinceId = (Int64)projectGateway.GetProvinceID(projectId);
            Int64? countyId = null; if (projectGateway.GetCountyID(projectId).HasValue) countyId = (Int64)projectGateway.GetCountyID(projectId);
            Int64? cityId = null; if (projectGateway.GetCityID(projectId).HasValue) cityId = (Int64)projectGateway.GetCityID(projectId);

            string workType = hdfWorkType.Value.Trim();
            int companyId = Int32.Parse(hdfCompanyId.Value);
            int workId = Int32.Parse(hdfWorkId.Value);
            int sectionAssetId = Int32.Parse(hdfAssetId.Value);
            bool isNewMeasuredFromDsmh = false;

            FullLengthLiningLateralDetails flLateralDetails = new FullLengthLiningLateralDetails();
            flLateralDetails.LoadForEdit(workId, sectionAssetId, companyId, projectId);

            if (flLateralDetails.Table.Rows.Count == 0)
            {
                if (ddlM1DataMeasuredFromMh.SelectedValue == "DSMH")
                {
                    isNewMeasuredFromDsmh = true;
                    FullLengthLiningLateralDetails fllLateralDetails = new FullLengthLiningLateralDetails(fullLengthLiningTDS);
                    fllLateralDetails.ModifyLateralId();
                }
            }

            DB.Open();
            DB.BeginTransaction();
            try
            {
                // Save lateral details
                // Save lateral details
                bool roboticPrepCompleted = ckbxPrepDataRoboticPrepCompleted.Checked;
                DateTime? roboticPrepCompletedCompleted = null; if (tkrdpPrepDataRoboticPrepCompletedDate.SelectedDate.HasValue) roboticPrepCompletedCompleted = tkrdpPrepDataRoboticPrepCompletedDate.SelectedDate.Value;

                FullLengthLiningLateralDetails fullLengthLiningLateralDetails = new FullLengthLiningLateralDetails(fullLengthLiningTDS);
                fullLengthLiningLateralDetails.Save(workId, projectId, sectionAssetId, countryId, provinceId, countyId, cityId, tbxVideoLength.Text.Trim(), companyId, isNewMeasuredFromDsmh, roboticPrepCompleted, roboticPrepCompletedCompleted);

                // Save catalyst details
                string newRunDetails = "";
                foreach (ListItem lst in cbxlSectionId.Items)
                {
                    if (lst.Selected)
                    {
                        newRunDetails = newRunDetails + lst.Value + ">";
                    }
                }
                newRunDetails = newRunDetails.Substring(0, newRunDetails.Length - 1);
                FullLengthLiningWetOutCatalystsDetails fullLengthLiningWetOutCatalystsDetails = new FullLengthLiningWetOutCatalystsDetails(fullLengthLiningTDS);
                fullLengthLiningWetOutCatalystsDetails.Save(companyId, newRunDetails, projectId);

                // Save section details
                FullLengthLiningSectionDetails fullLengthLiningSectionDetails = new FullLengthLiningSectionDetails(fullLengthLiningTDS);
                fullLengthLiningSectionDetails.Save(countryId, provinceId, countyId, cityId, projectId, companyId);

                // Save work details
                FullLengthLiningWorkDetails fullLengthLiningWorkDetails = new FullLengthLiningWorkDetails(fullLengthLiningTDS);
                fullLengthLiningWorkDetails.Save(countryId, provinceId, countyId, cityId, projectId, sectionAssetId, companyId, ckbxWetOutDataIncludeWetOutInformation.Checked, ckbxInversionDataIncludeInversionInformation.Checked);

                // Save material details
                string newMaterial = ddlM1DataMaterial.SelectedValue;

                if (ddlM1DataMaterial.SelectedIndex > 0)
                {
                    LfsAssetSewerLateralGateway lfsAssetSewertLateralGateway = new LfsAssetSewerLateralGateway(null);
                    if (!lfsAssetSewertLateralGateway.IsUsedInMaterials(sectionAssetId, newMaterial, companyId))
                    {
                        MaterialInformation materialInformation = new MaterialInformation(materialInformationTDS);
                        materialInformation.Save(companyId);
                    }
                }

                DB.CommitTransaction();

                // Store datasets
                fullLengthLiningTDS.AcceptChanges();
                Session["fullLengthLiningTDS"] = fullLengthLiningTDS;

                materialInformationTDS.AcceptChanges();
                Session["materialInformationTDS"] = materialInformationTDS;
            }
            catch (Exception ex)
            {
                DB.RollbackTransaction();

                string url = string.Format("./../../error_page.aspx?error={0}", ex.Message.Replace('\n', ' '));
                Response.Redirect(url);
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:94,代码来源:fl_edit.aspx.cs

示例3: UpdateDatabase

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

            Int64? countryId = null;
            Int64? provinceId = null;
            Int64? countyId = null;
            Int64? cityId = null;

            if (projectGateway.Table.Rows.Count > 0)
            {
                // ... Get ids
                try
                {//TODO MH
                    countryId = projectGateway.GetCountryID(projectId);
                }
                catch
                {
                }
                if (projectGateway.GetProvinceID(projectId).HasValue) provinceId = (Int64)projectGateway.GetProvinceID(projectId);
                if (projectGateway.GetCountyID(projectId).HasValue) countyId = (Int64)projectGateway.GetCountyID(projectId);
                if (projectGateway.GetCityID(projectId).HasValue) cityId = (Int64)projectGateway.GetCityID(projectId);
            }

            string workType = hdfWorkType.Value.Trim();
            int companyId = Int32.Parse(hdfCompanyId.Value);
            int workId = Int32.Parse(hdfWorkId.Value);
            int assetId = Int32.Parse(hdfAssetId.Value);
            bool inProject = bool.Parse(hdfInProject.Value);

            DB.Open();
            DB.BeginTransaction();
            try
            {
                // Save section details
                ManholeRehabilitationManholeDetails manholeRehabilitationManholeDetails = new ManholeRehabilitationManholeDetails(manholeRehabilitationTDS);
                manholeRehabilitationManholeDetails.Save(countryId, provinceId, countyId, cityId, projectId, companyId);

                // Save work details
                ManholeRehabilitationWorkDetails fullLengthLiningWorkDetails = new ManholeRehabilitationWorkDetails(manholeRehabilitationTDS);
                workId = fullLengthLiningWorkDetails.Save(countryId, provinceId, countyId, cityId, projectId, assetId, companyId, inProject);

                DB.CommitTransaction();

                // Store datasets
                manholeRehabilitationTDS.AcceptChanges();
                Session["manholeRehabilitationTDS"] = manholeRehabilitationTDS;
            }
            catch (Exception ex)
            {
                DB.RollbackTransaction();

                string url = string.Format("./../../error_page.aspx?error={0}", ex.Message.Replace('\n', ' '));
                Response.Redirect(url);
            }

            return workId;
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:61,代码来源:mr_edit.aspx.cs

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

示例5: Save

        /// <summary>
        /// Save
        /// </summary>
        /// <param name="projectId">projectId</param>
        /// <param name="countryId">countryId</param>
        /// <param name="provinceId">provinceId</param>
        /// <param name="countyId">countyId</param>
        /// <param name="cityId">cityId</param>
        /// <param name="companyId">companyId</param>
        /// <param name="loginId">loginId</param>
        public void Save(int companyId, int loginId)
        {
            foreach (DataMigrationTDS.JlDataMigrationRow row in (DataMigrationTDS.JlDataMigrationDataTable)Table)
            {
                // Get ids & location
                ProjectGateway projectGateway = new ProjectGateway();
                DataMigrationProjectGateway dataMigrationProjectGateway = new DataMigrationProjectGateway(null);
                string name = string.Format("{0} Data Migration Project", row.Client);

                int projectId = dataMigrationProjectGateway.GetProjectIdByName(name);

                if (projectId != 0)
                {
                    projectGateway.LoadByProjectId(projectId);

                    // get parameters
                    Int64 countryId = projectGateway.GetCountryID(projectId);
                    Int64? provinceId = null; if (projectGateway.GetProvinceID(projectId).HasValue) provinceId = projectGateway.GetProvinceID(projectId);
                    Int64? countyId = null; if (projectGateway.GetCountyID(projectId).HasValue) countyId = projectGateway.GetCountyID(projectId);
                    Int64? cityId = null; if (projectGateway.GetCityID(projectId).HasValue) cityId = projectGateway.GetCityID(projectId);

                    //Save section
                    int section_assetId = SaveSection(row, projectId, countryId, provinceId, countyId, cityId, companyId);
                    Guid originalId = row.OriginalID;

                    if (row.JLiner)
                    {
                        SaveJLWork(originalId, section_assetId, row.NumLats, row.NotLinedYet, row.AllMeasured, row.IssueWithLaterals, row.NotMeasuredYet, row.NotDeliveredYet, projectId, countryId, provinceId, countyId, cityId, companyId);
                    }

                    // Insert in DataMigration Table
                    string originalSectionId = row.OriginalSectionID;
                    AssetSewerSectionGateway assetSewerSectionGateway = new AssetSewerSectionGateway();
                    assetSewerSectionGateway.LoadByAssetId(section_assetId, companyId);
                    string newSectionId = assetSewerSectionGateway.GetSectionId(section_assetId);

                    DataMigrationGateway dataMigrationGateway = new DataMigrationGateway(null);
                    dataMigrationGateway.InsertDataMigration(originalId, originalSectionId, section_assetId, newSectionId);
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:51,代码来源:JlDataMigration.cs

示例6: TagPage

        private void TagPage()
        {
            hdfCompanyId.Value = Session["companyID"].ToString();
            hdfCurrentProjectId.Value = Request.QueryString["project_id"].ToString();
            hdfCurrentClientId.Value = Request.QueryString["client_id"].ToString();
            hdfWorkType.Value = "Manhole Rehabilitation";
            hdfAssetId.Value = Request.QueryString["asset_id"].ToString();
            hdfActiveTab.Value = Request.QueryString["active_tab"].ToString();
            hdfInProject.Value = Request.QueryString["in_project"].ToString();
            hdfExistBatchId.Value = "False";

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

            if (projectGateway.Table.Rows.Count > 0)
            {
                // ... 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();
            }
            else
            {
                hdfCountryId.Value = "";
                hdfProvinceId.Value = "";
                hdfCountyId.Value = "";
                hdfCityId.Value = "";
            }

            // Get workId
            int companyId = Int32.Parse(hdfCompanyId.Value);
            int assetId = Int32.Parse(hdfAssetId.Value);
            string workType = hdfWorkType.Value;

            WorkGateway workGateway = new WorkGateway();
            hdfWorkId.Value = "0";

            workGateway.LoadByProjectIdAssetIdWorkType(projectId, assetId, workType, companyId);

            if (workGateway.Table.Rows.Count > 0)
            {
                hdfWorkId.Value = workGateway.GetWorkId(assetId, workType, projectId).ToString();
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:52,代码来源:mr_edit.aspx.cs

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

示例8: Save

        /// <summary>
        /// Save
        /// </summary>
        /// <param name="projectId">projectId</param>
        /// <param name="countryId">countryId</param>
        /// <param name="provinceId">provinceId</param>
        /// <param name="countyId">countyId</param>
        /// <param name="cityId">cityId</param>
        /// <param name="companyId">companyId</param>
        /// <param name="loginId">loginId</param>
        public void Save(int companyId, int loginId)
        {
            foreach (DataMigrationTDS.DataMigrationRow row in (DataMigrationTDS.DataMigrationDataTable)Table)
            {
                // Get ids & location
                ProjectGateway projectGateway = new ProjectGateway();
                DataMigrationProjectGateway dataMigrationProjectGateway = new DataMigrationProjectGateway(null);
                string name = string.Format("{0} Data Migration Project", row.Client);

                int projectId = dataMigrationProjectGateway.GetProjectIdByName(name);

                if (projectId != 0)
                {
                    projectGateway.LoadByProjectId(projectId);

                    // get parameters
                    Int64 countryId = projectGateway.GetCountryID(projectId);
                    Int64? provinceId = null; if (projectGateway.GetProvinceID(projectId).HasValue) provinceId = projectGateway.GetProvinceID(projectId);
                    Int64? countyId = null; if (projectGateway.GetCountyID(projectId).HasValue) countyId = projectGateway.GetCountyID(projectId);
                    Int64? cityId = null; if (projectGateway.GetCityID(projectId).HasValue) cityId = projectGateway.GetCityID(projectId);

                    //Save section
                    int section_assetId = SaveSection(row, projectId, countryId, provinceId, countyId, cityId, companyId);

                    if (row.RehabAssessment)
                    {
                        string raComments = "";
                        SaveRAWork(row, projectId, section_assetId, companyId, raComments, loginId);
                    }

                    if (row.FullLengthLining)
                    {
                        string fllComments = "";
                        SaveFLLWork(row, projectId, section_assetId, companyId, fllComments, loginId);
                    }

                    if (row.JLiner)
                    {
                        SaveJLWork(projectId, section_assetId, companyId);
                    }

                    // Insert in DataMigration Table
                    Guid originalId = row.OriginalID;
                    string originalSectionId = row.OriginalSectionID;
                    AssetSewerSectionGateway assetSewerSectionGateway = new AssetSewerSectionGateway();
                    assetSewerSectionGateway.LoadByAssetId(section_assetId, companyId);
                    string newSectionId = assetSewerSectionGateway.GetSectionId(section_assetId);

                    DataMigrationGateway dataMigrationGateway = new DataMigrationGateway(null);
                    dataMigrationGateway.InsertDataMigration(originalId, originalSectionId, section_assetId, newSectionId);
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:63,代码来源:DataMigration.cs

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

            if (projectGateway.Table.Rows.Count > 0)
            {
                // ... 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();
            }
            else
            {
                hdfCountryId.Value = "0";
                hdfProvinceId.Value = "0";
                hdfCountyId.Value = "0";
                hdfCityId.Value = "0";
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:32,代码来源:add_manhole.aspx.cs

示例10: UpdateDatabase

        private void UpdateDatabase()
        {
            // Get ids & location
            int projectId = Int32.Parse(hdfCurrentProjectId.Value.Trim());
            ProjectGateway projectGateway = new ProjectGateway();
            projectGateway.LoadByProjectId(projectId);

            Int64 countryId = projectGateway.GetCountryID(projectId);
            Int64? provinceId = null; if (projectGateway.GetProvinceID(projectId).HasValue) provinceId = (Int64)projectGateway.GetProvinceID(projectId);
            Int64? countyId = null; if (projectGateway.GetCountyID(projectId).HasValue) countyId = (Int64)projectGateway.GetCountyID(projectId);
            Int64? cityId = null; if (projectGateway.GetCityID(projectId).HasValue) cityId = (Int64)projectGateway.GetCityID(projectId);

            string workType = hdfWorkType.Value.Trim();
            int companyId = Int32.Parse(hdfCompanyId.Value);
            int workId = Int32.Parse(hdfWorkId.Value);
            int workIdFll = Int32.Parse(hdfWorkIdFll.Value);
            int sectionAssetId = Int32.Parse(hdfAssetId.Value);

            bool isNewMeasuredFromDsmh = false;

            RehabAssessmentLateralDetails raLateralDetails = new RehabAssessmentLateralDetails();
            raLateralDetails.LoadForEdit(workIdFll, sectionAssetId, companyId, projectId);

            if (raLateralDetails.Table.Rows.Count == 0)
            {
                if (ddlM1DataMeasuredFromMh.SelectedValue == "DSMH")
                {
                    isNewMeasuredFromDsmh = true;
                    RehabAssessmentLateralDetails raaLateralDetails = new RehabAssessmentLateralDetails(rehabAssessmentTDS);
                    raaLateralDetails.ModifyLateralId();
                }
            }

            DB.Open();
            DB.BeginTransaction();
            try
            {
                // Save lateral details
                bool roboticPrepCompleted = ckbxPrepDataRoboticPrepCompleted.Checked;
                DateTime? roboticPrepCompletedCompleted = null; if (tkrdpPrepDataRoboticPrepCompletedDate.SelectedDate.HasValue) roboticPrepCompletedCompleted = tkrdpPrepDataRoboticPrepCompletedDate.SelectedDate.Value;

                RehabAssessmentLateralDetails rehabAssessmentLateralDetails = new RehabAssessmentLateralDetails(rehabAssessmentTDS);
                rehabAssessmentLateralDetails.Save(workIdFll, projectId, sectionAssetId, countryId, provinceId, countyId, cityId, tbxVideoLength.Text.Trim(), companyId, isNewMeasuredFromDsmh, roboticPrepCompleted, roboticPrepCompletedCompleted);

                // Save section details
                RehabAssessmentSectionDetails rehabAssessmentSectionDetails = new RehabAssessmentSectionDetails(rehabAssessmentTDS);
                rehabAssessmentSectionDetails.Save(countryId, provinceId, countyId, cityId, projectId, companyId);

                // Save work details
                RehabAssessmentWorkDetails rehabAssessmentWorkDetails = new RehabAssessmentWorkDetails(rehabAssessmentTDS);
                rehabAssessmentWorkDetails.Save(countryId, provinceId, countyId, cityId, projectId, companyId, sectionAssetId);

                // Save material details
                string newMaterial = ddlM1DataMaterial.SelectedValue;

                if (ddlM1DataMaterial.SelectedIndex > 0)
                {
                    LfsAssetSewerLateralGateway lfsAssetSewertLateralGateway = new LfsAssetSewerLateralGateway(null);
                    if (!lfsAssetSewertLateralGateway.IsUsedInMaterials(sectionAssetId, newMaterial, companyId))
                    {
                        MaterialInformation materialInformation = new MaterialInformation(materialInformationTDS);
                        materialInformation.Save(companyId);
                    }
                }

                DB.CommitTransaction();

                // Store datasets
                rehabAssessmentTDS.AcceptChanges();
                Session["rehabAssessmentTDS"] = rehabAssessmentTDS;

                materialInformationTDS.AcceptChanges();
                Session["materialInformationTDS"] = materialInformationTDS;
            }
            catch (Exception ex)
            {
                DB.RollbackTransaction();

                string url = string.Format("./../../error_page.aspx?error={0}", ex.Message.Replace('\n', ' '));
                Response.Redirect(url);
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:82,代码来源:ra_edit.aspx.cs

示例11: UpdateDatabase

        private void UpdateDatabase()
        {
            // Get ids & location
            int projectId = Int32.Parse(hdfCurrentProject.Value.Trim());
            int companyId = Int32.Parse(Session["companyID"].ToString());

            // Load project
            ProjectGateway projectGateway = new ProjectGateway();
            projectGateway.LoadByProjectId(projectId);

            // Get location
            Int64 countryId = projectGateway.GetCountryID(projectId);
            Int64? provinceId = null; if (projectGateway.GetProvinceID(projectId).HasValue) provinceId = (Int64)projectGateway.GetProvinceID(projectId);
            Int64? countyId = null; if (projectGateway.GetCountyID(projectId).HasValue) countyId = (Int64)projectGateway.GetCountyID(projectId);
            Int64? cityId = null; if (projectGateway.GetCityID(projectId).HasValue) cityId = (Int64)projectGateway.GetCityID(projectId);

            // Save
            DB.Open();
            DB.BeginTransaction();
            try
            {
                FlatSectionJl flatSectionJl = new FlatSectionJl(flatSectionJlTDS);

                if (Convert.ToBoolean(ViewState["UpdateComments"]))
                {
                    // Update Comments
                    FlatSectionJlCommentDetails flatSectionJlCommentDetails = new FlatSectionJlCommentDetails(flatSectionJlTDS);
                    flatSectionJlCommentDetails.Save(companyId);

                    // Update works
                    WorkUpdate();
                }
                else
                {
                    flatSectionJl.UpdateDirect(countryId, provinceId, countyId, cityId, projectId, companyId);
                }

                DB.CommitTransaction();

                flatSectionJlTDS.AcceptChanges();

                // Store datasets
                Session["flatSectionJlTDS"] = flatSectionJlTDS;
            }
            catch (Exception ex)
            {
                DB.RollbackTransaction();

                string url = string.Format("./../../error_page.aspx?error={0}", ex.Message.Replace('\n', ' '));
                Response.Redirect(url);
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:52,代码来源:jl_bulk_date_update.aspx.cs

示例12: TagPage

        private void TagPage()
        {
            hdfCompanyId.Value = Session["companyID"].ToString();
            hdfCurrentProjectId.Value = Request.QueryString["project_id"].ToString();
            hdfCurrentClientId.Value = Request.QueryString["client_id"].ToString();
            hdfWorkType.Value = Request.QueryString["work_type"].ToString();
            hdfDataChangedMessage.Value = "Changes made to this lateral will not be saved.";

            // Get ids & location
            int projectId = Int32.Parse(hdfCurrentProjectId.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();
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:24,代码来源:flat_section_jl_edit.aspx.cs

示例13: UpdateState

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

示例14: PostPageChanges

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

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

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

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

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

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

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

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

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

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

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

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

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

示例15: UpdateDatabase

        private void UpdateDatabase()
        {
            // Get ids & location
            int projectId = Int32.Parse(hdfCurrentProjectId.Value.Trim());
            ProjectGateway projectGateway = new ProjectGateway();
            projectGateway.LoadByProjectId(projectId);

            Int64 countryId = projectGateway.GetCountryID(projectId);
            Int64? provinceId = null; if (projectGateway.GetProvinceID(projectId).HasValue) provinceId = (Int64)projectGateway.GetProvinceID(projectId);
            Int64? countyId = null; if (projectGateway.GetCountyID(projectId).HasValue) countyId = (Int64)projectGateway.GetCountyID(projectId);
            Int64? cityId = null; if (projectGateway.GetCityID(projectId).HasValue) cityId = (Int64)projectGateway.GetCityID(projectId);

            string workType = hdfWorkType.Value.Trim();
            int companyId = Int32.Parse(hdfCompanyId.Value);
            int workId = Int32.Parse(hdfWorkId.Value);
            int workIdFll = Int32.Parse(hdfWorkIdFll.Value);
            int sectionAssetId = Int32.Parse(hdfAssetId.Value);

            DB.Open();
            DB.BeginTransaction();
            try
            {
                // Save repair details
                PointRepairsRepairDetails pointRepairsRepairDetails = new PointRepairsRepairDetails(pointRepairsTDS);
                pointRepairsRepairDetails.Save(companyId);

                // Save comment details
                PointRepairsCommentDetails pointRepairsCommentDetails = new PointRepairsCommentDetails(pointRepairsTDS);
                pointRepairsCommentDetails.Save(companyId);

                // Save section details
                PointRepairsSectionDetails pointRepairsSectionDetails = new PointRepairsSectionDetails(pointRepairsTDS);
                pointRepairsSectionDetails.Save(countryId, provinceId, countyId, cityId, projectId, companyId);

                // Save work details
                PointRepairsWorkDetails pointRepairsWorkDetails = new PointRepairsWorkDetails(pointRepairsTDS);
                pointRepairsWorkDetails.Save(countryId, provinceId, countyId, cityId, projectId, sectionAssetId, companyId);

                DB.CommitTransaction();

                // Store datasets
                pointRepairsTDS.AcceptChanges();
                Session["pointRepairsTDS"] = pointRepairsTDS;
            }
            catch (Exception ex)
            {
                DB.RollbackTransaction();

                string url = string.Format("./../../error_page.aspx?error={0}", ex.Message.Replace('\n', ' '));
                Response.Redirect(url);
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:52,代码来源:pr_edit.aspx.cs


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