Esempio n. 1
0
        // ////////////////////////////////////////////////////////////////////////
        // PUBLIC METHODS
        //
        /// <summary>
        /// SectionUpdate
        /// </summary>
        public void SectionUpdate()
        {
            foreach (Fix1TDS.LFS_MASTER_AREARow masterAreaRow in (Fix1TDS.LFS_MASTER_AREADataTable)Table)
            {
                LinningPlanGateway liningPlanGateway = new LinningPlanGateway();
                Fix1JlinerGateway fix1JlinerGateway = new Fix1JlinerGateway();
                fix1JlinerGateway.LoadByIdCompanyId(masterAreaRow.ID, masterAreaRow.COMPANY_ID);

                Fix1Jliner fix1Jliner = new Fix1Jliner(fix1JlinerGateway.Data);

                // Update variables
                int numLats = fix1Jliner.GetNumLats(masterAreaRow.ID, masterAreaRow.COMPANY_ID);
                int notLinedYeet = fix1Jliner.GetNotLinedYet(masterAreaRow.ID, masterAreaRow.COMPANY_ID);
                bool allMeasured = fix1Jliner.GetAllMeasured(masterAreaRow.ID, masterAreaRow.COMPANY_ID);
                int notMeasuredYet = fix1Jliner.GetNotMeasuredYet(masterAreaRow.ID, masterAreaRow.COMPANY_ID);
                int notDeliveredYet = fix1Jliner.GetNotDeliveredYet(masterAreaRow.ID, masterAreaRow.COMPANY_ID);

                masterAreaRow.NumLats = numLats;
                masterAreaRow.NotLinedYet = notLinedYeet;
                masterAreaRow.AllMeasured = (numLats == 0) ? false : allMeasured;
                masterAreaRow.NotMeasuredYet = notMeasuredYet;
                masterAreaRow.NotDeliveredYet = notDeliveredYet;

                // Update IssueWithtLaterals
                Guid rowId = masterAreaRow.ID;
                if (liningPlanGateway.IsLateralsIssueNo(rowId))
                {
                    masterAreaRow.IssueWithLaterals = "No";
                }
                else
                {
                    if (liningPlanGateway.IsLateralsIssueOutOfScope(rowId))
                    {
                        masterAreaRow.IssueWithLaterals = "Out Of Scope";
                    }
                    else
                    {
                        if (liningPlanGateway.IsLateralsIssueYesOutOfScope(rowId))
                        {
                            masterAreaRow.IssueWithLaterals = "Yes, Out Of Scope";
                        }
                        else
                        {
                            if (liningPlanGateway.IsLateralsIssueYes(rowId))
                            {
                                masterAreaRow.IssueWithLaterals = "Yes";
                            }
                        }
                    }
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// UpdateIssueWithLaterals
        /// </summary>
        public void UpdateIssueWithLaterals()
        {
            LinningPlanGateway liningPlanGateway = new LinningPlanGateway();

            foreach (SectionTDS.LFS_MASTER_AREARow lfsMasterAreaRow in (SectionTDS.LFS_MASTER_AREADataTable)Table)
            {
                Guid rowId = lfsMasterAreaRow.ID;

                if (lfsMasterAreaRow.NumLats > 0)
                {
                    if (liningPlanGateway.IsLateralsIssueNo(rowId))
                    {
                        lfsMasterAreaRow.IssueWithLaterals = "No";
                    }
                    else
                    {
                        if (liningPlanGateway.IsLateralsIssueOutOfScope(rowId))
                        {
                            lfsMasterAreaRow.IssueWithLaterals = "Out Of Scope";
                        }
                        else
                        {
                            if (liningPlanGateway.IsLateralsIssueYesOutOfScope(rowId))
                            {
                                lfsMasterAreaRow.IssueWithLaterals = "Yes, Out Of Scope";
                            }
                            else
                            {
                                if (liningPlanGateway.IsLateralsIssueYes(rowId))
                                {
                                    lfsMasterAreaRow.IssueWithLaterals = "Yes";
                                }
                            }
                        }
                    }
                }
                else
                {
                    lfsMasterAreaRow.IssueWithLaterals = "No";
                }
            }
        }