예제 #1
0
        protected void btnFixCommentsAndHistory_Click(object sender, EventArgs e)
        {
            Fix1JlinerGateway fix1JlinerGateway = new Fix1JlinerGateway();

            // Load all jliners
            fix1JlinerGateway.LoadAll();

            Fix1Jliner fix1Jliner = new Fix1Jliner(fix1JlinerGateway.Data);
            fix1Jliner.UpdateCommentsHistory();

            fix1JlinerGateway.Update();
        }
예제 #2
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";
                            }
                        }
                    }
                }
            }
        }