Пример #1
0
        public override void WebDescribeTree(hwTreeView tree, DataTable T, string ListingType)
        {
            int esercizio = Convert.ToInt32(GetSys("esercizio"));

            if (ListingType == "tree")
            {
                DescribeColumns(T, ListingType);
            }


            base.WebDescribeTree(tree, T, ListingType);
            int               maxlevel  = 9;
            string            filterc   = QHC.IsNull("paridaccmotive");
            string            filtersql = QHS.IsNull("paridaccmotive");
            hwTreeViewManager M         = new hwTreeViewAccMotiveApplied(Conn, T, tree, filterc, filtersql, maxlevel);
        }
Пример #2
0
        public override void WebDescribeTree(hwTreeView tree, DataTable T, string ListingType)
        {
            int maxDepth = 9;

            if (ListingType == "tree")
            {
                base.DescribeColumns(T, ListingType);
                foreach (DataColumn C in T.Columns)
                {
                    DescribeAColumn(T, C.ColumnName, "");
                }
                DescribeAColumn(T, "codelistclass", "Codice");
                DescribeAColumn(T, "title", "Denominazione");
            }

            base.WebDescribeTree(tree, T, ListingType);
            string filterc   = QHC.IsNull("paridlistclass");
            string filtersql = QHS.IsNull("paridlistclass");

            hwTreeViewListClass M = new hwTreeViewListClass(Conn, T, tree, filterc, filtersql, false, maxDepth);
        }
Пример #3
0
        public override void DescribeTree(TreeView tree, DataTable T, string ListingType)
        {
            // L'idupb ha una lunghezza di 36 caratteri ed ogni livello ha una lunghezza di 4 caratteri

            //Aggiorno le intestazioni del DataGrid
            if (ListingType == "tree")
            {
                base.DescribeColumns(T, ListingType);
                foreach (DataColumn C in T.Columns)
                {
                    DescribeAColumn(T, C.ColumnName, "");
                }
                DescribeAColumn(T, "codemotive", "Codice");
                DescribeAColumn(T, "title", "Denominazione");
            }

            base.DescribeTree(tree, T, ListingType);
            string filterc   = QHC.IsNull("paridaccmotive");
            string filtersql = QHS.IsNull("paridaccmotive");

            TreeViewAccMotive M = new TreeViewAccMotive(Conn, T, tree, filterc, filtersql);
        }
Пример #4
0
        public override void DescribeTree(TreeView tree, DataTable T, string ListingType)
        {
            //Aggiorno le intestazioni del DataGrid
            int esercizio = Convert.ToInt32(GetSys("esercizio"));

            if (ListingType == "tree" || ListingType == "treee" || ListingType == "treesupbnew" || ListingType == "treeeupbnew" ||
                ListingType == "trees" || ListingType == "treees" ||
                ListingType == "treeenew" || ListingType == "treesnew" ||
                ListingType == "treeeupb" || ListingType == "treesupb" ||
                ListingType == "treealle" || ListingType == "treealls" ||
                ListingType == "treeallenew" || ListingType == "treeallsnew" ||
                ListingType == "upbprevision")
            {
                base.DescribeColumns(T, ListingType);
                foreach (DataColumn C in T.Columns)
                {
                    DescribeAColumn(T, C.ColumnName, "");
                }
                DescribeAColumn(T, "codefin", "Codice");
                DescribeAColumn(T, "leveldescr", "Livello");
                DescribeAColumn(T, "title", "Denominazione");
                DescribeAColumn(T, "manager", "Responsabile");
                DescribeAColumn(T, "cupcode", "CUP");
                DescribeAColumn(T, "prevision", "Prev. Iniziale Princ.");
                DescribeAColumn(T, "currentprevision", "Prev. Attuale Princ.");
                DescribeAColumn(T, "availableprevision", "Prev. Disponibile Princ.");
                if (Conn != null)
                {
                    int finkind = CfgFn.GetNoNullInt32(Conn.GetSys("fin_kind"));
                    if (finkind == 3)
                    {
                        DescribeAColumn(T, "secondaryprev", "Prev. Iniziale Second.");
                        DescribeAColumn(T, "currentsecondaryprev", "Prev. Attuale Second.");
                        DescribeAColumn(T, "availablesecondaryprev", "Prev. Disponibile Second.");
                    }
                }
            }

            base.DescribeTree(tree, T, ListingType);

            int    esercizionew    = esercizio + 1;
            string filterC         = QHC.CmpEq("nlevel", 1);
            string filtersql       = QHS.CmpEq("nlevel", 1);
            string kind            = "ES";
            string filteresercizio = QHS.CmpEq("ayear", GetSys("esercizio"));

            if (ListingType == "treee")
            {
                filtersql = QHS.AppAnd(
                    QHS.BitClear("flag", 0),
                    QHS.AppAnd(QHS.CmpEq("ayear", esercizio), QHS.IsNull("paridfin")));
                filterC = QHC.AppAnd(
                    QHC.BitClear("flag", 0),
                    QHC.AppAnd(QHC.CmpEq("ayear", esercizio), QHC.IsNull("paridfin")));
                kind = "E";
            }
            if (ListingType == "trees")
            {
                filtersql = QHS.AppAnd(
                    QHS.BitSet("flag", 0),
                    QHS.AppAnd(QHS.CmpEq("ayear", esercizio), QHS.IsNull("paridfin")));
                filterC = QHC.AppAnd(
                    QHC.BitSet("flag", 0),
                    QHC.AppAnd(QHC.CmpEq("ayear", esercizio), QHC.IsNull("paridfin")));
                kind = "S";
            }
            if (ListingType == "treees")
            {
                //filter="(nlevel='1')";
                kind = "ES";
            }
            if (ListingType == "tree")
            {
                //filter="(nlevel='1')";
                kind = "ES";
            }
            if (ListingType == "treeenew")
            {
                filtersql = QHS.AppAnd(
                    QHS.BitClear("flag", 0),
                    QHS.AppAnd(QHS.CmpEq("ayear", esercizionew), QHS.IsNull("paridfin")));
                filterC = QHC.AppAnd(
                    QHC.BitClear("flag", 0),
                    QHC.AppAnd(QHC.CmpEq("ayear", esercizionew), QHC.IsNull("paridfin")));
                kind            = "E";
                filteresercizio = QHS.CmpEq("ayear", esercizionew);
            }
            if (ListingType == "treeeupbnew")
            {
                filtersql = QHS.AppAnd(
                    QHS.BitClear("flag", 0),
                    QHS.AppAnd(QHS.CmpEq("ayear", esercizionew), QHS.IsNull("paridfin")));
                filterC = QHC.AppAnd(
                    QHC.BitClear("flag", 0),
                    QHC.AppAnd(QHC.CmpEq("ayear", esercizionew), QHC.IsNull("paridfin")));
                kind            = "E";
                filteresercizio = QHS.CmpEq("ayear", esercizionew);
            }

            if (ListingType == "treesnew")
            {
                filtersql = QHS.AppAnd(
                    QHS.BitSet("flag", 0),
                    QHS.AppAnd(QHS.CmpEq("ayear", esercizionew), QHS.IsNull("paridfin")));
                filterC = QHC.AppAnd(
                    QHC.BitSet("flag", 0),
                    QHC.AppAnd(QHC.CmpEq("ayear", esercizionew), QHC.IsNull("paridfin")));
                kind            = "S";
                filteresercizio = QHS.CmpEq("ayear", esercizionew);
            }
            if (ListingType == "treesupbnew")
            {
                filtersql = QHS.AppAnd(
                    QHS.BitSet("flag", 0),
                    QHS.AppAnd(QHS.CmpEq("ayear", esercizionew), QHS.IsNull("paridfin")));
                filterC = QHC.AppAnd(
                    QHC.BitSet("flag", 0),
                    QHC.AppAnd(QHC.CmpEq("ayear", esercizionew), QHC.IsNull("paridfin")));
                kind            = "S";
                filteresercizio = QHS.CmpEq("ayear", esercizionew);
            }
            if (ListingType == "treeeupb")
            {
                filtersql = QHS.AppAnd(
                    QHS.BitClear("flag", 0),
                    QHS.AppAnd(QHS.CmpEq("ayear", esercizio), QHS.IsNull("paridfin")));
                filterC = QHC.AppAnd(
                    QHC.BitClear("flag", 0),
                    QHC.AppAnd(QHC.CmpEq("ayear", esercizio), QHC.IsNull("paridfin")));
                kind = "E";
            }

            if (ListingType == "treesupb")
            {
                filtersql = QHS.AppAnd(
                    QHS.BitSet("flag", 0),
                    QHS.AppAnd(QHS.CmpEq("ayear", esercizio), QHS.IsNull("paridfin")));
                filterC = QHC.AppAnd(
                    QHC.BitSet("flag", 0),
                    QHC.AppAnd(QHC.CmpEq("ayear", esercizio), QHC.IsNull("paridfin")));
                kind = "S";
            }

            if (ListingType == "upbprevision")
            {
                filtersql = QHS.AppAnd(QHS.CmpEq("ayear", esercizio), QHS.IsNull("paridfin"));
                filterC   = QHC.AppAnd(QHC.CmpEq("ayear", esercizio), QHC.IsNull("paridfin"));
                kind      = "ES";
            }

            bool all = false;

            if (ListingType == "treealle")
            {
                filtersql = QHS.AppAnd(
                    QHS.BitClear("flag", 0),
                    QHS.AppAnd(QHS.CmpEq("ayear", esercizio), QHS.IsNull("paridfin")));
                filterC = QHC.AppAnd(
                    QHC.BitClear("flag", 0),
                    QHC.AppAnd(QHC.CmpEq("ayear", esercizio), QHC.IsNull("paridfin")));
                kind = "E";
                all  = true;
            }
            if (ListingType == "treealls")
            {
                filtersql = QHS.AppAnd(
                    QHS.BitSet("flag", 0),
                    QHS.AppAnd(QHS.CmpEq("ayear", esercizio), QHS.IsNull("paridfin")));
                filterC = QHC.AppAnd(
                    QHC.BitSet("flag", 0),
                    QHC.AppAnd(QHC.CmpEq("ayear", esercizio), QHC.IsNull("paridfin")));
                kind = "S";
                all  = true;
            }

            if (ListingType == "treeallenew")
            {
                filtersql = QHS.AppAnd(
                    QHS.BitClear("flag", 0),
                    QHS.AppAnd(QHS.CmpEq("ayear", esercizionew), QHS.IsNull("paridfin")));
                filterC = QHC.AppAnd(
                    QHC.BitClear("flag", 0),
                    QHC.AppAnd(QHC.CmpEq("ayear", esercizionew), QHC.IsNull("paridfin")));
                kind = "E";
                all  = true;
            }
            if (ListingType == "treeallsnew")
            {
                filtersql = QHS.AppAnd(
                    QHS.BitSet("flag", 0),
                    QHS.AppAnd(QHS.CmpEq("ayear", esercizionew), QHS.IsNull("paridfin")));
                filterC = QHC.AppAnd(
                    QHC.BitSet("flag", 0),
                    QHC.AppAnd(QHC.CmpEq("ayear", esercizionew), QHC.IsNull("paridfin")));
                kind = "S";
                all  = true;
            }
            int    maxlevel = 0;
            object o        = Conn.DO_READ_VALUE("finlevel", QHS.CmpEq("ayear", GetSys("esercizio")), "max(nlevel)");

            if ((o != null) && (o != DBNull.Value))
            {
                maxlevel = Convert.ToInt32(o);
            }
            TreeViewManager M = new TreeViewBilancio(Conn, T, tree, filterC, filtersql, kind, all, maxlevel,
                                                     CfgFn.GetNoNullInt32(GetSys("finusablelevel")));

            myGetData.SetStaticFilter("finlevel", filteresercizio);
        }
Пример #5
0
        void CalcolaUbicazioneResponsabile(System.Data.DataRow R)
        {
            //Mette in !location la riga di assetlocation con data null
            DataTable AssetLocation = R.Table.DataSet.Tables["assetlocation"];
            DataTable Location      = R.Table.DataSet.Tables["location"];

            DataRow [] RAL = AssetLocation.Select(QHC.AppAnd(QHC.CmpEq("idasset", R["idasset"]),
                                                             QHC.IsNull("start")));
            if (RAL.Length > 0)
            {
                object    idlocation = RAL[0]["idlocation"];
                DataRow[] RLoc       = Location.Select(QHC.CmpEq("idlocation", idlocation));
                if (RLoc.Length == 0)
                {
                    Conn.RUN_SELECT_INTO_TABLE(Location, null, QHS.CmpEq("idlocation", idlocation), null, false);
                    RLoc = Location.Select(QHC.CmpEq("idlocation", idlocation));
                }

                if (RLoc.Length > 0)
                {
                    R["!location"] = RLoc[0]["description"];
                }
                else
                {
                    R["!location"] = "";
                }
            }
            else
            {
                R["!location"] = "";
            }


            //Mette in !manager la riga di assetmanager con data null
            DataTable AssetManager = R.Table.DataSet.Tables["assetmanager"];
            DataTable Manager      = R.Table.DataSet.Tables["manager"];

            DataRow[] RAM = AssetManager.Select(QHC.AppAnd(QHC.CmpEq("idasset", R["idasset"]),
                                                           QHC.IsNull("start")));
            if (RAM.Length > 0)
            {
                object    idmanager = RAM[0]["idman"];
                DataRow[] RMan      = Manager.Select(QHC.CmpEq("idman", idmanager));
                if (RMan.Length == 0)
                {
                    Conn.RUN_SELECT_INTO_TABLE(Manager, null, QHS.CmpEq("idman", idmanager), null, false);
                    RMan = Manager.Select(QHC.CmpEq("idman", idmanager));
                }
                if (RMan.Length > 0)
                {
                    R["!manager"] = RMan[0]["title"];
                }
                else
                {
                    R["!manager"] = "";
                }
            }
            else
            {
                R["!manager"] = "";
            }

            //Mette in !submanager la riga di assetsubmanager con data null
            DataTable AssetSubManager = R.Table.DataSet.Tables["assetsubmanager"];
            DataTable SubManager      = R.Table.DataSet.Tables["submanager"];

            DataRow[] RAsubM = AssetSubManager.Select(QHC.AppAnd(QHC.CmpEq("idasset", R["idasset"]),
                                                                 QHC.IsNull("start")));
            if (RAsubM.Length > 0)
            {
                object    idmanager = RAsubM[0]["idmanager"];
                DataRow[] RAsubMan  = SubManager.Select(QHC.CmpEq("idman", idmanager));
                if (RAsubMan.Length == 0)
                {
                    Conn.RUN_SELECT_INTO_TABLE(SubManager, null, QHS.CmpEq("idman", idmanager), null, false);
                    RAsubMan = SubManager.Select(QHC.CmpEq("idman", idmanager));
                }
                if (RAsubMan.Length > 0)
                {
                    R["!submanager"] = RAsubMan[0]["title"];
                }
                else
                {
                    R["!submanager"] = "";
                }
            }
            else
            {
                R["!submanager"] = "";
            }
        }
Пример #6
0
 public override void DescribeTree(TreeView tree, DataTable T, string ListingType)
 {
     // Listing Type chiamato dal form di gestione di budgetprevision (fissato l'IDFIN)
     if (ListingType == "tree")
     {
         object idSorting = T.ExtendedProperties["idsor"];
         base.DescribeTree(tree, T, ListingType);
         string          filterC         = QHC.AppAnd(QHC.CmpEq("idsor", idSorting), QHC.IsNull("paridupb"));
         string          filterSql       = QHS.AppAnd(QHS.CmpEq("idsor", idSorting), QHS.IsNull("paridupb"));
         string          filteresercizio = QHS.CmpEq("ayear", GetSys("esercizio"));
         TreeViewManager M = new TreeViewbudgetprevision(T, tree, filterC, filterSql, null);
         myGetData.SetStaticFilter("sortinglevel", filteresercizio);
     }
 }
Пример #7
0
 public override void DescribeTree(TreeView tree, DataTable T, string ListingType)
 {
     // Listing Type chiamato dal form di gestione di ACCOUNTYEAR (fissato l'IDACC)
     if (ListingType == "tree")
     {
         string idAcc = T.ExtendedProperties["idacc"].ToString();
         base.DescribeTree(tree, T, ListingType);
         string          filterc         = QHC.AppAnd(QHC.CmpEq("idacc", idAcc), QHC.IsNull("paridupb"));
         string          filtersql       = QHS.AppAnd(QHS.CmpEq("idacc", idAcc), QHS.IsNull("paridupb"));
         string          filteresercizio = QHS.CmpEq("ayear", GetSys("esercizio"));
         TreeViewManager M = new TreeViewAccountYear(Conn, T, tree, filterc, filtersql, null, 10);
         myGetData.SetStaticFilter("accountlevel", filteresercizio);
     }
 }