Exemplo n.º 1
0
        /// <summary>
        /// Добавляется элемент в таблицу данных
        /// </summary>
        /// <param name="destinationDataSet">Таблица, в которую добавляется элемент</param>
        private void AddAircraftToDataset(NonRoutineCardDataSet destinationDataSet)
        {
            if (_currentWorkPackage.Aircraft == null)
            {
                return;
            }
            var    aircraftLifelength    = GlobalObjects.CasEnvironment.Calculator.GetCurrentFlightLifelength(_currentWorkPackage.Aircraft);
            string serialNumber          = _currentWorkPackage.Aircraft.SerialNumber;
            string manufactureDate       = _currentWorkPackage.Aircraft.ManufactureDate.ToString(new GlobalTermsProvider()["DateFormat"].ToString());
            string sinceNewHours         = aircraftLifelength.Hours.ToString();
            string sinceNewCycles        = aircraftLifelength.Cycles.ToString().Trim();
            string lineNumberCaption     = "";
            string variableNumberCaption = "";
            string lineNumber            = _currentWorkPackage.Aircraft.LineNumber;
            string variableNumber        = _currentWorkPackage.Aircraft.VariableNumber;

            if (lineNumber != "")
            {
                lineNumberCaption = "L/N:";
            }
            if (variableNumber != "")
            {
                variableNumberCaption = "V/N:";
            }
            destinationDataSet.AircraftInformationTable.AddAircraftInformationTableRow(_currentWorkPackage.Aircraft.RegistrationNumber, serialNumber,
                                                                                       manufactureDate, _currentWorkPackage.Aircraft.Model.ToString(), lineNumberCaption, variableNumberCaption,
                                                                                       GlobalObjects.CasEnvironment.Operators.First(o => o.ItemId == _currentWorkPackage.Aircraft.OperatorId).Name,
                                                                                       variableNumber, sinceNewHours, sinceNewCycles);
        }
Exemplo n.º 2
0
        private NonRoutineCardDataSet GenerateDataSet()
        {
            NonRoutineCardDataSet dataSet = new NonRoutineCardDataSet();

            AddAdditionalDataToDataSet(dataSet);
            AddMainInformationToDataSet(dataSet);
            AddAircraftToDataset(dataSet);
            return(dataSet);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Добавление дополнительной информации
        /// </summary>
        /// <param name="destinationDateSet"></param>
        private void AddAdditionalDataToDataSet(NonRoutineCardDataSet destinationDateSet)
        {
            var reportHeader         = "Component Change Order";
            var reportFooter         = new GlobalTermsProvider()["ReportFooter"].ToString();
            var reportFooterPrepared = new GlobalTermsProvider()["ReportFooterPrepared"].ToString();
            var reportFooterLink     = new GlobalTermsProvider()["ProductWebsite"].ToString();

            destinationDateSet.AdditionalDataTAble.AddAdditionalDataTAbleRow(GlobalObjects.CasEnvironment.Operators.First(o => o.ItemId == _currentWorkPackage.Aircraft.OperatorId).LogotypeReportLarge, reportHeader, "", "", "", reportFooter, reportFooterPrepared, reportFooterLink);
        }
Exemplo n.º 4
0
 private void AddMainInformationToDataSet(NonRoutineCardDataSet destinationDataSet)
 {
     destinationDataSet.MainTable.AddMainTableRow(_currentComponent.ATAChapter.ToString(),
                                                  _workType,
                                                  _currentComponent.Description,
                                                  _currentComponent.Manufacturer,
                                                  _currentComponent.PartNumber,
                                                  _currentComponent.SerialNumber,
                                                  _lastTransfer != null ? _lastTransfer.Position :"",
                                                  "",
                                                  "",
                                                  _currentWorkPackage.Number,
                                                  _currentWorkPackage.Station,
                                                  _orderNum.ToString());
 }