Ejemplo n.º 1
0
        public override void DescribeTree(TreeView tree, DataTable T, string ListingType)
        {
            //Aggiorno le intestazioni del DataGrid
            if (ListingType == "tree")
            {
                base.DescribeColumns(T, ListingType);
                foreach (DataColumn C in T.Columns)
                {
                    DescribeAColumn(T, C.ColumnName, "", -1);
                }
                DescribeAColumn(T, "leveldescr", "Livello", 1);
                DescribeAColumn(T, "sortcode", "Codice", 2);
                DescribeAColumn(T, "description", "Denominazione", 3);
                DescribeAColumn(T, "movkind", "Tipo movimento", 4);
                DescribeAColumn(T, "printingorder", "Ordine stampa", 5);
                DescribeAColumn(T, "incomeprevision", "Budget Ricavi", 6);
                DescribeAColumn(T, "expenseprevision", "Budget Costi", 7);
            }


            base.DescribeTree(tree, T, ListingType);
            string filterc   = QHC.CmpEq("nlevel", 1);
            string filtersql = QHS.CmpEq("nlevel", 1);

            int eserc = CfgFn.GetNoNullInt32(GetSys("esercizio"));

            filterc   = QHC.AppAnd(filterc, QHC.NullOrLe("start", eserc), QHC.NullOrGe("stop", eserc));
            filtersql = QHC.AppAnd(filtersql, QHS.NullOrLe("start", eserc), QHS.NullOrGe("stop", eserc));

            TreeViewManager M = new TreeViewClassMovimentiView(T, tree, filterc, filtersql);
        }
Ejemplo n.º 2
0
        public override void DescribeTree(TreeView tree, DataTable T, string ListingType)
        {
            base.DescribeTree(tree, T, ListingType);
            string filterc   = QHC.CmpEq("nlevel", "1");
            string filtersql = QHS.CmpEq("nlevel", "1");

            if (ListingType != "history")
            {
                int eserc = CfgFn.GetNoNullInt32(GetSys("esercizio"));
                filterc   = QHC.AppAnd(filterc, QHC.NullOrLe("start", eserc), QHC.NullOrGe("stop", eserc));
                filtersql = QHC.AppAnd(filtersql, QHS.NullOrLe("start", eserc), QHS.NullOrGe("stop", eserc));
            }
            //			if (ListingType=="tree"){
            //				string eserc = esercizio.ToString();
            //				filter=filter+"AND(esercizio='" + eserc + "')";
            //			}
            //easy_node_dispatcher D = new easy_node_dispatcher(
            //    "sortinglevel",
            //    "nlevel",
            //    "description",
            //    "flagusable",
            //    "description",
            //    "sortcode"
            //    );
            int    maxlevel        = 0;
            string filterSortLevel = "";

            if (ListingType == "tree5")
            {
                maxlevel        = 5;
                filterSortLevel = QHS.CmpLe("nlevel", maxlevel);
                myGetData.SetStaticFilter("sortinglevel", filterSortLevel);
            }

            bool all = false;

            if (ListingType == "treeall")
            {
                all = true;
            }
            //object o = T.ExtendedProperties["idsorkindFilter"];
            //string filtro = o==null
            //    ? QHS.BitSet("flag", 1)
            //    : QHS.AppAnd(o.ToString(), QHS.BitSet("flag", 1));
            //int levelop = CfgFn.GetNoNullInt32(Conn.DO_READ_VALUE("sortinglevel", filtro, "min(nlevel)"));
            TreeViewManager M = new TreeViewClassMovimenti(Conn, T, tree, filterc, filtersql, all, maxlevel);          //, levelop);
        }