Exemple #1
0
        private void AddDirectivesToDataSet(MaintenanceDirectivesMPDataSet destinationDateSet)
        {
            foreach (var component in _reportedDirectives)
            {
                if (component == null)
                {
                    continue;
                }

                var cat = component.ParentBaseComponent.ChangeLLPCategoryRecords.GetLast().ToCategory;

                var rev            = component.Position;
                var revDate        = "";
                var mpdItem        = component.Description;
                var taskCardNumber = component.PartNumber;
                var docNo          = "";
                var threshold      = component.LLPData.FirstOrDefault(i => i.ParentCategory.ItemId == cat.ItemId)?.LLPLifeLimit.ToStrings();
                var repeat         = "";
                var description    = component.Description;
                var applicability  = "";
                var zone           = "";
                var access         = "";
                var manHours       = "";

                var ata     = $"ATA : {component.ATAChapter}";
                var program = component.PartNumber;
                destinationDateSet.ItemsTable.AddItemsTableRow(rev, revDate, mpdItem, taskCardNumber, docNo, "", threshold, repeat, zone, access, manHours, description, "", applicability, ata, program);
            }
        }
Exemple #2
0
        private void AddDirectivesToDataSet(MaintenanceDirectivesMPDataSet destinationDateSet)
        {
            foreach (var directive in _reportedDirectives)
            {
                if (directive == null)
                {
                    continue;
                }

                var rev            = "";
                var revDate        = directive.Threshold.EffectiveDate.ToString("dd MMMM yyyy");
                var mpdItem        = directive.EngineeringOrders;
                var taskCardNumber = "";
                var threshold      = directive.Threshold.FirstPerformanceToStrings();
                var repeat         = directive.RepeatInterval.ToRepeatIntervalsFormat();

                var manHours      = directive.ManHours.ToString();
                var description   = directive.Description;
                var applicability = directive.Applicability;

                var adno = directive.Title;
                var sbno = directive.ServiceBulletinNo != "" ? directive.ServiceBulletinNo : "";

                var refe = $"AD: {adno}";
                if (!string.IsNullOrEmpty(sbno))
                {
                    refe += $" | SB: {sbno}";
                }

                var ata     = $"ATA : {directive.ATAChapter}";
                var program = directive.Program.ToString();

                destinationDateSet.ItemsTable.AddItemsTableRow(rev, revDate, mpdItem, taskCardNumber, "FAA", directive.WorkType.ShortName, threshold, repeat, "", "", manHours, description, refe, applicability, ata, program);
            }
        }
Exemple #3
0
        private void AddDirectivesToDataSet(MaintenanceDirectivesMPDataSet destinationDateSet)
        {
            foreach (var directive in _reportedDirectives)
            {
                if (directive == null)
                {
                    continue;
                }

                var rev            = directive.ScheduleRevisionNum;
                var revDate        = directive.ScheduleRevisionDate.ToString("dd MMMM yyyy");
                var mpdItem        = directive.TaskNumberCheck;
                var taskCardNumber = directive.TaskCardNumber;
                var docNo          = directive.MPDTaskNumber;
                var threshold      = directive.Threshold.FirstPerformanceToStrings();
                var repeat         = directive.RepeatInterval.ToRepeatIntervalsFormat();

                var sb = new StringBuilder();
                foreach (var z in directive.Zone.Split(' '))
                {
                    sb.AppendLine(z);
                }

                var zone = sb.ToString();

                sb = new StringBuilder();
                foreach (var z in directive.Access.Split(' '))
                {
                    sb.AppendLine(z);
                }

                var access = sb.ToString();

                var manHours      = directive.ManHours.ToString();
                var description   = directive.Description;
                var applicability = directive.Applicability;

                var ata     = $"ATA : {directive.ATAChapter}";
                var program = directive.Program.ToString();

                var remarks = "";
                if (!string.IsNullOrEmpty(directive.Remarks) && !string.IsNullOrEmpty(docNo))
                {
                    remarks = $"{directive.Remarks} / {docNo}";
                }
                else if (!string.IsNullOrEmpty(directive.Remarks))
                {
                    remarks = $"{directive.Remarks}";
                }
                else if (!string.IsNullOrEmpty(docNo))
                {
                    remarks = $"{docNo}";
                }

                var pgm = directive.ProgramIndicator != MaintenanceDirectiveProgramIndicator.Unknown ? directive.ProgramIndicator.ShortName : "N/A";

                destinationDateSet.ItemsTable.AddItemsTableRow(rev, revDate, mpdItem, taskCardNumber, docNo, pgm, threshold, repeat, zone, access, manHours, description, remarks, applicability, ata, program);
            }
        }
Exemple #4
0
        protected virtual DataSet GenerateDataSet()
        {
            var dataset = new MaintenanceDirectivesMPDataSet();

            AddAdditionalDataToDataSet(dataset);
            AddDirectivesToDataSet(dataset);
            return(dataset);
        }
Exemple #5
0
        private void AddAdditionalDataToDataSet(MaintenanceDirectivesMPDataSet destinationDateSet)
        {
            string firsttitle       = "MPD Item";
            string discriptiontitle = "Description";
            string secondtitle      = "Task Card №";

            string reportFooter         = new GlobalTermsProvider()["ReportFooter"].ToString();
            string reportFooterPrepared = new GlobalTermsProvider()["ReportFooterPrepared"].ToString();
            string reportFooterLink     = new GlobalTermsProvider()["ProductWebsite"].ToString();

            destinationDateSet.AdditionalDataTAble.AddAdditionalDataTAbleRow(_reportTitle, _operatorLogotype, "", "", firsttitle, secondtitle, discriptiontitle, reportFooter, reportFooterPrepared, reportFooterLink);
        }
        private void AddDirectivesToDataSet(MaintenanceDirectivesMPDataSet destinationDateSet)
        {
            var resultComponent = new List <Component>();

            foreach (var component in _reportedDirectives)
            {
                if (resultComponent.FirstOrDefault(i => i.PartNumber.Equals(component.PartNumber) && i.Description.Equals(component.Description)) == null)
                {
                    resultComponent.Add(component);
                }
            }


            foreach (var component in resultComponent)
            {
                if (component == null)
                {
                    continue;
                }

                var rev            = "";
                var revDate        = "";
                var mpdItem        = "";
                var taskCardNumber = "";
                var docNo          = "";
                var threshold      = "";
                var repeat         = "";
                var description    = "";
                var applicability  = "";
                var zone           = "";
                var access         = "";
                var manHours       = "";
                var WorkType       = "";
                var cat            = "";


                foreach (var componentDirective in component.ComponentDirectives)
                {
                    if (componentDirective.MaintenanceDirective != null)
                    {
                        rev            += "\n" + componentDirective.MaintenanceDirective.ScheduleRevisionNum;
                        revDate        += "\n" + componentDirective.MaintenanceDirective.ScheduleRevisionDate;
                        mpdItem        += "\n" + componentDirective.MaintenanceDirective.TaskNumberCheck;
                        taskCardNumber += "\n" + componentDirective.MaintenanceDirective.TaskNumberCheck;
                        docNo          += "\n" + componentDirective.MaintenanceDirective.MPDTaskNumber;
                        threshold       = "\n" + componentDirective.MaintenanceDirective.Threshold.FirstPerformanceToStrings();
                        repeat          = "\n" + componentDirective.MaintenanceDirective.RepeatInterval.ToRepeatIntervalsFormat();
                        description     = "\n" + componentDirective.MaintenanceDirective.Description;
                        applicability   = "\n" + componentDirective.MaintenanceDirective.Applicability;
                        manHours        = "\n" + componentDirective.CMM;
                        WorkType        = "\n" + componentDirective.MaintenanceDirective.WorkType.ShortName;
                        cat             = "\n" + componentDirective.MaintenanceDirective.Category.ShortName;

                        var sb = new StringBuilder();
                        foreach (var z in componentDirective.MaintenanceDirective.Zone.Split(' '))
                        {
                            sb.AppendLine(z);
                        }

                        zone = sb.ToString();

                        sb = new StringBuilder();
                        foreach (var z in componentDirective.MaintenanceDirective.Access.Split(' '))
                        {
                            sb.AppendLine(z);
                        }

                        access = sb.ToString();
                    }
                }


                var ata     = $"ATA : {component.ATAChapter}";
                var program = component.PartNumber;
                destinationDateSet.ItemsTable.AddItemsTableRow(rev, revDate, mpdItem, taskCardNumber, cat, WorkType, threshold, repeat, zone, access, manHours, description, "", applicability, ata, program);
            }
        }