Ejemplo n.º 1
0
        private void OzelDrmAddDict(string tbl, OpsDataSet.OPMRow opmRow, DataColumn dataCol)
        {
            string ozlDrm;

            DevExpress.XtraGrid.Columns.LayoutViewColumn viewCol = opmLayoutView.Columns[dataCol.ColumnName];
            if (!opmRow.IsNull(dataCol))
            {
                ozlDrm = opsQueriesTableAdapter.OZEL_DURUM(tbl, opmRow[dataCol].ToString()).ToString();
                OzlDrm[dataCol.ColumnName] = ozlDrm;
            }
        }
Ejemplo n.º 2
0
        private void newRecord()
        {
            if (editable)
            {
                opmLayoutView.BeginDataUpdate();
                opsDataSet.Clear();

                OpsDataSet.OPMRow opmRow = opsDataSet.OPM.NewOPMRow();

                PK           = (int)Program.MF.mainQueriesTableAdapter.GET_PK("OPS");
                opmRow.OPMID = PK;
                opmRow.SHPID = -1;  // TO
                opmRow.CNEID = -1;  // TO
                opmRow.NSTU  = "B"; // Booking
                opmRow.TOB   = "O"; // Ops
                opmRow.OWNR  = "1"; // Merkez

                opsDataSet.OPM.AddOPMRow(opmRow);
                opmLayoutView.EndDataUpdate();
            }
        }
Ejemplo n.º 3
0
        private void LoadAll()
        {
            opsDataSet.Clear();
            OzlDrm.Clear();

            if (PK == 0) // New
            {
                newRecord();
                return;
            }

            this.opmaOpsTableAdapter.FillByOPM(this.opsDataSet.OPMA_OPS, PK);      // Ops Lookup
            this.opmaTableAdapter.FillByOPM(this.opsDataSet.OPMA, PK);             // AMETA
            this.opmaPCTableAdapter.Fill(this.opsDataSet.AMETA_PROFIT_CALC, PK);   // AMETA Profit Calc

            this.opshTableAdapter.FillByOP(this.opsDataSet.OPSH, PK);              // StatuHistory
            this.oppTableAdapter.FillByOP(this.opsDataSet.OPP, PK);                // Packages/Containers
            this.opmcTableAdapter.FillByOPM(this.opsDataSet.OPMC, PK);             // OtherCharges
            this.oprhSelDisTableAdapter.Fill(this.opsDataSet.OPRH_SEL_DIS, PK, 0); //GidenEvrak
            this.opcLupTableAdapter.Fill(this.opsDataSet.OPC_LUP);
            this.opcLupMTableAdapter.Fill(this.opsDataSet.OPC_LUP_M, PK);

            if (Program.MF.EntryCheck("Ops.opMasterEditXF.afdoDP", isSilent: true))
            {
                this.afdoTableAdapter.Fill(this.opsDataSet.AFDO_SEL, string.Format("OPid = {0}", PK), Program.USR);   // Account
            }
            afdoGridView.OptionsBehavior.Editable = Program.MF.ModifyCheck("Ops.opMasterEditXF.afdoDP", isSilent: true);

            this.opmTableAdapter.FillByPK(this.opsDataSet.OPM, PK);     // Master
            OpsDataSet.OPMRow opmRow = (OpsDataSet.OPMRow) this.opsDataSet.OPM.Rows[0];

            this.opm2TableAdapter.FillByPK(this.opsDataSet.OPM2, PK);     // OPM+

            foreach (DataColumn dataCol in this.opsDataSet.OPH.Columns)
            {
                OzlDrm.Add(dataCol.ColumnName, "");
            }

            OzelDrmAddDict("LOC", opmRow, this.opsDataSet.OPM.ORGColumn);
            OzelDrmAddDict("LOC", opmRow, this.opsDataSet.OPM.DSTColumn);
            OzelDrmAddDict("LOC", opmRow, this.opsDataSet.OPM.POLColumn);
            OzelDrmAddDict("LOC", opmRow, this.opsDataSet.OPM.POTColumn);
            OzelDrmAddDict("LOC", opmRow, this.opsDataSet.OPM.POUColumn);

            OzelDrmAddDict("FRT", opmRow, this.opsDataSet.OPM.SHPIDColumn);
            OzelDrmAddDict("FRT", opmRow, this.opsDataSet.OPM.CNEIDColumn);
            OzelDrmAddDict("FRT", opmRow, this.opsDataSet.OPM.CRRIDColumn);
            OzelDrmAddDict("FRT", opmRow, this.opsDataSet.OPM.CRAIDColumn);
            OzelDrmAddDict("FRT", opmRow, this.opsDataSet.OPM.NFYIDColumn);

            //string islYtkCur, accYtkCur;
            //Program.MF.IslAccCurYtk("M", PK, out islYtkCur, out accYtkCur);
            //bool ytkOK = Program.MF.YetkiCheck(islYtkCur, true);
            //bool accYtkOK = Program.MF.YetkiCheck(accYtkCur, true);

            opmLayoutView.OptionsBehavior.Editable  = editable && iE; //ytkOK;
            opm2LayoutView.OptionsBehavior.Editable = editable && iE;
            oppGridView.OptionsBehavior.Editable    = editable && iE;
            opmaGridView.OptionsBehavior.Editable   = editable && iE;
            opmcGridView.OptionsBehavior.Editable   = editable && iE;
            afdoGridView.OptionsBehavior.Editable   = Program.MF.ModifyCheck("Ops.opMasterEditXF.afdoDP", isSilent: true) && aE; // accYtkOK;

            godInfMemoEdit.Enabled = editable && iE;
            hndInfMemoEdit.Enabled = editable && iE;
            accInfMemoEdit.Enabled = editable && iE;
        }