def btnLegsExEdit_Click(self):
     dataRow = self.selectedProcedureRow;
     item = dataRow["procLegsEx"];
     dataBaseProcedureLegsEx = (item == None or len(item) == 0) and DataBaseProcedureLegsEx() or item.method_0();
     procEntityAHP = None;
     # num = dataRow.Table.Columns.IndexOf("ahpEnt");
     try:
         if (dataRow["ahpEnt"] != None):
             procEntityAHP = dataRow["ahpEnt"];
     except:
         pass
     self.anyData = dataRow
     dlgAixmProcLegsEx = DlgAixmProcLegsEx.smethod_0(self, dataBaseProcedureLegsEx, ProcedureExportDlg.dataBase.ProcedureData, procEntityAHP)
     QObject.connect(dlgAixmProcLegsEx, SIGNAL("DlgAixmProcLegs_Smethod_0_Event"), self.dlgAixmProcLegsEx_Smethod_0_Event)
예제 #2
0
 def smethod_0(dataBaseIAPs_0, dataBaseProcedureData_0, dataRow_0):
     flag = False
     dlgAixmIap = DlgAixmIap()
     dlgAixmIap.data = dataBaseProcedureData_0
     dlgAixmIap.table = dataBaseIAPs_0
     dlgAixmIap.selected = dataRow_0
     dataBaseProcedureData_0.method_51(dlgAixmIap.pnlAerodrome)
     dataBaseProcedureData_0.method_47(dlgAixmIap.pnlMSA)
     dlgAixmIap.pnlAcCategory.Items = CodeCatAcftAixm.Items
     dlgAixmIap.pnlType.Items = CodeTypeIapAixm.Items
     # dlgAixmIap.pnlAcCategory.Insert(0, "");
     # dlgAixmIap.pnlMSA.Items.Insert(0, "");
     if (dataRow_0 != None and len(dataRow_0) != 0):
         dlgAixmIap.pnlAerodrome.SelectedIndex = dlgAixmIap.pnlAerodrome.IndexOf(
             dataRow_0["ahpEnt"])
         if (dlgAixmIap.pnlAerodrome.SelectedIndex >= 0):
             dataBaseProcedureData_0.method_35(
                 dlgAixmIap.pnlRunway, dlgAixmIap.pnlAerodrome.SelectedItem)
             # dlgAixmIap.pnlRunway.Insert(0, "");
         dlgAixmIap.pnlDesignator.Value = dataRow_0["txtDesig"]
         if (dataRow_0["codeCatAcft"] != None):
             dlgAixmIap.pnlAcCategory.SelectedIndex = dlgAixmIap.pnlAcCategory.method_3(
                 dataRow_0["codeCatAcft"])
         if (dataRow_0["codeTransId"] != None):
             dlgAixmIap.pnlTransID.Value = dataRow_0["codeTransId"]
         if (dataRow_0["rdnEnt"] != None):
             dlgAixmIap.pnlRunway.SelectedIndex = dlgAixmIap.pnlRunway.IndexOf(
                 dataRow_0["rdnEnt"])
         if (dataRow_0["mgpEnt"] != None):
             dlgAixmIap.pnlMSA.SelectedIndex = dlgAixmIap.pnlMSA.IndexOf(
                 dataRow_0["mgpEnt"])
         if (dataRow_0["codeRnp"] != None):
             dlgAixmIap.pnlRNP.Value = dataRow_0["codeRnp"]
         if (dataRow_0["txtDescrComFail"] != None):
             dlgAixmIap.txtDescrComFail.Value = dataRow_0["txtDescrComFail"]
         dlgAixmIap.pnlType.SelectedIndex = dlgAixmIap.pnlType.method_3(
             dataRow_0["codeTypeRte"])
         if (dataRow_0["txtDescrMiss"] != None):
             dlgAixmIap.txtDescription.Value = dataRow_0["txtDescrMiss"]
         if (dataRow_0["txtRmk"] != None):
             dlgAixmIap.txtRemarks.Value = dataRow_0["txtRmk"]
         dlgAixmIap.minimums = dataRow_0["ocah"]
     if (dlgAixmIap.minimums == None):
         dlgAixmIap.minimums = DataBaseIapOcaOchs()
     dlgAixmIap.gridOcahModel.DataSource = dlgAixmIap.minimums
     resultDlg = dlgAixmIap.exec_()
     if resultDlg == 1:
         dataRow0 = dataRow_0 == None or len(dataRow_0) == 0
         strS = []
         if (not dataRow0):
             for i in range(len(dataBaseIAPs_0.nameList)):
                 strS.append(None)
             # strS = new string[dataBaseIAPs_0.Columns.Count];
             i = 0
             for name in dataBaseIAPs_0.nameList:
                 strS[i] = dataRow_0[name]
                 i += 1
         else:
             dataRow_0 = dataBaseIAPs_0.NewRow()
         dataRow_0["ahpEnt"] = dlgAixmIap.pnlAerodrome.SelectedItem
         if (dataRow0):
             dataRow_0["oldAhpEnt"] = dataRow_0["ahpEnt"]
         dataRow_0["txtDesig"] = dlgAixmIap.pnlDesignator.Value
         if (dataRow0):
             dataRow_0["oldTxtDesig"] = dataRow_0["txtDesig"]
         if (dlgAixmIap.pnlAcCategory.SelectedIndex >= 0):
             dataRow_0[
                 "codeCatAcft"] = dlgAixmIap.pnlAcCategory.SelectedItem
         else:
             dataRow_0["codeCatAcft"] = None
         if (dataRow0):
             dataRow_0["oldCodeCatAcft"] = dataRow_0["codeCatAcft"]
         if (not String.IsNullOrEmpty(dlgAixmIap.pnlTransID.Value)):
             dataRow_0["codeTransId"] = dlgAixmIap.pnlTransID.Value
         else:
             dataRow_0["codeTransId"] = None
         if (dataRow0):
             dataRow_0["oldCodeTransId"] = dataRow_0["codeTransId"]
         if (dlgAixmIap.pnlRunway.SelectedIndex >= 0):
             dataRow_0["rdnEnt"] = dlgAixmIap.pnlRunway.SelectedItem
         else:
             dataRow_0["rdnEnt"] = None
         if (dlgAixmIap.pnlMSA.SelectedIndex >= 0):
             dataRow_0["mgpEnt"] = dlgAixmIap.pnlMSA.SelectedItem
         else:
             dataRow_0["mgpEnt"] = None
         if (not math.isnan(dlgAixmIap.pnlRNP.Value)
                 and not math.isinf(dlgAixmIap.pnlRNP.Value)):
             dataRow_0["codeRnp"] = dlgAixmIap.pnlRNP.Value
         else:
             dataRow_0["codeRnp"] = None
         dataRow_0["codeTypeRte"] = dlgAixmIap.pnlType.SelectedItem
         if (not String.IsNullOrEmpty(dlgAixmIap.txtDescrComFail.Value)):
             dataRow_0["txtDescrComFail"] = dlgAixmIap.txtDescrComFail.Value
         else:
             dataRow_0["txtDescrComFail"] = None
         if (not String.IsNullOrEmpty(dlgAixmIap.txtDescription.Value)):
             dataRow_0["txtDescrMiss"] = dlgAixmIap.txtDescription.Value
         else:
             dataRow_0["txtDescrMiss"] = None
         if (not String.IsNullOrEmpty(dlgAixmIap.txtRemarks.Value)):
             dataRow_0["txtRmk"] = dlgAixmIap.txtRemarks.Value
         else:
             dataRow_0["txtRmk"] = None
         dataRow_0["ocah"] = dlgAixmIap.minimums
         if (dataRow0):
             dataRow_0["procLegs"] = DataBaseProcedureLegs()
             dataRow_0["procLegsEx"] = DataBaseProcedureLegsEx()
         if (not dataRow0):
             num = 1
             while (num < len(strS)):
                 if (not strS[num] == dataRow_0[dataRow_0.nameList[num]]):
                     dataRow_0["changed"] = "True"
                     if (dataRow0):
                         dataBaseIAPs_0.RowsAdd(dataRow_0)
                     flag = True
                     return flag
                 else:
                     num += 1
         else:
             dataRow_0["new"] = "True"
         if (dataRow0):
             dataBaseIAPs_0.RowsAdd(dataRow_0)
         flag = True
         return flag
     return flag
예제 #3
0
    def smethod_0(dataBaseSIDs_0, dataBaseProcedureData_0, dataRow_0):
        flag = False;
        dlgAixmSid = DlgAixmSid()
        dlgAixmSid.data = dataBaseProcedureData_0;
        dlgAixmSid.table = dataBaseSIDs_0;
        dlgAixmSid.selected = dataRow_0;
        dataBaseProcedureData_0.method_51(dlgAixmSid.pnlAerodrome);
        dataBaseProcedureData_0.method_47(dlgAixmSid.pnlMSA);

        dlgAixmSid.pnlAcCategory.Items = CodeCatAcftAixm.Items;
        dlgAixmSid.pnlType.Items = CodeTypeSidAixm.Items;
        # dlgAixmSid.pnlAcCategory.comboBox.insertItem(0, "");
        # dlgAixmSid.pnlMSA.comboBox.insertItem(0, "");
        if (dataRow_0 != None):
            dlgAixmSid.pnlAerodrome.SelectedIndex = dlgAixmSid.pnlAerodrome.comboBox.findText(dataRow_0["ahpEnt"].ToString());
            if (dlgAixmSid.pnlAerodrome.SelectedIndex >= 0):
                dataBaseProcedureData_0.method_35(dlgAixmSid.pnlRunway, dlgAixmSid.pnlAerodrome.SelectedItem);
                # dlgAixmSid.pnlRunway.comboBox.insertItem(0, "");
            dlgAixmSid.pnlDesignator.Value = dataRow_0["txtDesig"];
            if (dataRow_0["codeCatAcft"] != None):
                dlgAixmSid.pnlAcCategory.SelectedIndex = dlgAixmSid.pnlAcCategory.method_3(dataRow_0["codeCatAcft"]);
            if (dataRow_0["codeTransId"] != None):
                dlgAixmSid.pnlTransID.Value = dataRow_0["codeTransId"];
            if (dataRow_0["rdnEnt"] != None):
                dlgAixmSid.pnlRunway.SelectedIndex = dlgAixmSid.pnlRunway.comboBox.findText(dataRow_0["rdnEnt"].ToString());
            if (dataRow_0["mgpEnt"] != None):
                dlgAixmSid.pnlMSA.SelectedIndex = dlgAixmSid.pnlMSA.comboBox.findText(dataRow_0["mgpEnt"].ToString());
            if (dataRow_0["codeRnp"] != None):
                dlgAixmSid.pnlRNP.Value = dataRow_0["codeRnp"]
            if (dataRow_0["txtDescrComFail"] != None):
                dlgAixmSid.txtDescrComFail.Text = dataRow_0["txtDescrComFail"];
            dlgAixmSid.pnlType.SelectedIndex = dlgAixmSid.pnlType.method_3(dataRow_0["codeTypeRte"]);
            if (dataRow_0["txtDescr"] != None):
                dlgAixmSid.txtDescription.Value = dataRow_0["txtDescr"];
            if (dataRow_0["txtRmk"] != None):
                dlgAixmSid.txtRemarks.Value = dataRow_0["txtRmk"];
        dlgResult = dlgAixmSid.exec_()
        if (dlgResult == 1):
            dataRow0 = dataRow_0 == None;
            strS = [];
            if (not dataRow0):
                for i in range(dataBaseSIDs_0.ColumnsCount()):
                    strS.append(None)
                # str = new string[dataBaseSIDs_0.Columns.Count];
                i = 0
                for name in dataBaseSIDs_0.nameList:
                    strS[i] = dataRow_0[name];
                    i += 1
            else:
                dataRow_0 = dataBaseSIDs_0.NewRow();
            dataRow_0["ahpEnt"] = dlgAixmSid.pnlAerodrome.SelectedItem;
            if (dataRow0):
                dataRow_0["oldAhpEnt"] = dataRow_0["ahpEnt"];
            dataRow_0["txtDesig"] = dlgAixmSid.pnlDesignator.Value;
            if (dataRow0):
                dataRow_0["oldTxtDesig"] = dataRow_0["txtDesig"];
            if (dlgAixmSid.pnlAcCategory.SelectedIndex >= 0):
                dataRow_0["codeCatAcft"] = dlgAixmSid.pnlAcCategory.SelectedItem;
            else:
                dataRow_0["codeCatAcft"] = None;
            if (dataRow0):
                dataRow_0["oldCodeCatAcft"] = dataRow_0["codeCatAcft"];
            if (not String.IsNullOrEmpty(dlgAixmSid.pnlTransID.Value)):
                dataRow_0["codeTransId"] = dlgAixmSid.pnlTransID.Value;
            else:
                dataRow_0["codeTransId"] = None;
            if (dataRow0):
                dataRow_0["oldCodeTransId"] = dataRow_0["codeTransId"];
            if (dlgAixmSid.pnlRunway.SelectedIndex >= 0):
                dataRow_0["rdnEnt"] = dlgAixmSid.pnlRunway.SelectedItem;
            else:
                dataRow_0["rdnEnt"] = None;
            if (dlgAixmSid.pnlMSA.SelectedIndex >= 0):
                dataRow_0["mgpEnt"] = dlgAixmSid.pnlMSA.SelectedItem;
            else:
                dataRow_0["mgpEnt"] = None;
            if (not math.isinf(dlgAixmSid.pnlRNP.Value) and not math.isnan(dlgAixmSid.pnlRNP.Value)):
                dataRow_0["codeRnp"] = dlgAixmSid.pnlRNP.Value;
            else:
                dataRow_0["codeRnp"] = None;
            dataRow_0["codeTypeRte"] = dlgAixmSid.pnlType.SelectedItem;
            if (not String.IsNullOrEmpty(dlgAixmSid.txtDescrComFail.Value)):
                dataRow_0["txtDescrComFail"] = dlgAixmSid.txtDescrComFail.Value;
            else:
                dataRow_0["txtDescrComFail"] = None;
            if (not String.IsNullOrEmpty(dlgAixmSid.txtDescription.Value)):
                dataRow_0["txtDescr"] = dlgAixmSid.txtDescription.Value;
            else:
                dataRow_0["txtDescr"] = None;
            if (not String.IsNullOrEmpty(dlgAixmSid.txtRemarks.Value)):
                dataRow_0["txtRmk"] = dlgAixmSid.txtRemarks.Value;
            else:
                dataRow_0["txtRmk"] = None;
            if (dataRow0):
                dataRow_0["procLegs"] = DataBaseProcedureLegs();
                dataRow_0["procLegsEx"] = DataBaseProcedureLegsEx();
            if (not dataRow0):
                num = 1;
                while (num < int(len(strS))):
                    if (not strS[num] == dataRow_0[dataRow_0.nameList[num]]):
                        dataRow_0["changed"] = "True";
                        if (dataRow0):
                            dataBaseSIDs_0.RowsAdd(dataRow_0);
                        flag = True;
                        return flag;
                    else:
                        num += 1;
            else:
                dataRow_0["new"] = "True";
            if (dataRow0):
                dataBaseSIDs_0.RowsAdd(dataRow_0);
            flag = True;
            return flag;
        return False;
 def smethod_0(dataBaseHoldings_0, dataBaseProcedureData_0, dataRow_0):
     flag = False;
     dlgAixmHolding = DlgAixmHolding()
     dlgAixmHolding.data = dataBaseProcedureData_0;
     dlgAixmHolding.table = dataBaseHoldings_0;
     dlgAixmHolding.selected = dataRow_0;
     dataBaseProcedureData_0.method_59(dlgAixmHolding.pnlBasedOn, ProcEntityListType.Holding);
     dlgAixmHolding.pnlType.Items = CodeTypeHoldProcAixm.Items;
     if (dataRow_0 != None and len(dataRow_0) > 0):
         dlgAixmHolding.pnlBasedOn.SelectedIndex = dlgAixmHolding.pnlBasedOn.IndexOf(dataRow_0["basedOnEnt"]);
         dlgAixmHolding.pnlType.SelectedIndex = dlgAixmHolding.pnlType.method_3(dataRow_0["codeType"]);
         if (dataRow_0["txtDescr"] != None):
             dlgAixmHolding.txtDescription.Value = dataRow_0["txtDescr"];
         if (dataRow_0["txtRmk"] != None):
             dlgAixmHolding.txtRemarks.Value = dataRow_0["txtRmk"];
     resultDlg = dlgAixmHolding.exec_()
     if (resultDlg == 1):
         dataRow0 = dataRow_0 == None or len(dataRow_0) == 0;
         strS = [];
         if (not dataRow0):
             for a in dataBaseHoldings_0.nameList:
                 strS.append(None)
             # str = new string[dataBaseHoldings_0.Columns.Count];
             i = 0
             for name in dataBaseHoldings_0.nameList:
                 strS[i] = dataRow_0[name]
                 i += 1
         else:
             dataRow_0 = dataBaseHoldings_0.NewRow();
         dataRow_0["basedOnEnt"] = dlgAixmHolding.pnlBasedOn.SelectedItem;
         if (dataRow0):
             dataRow_0["oldBasedOnEnt"] = dataRow_0["basedOnEnt"];
         dataRow_0["codeType"] = dlgAixmHolding.pnlType.SelectedItem;
         if (dataRow0):
             dataRow_0["oldCodeType"] = dataRow_0["codeType"];
         if (not String.IsNullOrEmpty(dlgAixmHolding.txtDescription.Value)):
             dataRow_0["txtDescr"] = dlgAixmHolding.txtDescription.Value;
         else:
             dataRow_0["txtDescr"] = None;
         if (not String.IsNullOrEmpty(dlgAixmHolding.txtRemarks.Value)):
             dataRow_0["txtRmk"] = dlgAixmHolding.txtRemarks.Value;
         else:
             dataRow_0["txtRmk"] = None;
         if (dataRow0):
             dataRow_0["procLegs"] = DataBaseProcedureLegs();
             dataRow_0["procLegsEx"] = DataBaseProcedureLegsEx();
         if (not dataRow0):
             num = 1;
             while (num < len(strS)):
                 if (not strS[num] == dataRow_0[dataRow_0.nameList[num]]):
                     dataRow_0["changed"] = "True";
                     if (dataRow0):
                         dataBaseHoldings_0.RowsAdd(dataRow_0);
                     flag = True;
                     return flag;
                 else:
                     num += 1;
         else:
             dataRow_0["new"] = "True";
         if (dataRow0):
             dataBaseHoldings_0.RowsAdd(dataRow_0);
         flag = True;
         return flag;
     return flag
예제 #5
0
 def smethod_0(dataBaseSTARs_0, dataBaseProcedureData_0, dataRow_0):
     flag = False
     dlgAixmStar = DlgAixmStar()
     dlgAixmStar.data = dataBaseProcedureData_0
     dlgAixmStar.table = dataBaseSTARs_0
     dlgAixmStar.selected = dataRow_0
     dataBaseProcedureData_0.method_51(dlgAixmStar.pnlAerodrome)
     dataBaseProcedureData_0.method_47(dlgAixmStar.pnlMSA)
     dlgAixmStar.pnlAcCategory.Items = CodeCatAcftAixm.Items
     dlgAixmStar.pnlType.Items = CodeTypeStarAixm.Items
     # dlgAixmStar.pnlAcCategory.comboBox.insertItem(0, "");
     # dlgAixmStar.pnlMSA.comboBox.insertItem(0, "");
     if (dataRow_0 != None and len(dataRow_0) != 0):
         dlgAixmStar.pnlAerodrome.SelectedIndex = dlgAixmStar.pnlAerodrome.IndexOf(
             dataRow_0["ahpEnt"])
         dlgAixmStar.pnlDesignator.Value = dataRow_0["txtDesig"]
         if (dataRow_0["codeCatAcft"] != None):
             dlgAixmStar.pnlAcCategory.SelectedIndex = dlgAixmStar.pnlAcCategory.method_3(
                 dataRow_0["codeCatAcft"])
         if (dataRow_0["codeTransId"] != None):
             dlgAixmStar.pnlTransID.Value = dataRow_0["codeTransId"]
         if (dataRow_0["mgpEnt"] != None):
             dlgAixmStar.pnlMSA.SelectedIndex = dlgAixmStar.pnlMSA.IndexOf(
                 dataRow_0["mgpEnt"])
         if (dataRow_0["codeRnp"] != None):
             dlgAixmStar.pnlRNP.Value = dataRow_0["codeRnp"]
         if (dataRow_0["txtDescrComFail"] != None):
             dlgAixmStar.txtDescrComFail.Value = dataRow_0[
                 "txtDescrComFail"]
         dlgAixmStar.pnlType.SelectedIndex = dlgAixmStar.pnlType.method_3(
             dataRow_0["codeTypeRte"])
         if (dataRow_0["txtDescr"] != None):
             dlgAixmStar.txtDescription.Value = dataRow_0["txtDescr"]
         if (dataRow_0["txtRmk"] != None):
             dlgAixmStar.txtRemarks.Value = dataRow_0["txtRmk"]
     resultDlg = dlgAixmStar.exec_()
     if (resultDlg == 1):
         dataRow0 = dataRow_0 == None or len(dataRow_0) == 0
         strS = []
         if (not dataRow0):
             for i in range(dataBaseSTARs_0.ColumnsCount()):
                 strS.append(None)
             # strS = new string[dataBaseSTARs_0.ColumnsCount];
             i = 0
             for name in dataBaseSTARs_0.nameList:
                 strS[i] = dataRow_0[name]
                 i += 1
         else:
             dataRow_0 = dataBaseSTARs_0.NewRow()
         dataRow_0["ahpEnt"] = dlgAixmStar.pnlAerodrome.SelectedItem
         if (dataRow0):
             dataRow_0["oldAhpEnt"] = dataRow_0["ahpEnt"]
         dataRow_0["txtDesig"] = dlgAixmStar.pnlDesignator.Value
         if (dataRow0):
             dataRow_0["oldTxtDesig"] = dataRow_0["txtDesig"]
         if (dlgAixmStar.pnlAcCategory.SelectedIndex >= 0):
             dataRow_0[
                 "codeCatAcft"] = dlgAixmStar.pnlAcCategory.SelectedItem
         else:
             dataRow_0["codeCatAcft"] = None
         if (dataRow0):
             dataRow_0["oldCodeCatAcft"] = dataRow_0["codeCatAcft"]
         if (not String.IsNullOrEmpty(dlgAixmStar.pnlTransID.Value)):
             dataRow_0["codeTransId"] = dlgAixmStar.pnlTransID.Value
         else:
             dataRow_0["codeTransId"] = None
         if (dataRow0):
             dataRow_0["oldCodeTransId"] = dataRow_0["codeTransId"]
         if (dlgAixmStar.pnlMSA.SelectedIndex >= 0):
             dataRow_0["mgpEnt"] = dlgAixmStar.pnlMSA.SelectedItem
         else:
             dataRow_0["mgpEnt"] = None
         if (not math.isnan(dlgAixmStar.pnlRNP.Value)
                 and not math.isinf(dlgAixmStar.pnlRNP.Value)):
             dataRow_0["codeRnp"] = dlgAixmStar.pnlRNP.Value
         else:
             dataRow_0["codeRnp"] = None
         dataRow_0["codeTypeRte"] = dlgAixmStar.pnlType.SelectedItem
         if (not String.IsNullOrEmpty(dlgAixmStar.txtDescrComFail.Value)):
             dataRow_0[
                 "txtDescrComFail"] = dlgAixmStar.txtDescrComFail.Value
         else:
             dataRow_0["txtDescrComFail"] = None
         if (not String.IsNullOrEmpty(dlgAixmStar.txtDescription.Value)):
             dataRow_0["txtDescr"] = dlgAixmStar.txtDescription.Value
         else:
             dataRow_0["txtDescr"] = None
         if (not String.IsNullOrEmpty(dlgAixmStar.txtRemarks.Value)):
             dataRow_0["txtRmk"] = dlgAixmStar.txtRemarks.Value
         else:
             dataRow_0["txtRmk"] = None
         if (dataRow0):
             dataRow_0["procLegs"] = DataBaseProcedureLegs()
             dataRow_0["procLegsEx"] = DataBaseProcedureLegsEx()
         if (not dataRow0):
             num = 1
             while (num < len(strS)):
                 if (not strS[num] == dataRow_0[dataRow_0.nameList[num]]):
                     dataRow_0["changed"] = "True"
                     if (dataRow0):
                         dataBaseSTARs_0.RowsAdd(dataRow_0)
                     flag = True
                     return flag
                 else:
                     num += 1
         else:
             dataRow_0["new"] = "True"
         if (dataRow0):
             dataBaseSTARs_0.RowsAdd(dataRow_0)
         flag = True
         return flag