Beispiel #1
0
        private void tileItem3_ItemClick(object sender, TileItemEventArgs e)
        {
            TileItem t   = (TileItem)sender;
            string   dID = t.Name.Split('D')[1];

            if (!t.Checked)
            {
                t.Checked = true;
                displayDepartmentGroups(dID);
                treelist treelist1 = new treelist();
                treelist1.id       = dID;
                treelist1.TreeList = new TreeList();
                treelist1.TreeList = treeList1;
                listOfTreeList.Add(treelist1);
            }
            else
            {
                for (int i = 0; i < listOfTreeList.Count; i++)
                {
                    if (listOfTreeList[i].id == dID)
                    {
                        treeList1.DataSource = null;
                        treeList1.DataSource = listOfTreeList[i].TreeList.DataSource;

                        this.Controls.Add(listOfTreeList[i].TreeList);
                    }
                }
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //string power = Server.UrlDecode(Request.Cookies["user"].Values["power"]);

            string power = ",94,96,23,24,61,99,92,95,39,43,19,20,21,65,44,27,11,22,25,67,12,87,88,89,49,50,56,58,30,13,55,14,71,72,73,86,47,31,32,41,42,80,83,84,26,40,28,29,81,15,16,17,18,33,82,34,45,46,66,68,35,36,37,38,97,90,91,57,93,200,300,";
            Act    act   = new Act();

            if (1 == 1)
            {
                List <treelist> dicmod = new List <treelist>();

                treelist treelist = new treelist();
                treelist.text     = "请购单管理";
                treelist.isexpand = true;
                List <chlid> clist = new List <chlid>();
                if (power.Contains("44") == true)
                {
                    chlid c = new chlid();
                    c.url  = "../Comod/StorageRequiseClone.aspx?moduid=2";
                    c.text = "请购单查询";
                    clist.Add(c);
                }

                treelist.children = clist;
                dicmod.Add(treelist);
                act.MyObject0 = dicmod;
            }
            if (1 == 1)
            {
                List <treelist> dicmod = new List <treelist>();

                treelist treelist = new treelist();
                treelist.text     = "采购订单管理";
                treelist.isexpand = true;
                List <chlid> clist = new List <chlid>();
                if (power.Contains("27") == true)
                {
                    chlid c = new chlid();
                    c.url  = "../Comod/StorageRecordsClone.aspx?moduid=2";
                    c.text = "采购订单查询";
                    clist.Add(c);
                }
                if (power.Contains("11") == true)
                {
                    chlid c = new chlid();
                    c.url  = "../Comod/StorageRecordsStatusClone.aspx?moduid=2";
                    c.text = "采购订单执行表";
                    clist.Add(c);
                }
                treelist.children = clist;
                dicmod.Add(treelist);
                act.MyObject1 = dicmod;
            }
            if (2 == 2)
            {
                List <treelist> dicmod   = new List <treelist>();
                treelist        treelist = new treelist();
                treelist.text     = "采购单据明细表";
                treelist.isexpand = true;
                List <chlid> clist = new List <chlid>();
                if (power.Contains("22") == true)
                {
                    chlid c = new chlid();
                    c.url  = "../Comod/StorageRecords.aspx?moduid=79";
                    c.text = "采购入库查询";
                    clist.Add(c);
                }
                if (power.Contains("25") == true)
                {
                    chlid c = new chlid();
                    c.url  = "../Comod/returnstort.aspx?moduid=79";
                    c.text = "采购退库查询";
                    clist.Add(c);
                }
                if (power.Contains("67") == true)
                {
                    chlid c = new chlid();
                    c.url  = "../Comod/StorageRecordsInvoice.aspx?moduid=2";
                    c.text = "采购发票查询";
                    clist.Add(c);
                }
                if (power.Contains("12") == true)
                {
                    chlid c = new chlid();
                    c.url  = "../Comod/StorageRecordsRKClone.aspx?moduid=2";
                    c.text = "采购入库单执行表";
                    clist.Add(c);
                }
                if (power.Contains("88") == true)
                {
                    chlid c = new chlid();
                    c.url  = "../Finance/cgfpmxbClear.aspx?moduid=89";
                    c.text = "采购发票明细表";
                    clist.Add(c);
                }
                treelist.children = clist;
                dicmod.Add(treelist);
                act.MyObject2 = dicmod;
            }
            if (3 == 3)
            {
                List <treelist> dicmod   = new List <treelist>();
                treelist        treelist = new treelist();
                treelist.text     = "采购单据统计表";
                treelist.isexpand = true;
                List <chlid> clist = new List <chlid>();
                if (power.Contains("87") == true)
                {
                    chlid c = new chlid();
                    c.url  = "../Finance/caigouClear.aspx?moduid=89";
                    c.text = "采购入库单统计表";
                    clist.Add(c);
                }
                if (power.Contains("89") == true)
                {
                    chlid c = new chlid();
                    c.url  = "../Finance/cgfptjbClear.aspx?moduid=89";
                    c.text = "采购发票统计表";
                    clist.Add(c);
                }

                treelist.children = clist;
                dicmod.Add(treelist);
                act.MyObject3 = dicmod;
            }

            if (4 == 4)
            {
                List <treelist> dicmod = new List <treelist>();
                for (int i = 0; i < 4; i++)
                {
                    treelist treelist = new treelist();
                    if (i == 0)
                    {
                        treelist.text = "销售订单管理";
                    }
                    else if (i == 1)
                    {
                        treelist.text = "销售单据明细表";
                    }
                    else if (i == 2)
                    {
                        treelist.text = "销售单据统计表";
                    }
                    else if (i == 3)
                    {
                        treelist.text = "销售毛利统计";
                    }
                    treelist.isexpand = true;
                    List <chlid> clist = new List <chlid>();
                    if (i == 0)
                    {
                        if (power.Contains("30,") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/SalesRecordsClone.aspx?moduid=2";
                            c.text = "销售订单查询";
                            clist.Add(c);
                        }
                        if (power.Contains("13") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/SalesRecordsStatusClone.aspx?moduid=2";
                            c.text = "销售订单执行表";
                            clist.Add(c);
                        }
                    }
                    else if (i == 1)
                    {
                        if (power.Contains("55") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/DeliveryAll.aspx?moduid=83";
                            c.text = "销售出库退库查询";
                            clist.Add(c);
                        }
                        if (power.Contains("14") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/SalesRecordsRKClone.aspx?moduid=2";
                            c.text = "销售出库单执行情况表";
                            clist.Add(c);
                        }
                        if (power.Contains("71") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/SalesRecordsInvoice.aspx?moduid=83";
                            c.text = "销售发票查询";
                            clist.Add(c);
                        }
                        if (power.Contains("72") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Finance/xsfpmxbClear.aspx?moduid=83";
                            c.text = "销售发票明细表";
                            clist.Add(c);
                        }
                    }
                    else if (i == 2)
                    {
                        if (power.Contains("73") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Finance/salecomClear.aspx?moduid=89";
                            c.text = "销售出库单统计表";
                            clist.Add(c);
                        }
                        if (power.Contains("86") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Finance/xsfptjbClear.aspx?moduid=83";
                            c.text = "销售发票统计表";
                            clist.Add(c);
                        }
                    }
                    else if (i == 3)
                    {
                        if (power.Contains("47") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Finance/salecommlClear.aspx?moduid=89";
                            c.text = "销售毛利统计";
                            clist.Add(c);
                        }
                    }
                    treelist.children = clist;
                    dicmod.Add(treelist);
                }
                act.MyObject4 = dicmod;
            }
            if (5 == 5)
            {
                List <treelist> dicmod = new List <treelist>();
                for (int i = 0; i < 3; i++)
                {
                    treelist treelist = new treelist();
                    if (i == 0)
                    {
                        treelist.text = "单据明细表";
                    }
                    else if (i == 2)
                    {
                        treelist.text = "单据统计表";
                    }
                    else if (i == 1)
                    {
                        treelist.text = "超期报警";
                    }
                    treelist.isexpand = true;
                    List <chlid> clist = new List <chlid>();
                    if (i == 0)
                    {
                        if (power.Contains("28") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookYFKManage.aspx";
                            c.text = "预付款查询";
                            clist.Add(c);
                        }
                        if (power.Contains("17") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookYFKManageSales.aspx";
                            c.text = "预收款查询";
                            clist.Add(c);
                        }
                        if (power.Contains("29") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookFKOrderManage.aspx";
                            c.text = "付款单查询";
                            clist.Add(c);
                        }
                        if (power.Contains("18") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookFKOrderManageSales.aspx";
                            c.text = "收款单查询";
                            clist.Add(c);
                        }
                    }
                    else if (i == 2)
                    {
                        if (power.Contains("81") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookFKClear.aspx";
                            c.text = "付款统计";
                            clist.Add(c);
                        }
                        if (power.Contains("33") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookFKClearSales.aspx";
                            c.text = "收款统计";
                            clist.Add(c);
                        }
                        if (power.Contains("82") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookFKStaffClear.aspx";
                            c.text = "供应商应收应付统计";
                            clist.Add(c);
                        }
                        if (power.Contains("34") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookFKStaffClearSales.aspx";
                            c.text = "客户应收应付统计";
                            clist.Add(c);
                        }
                    }
                    else if (i == 1)
                    {
                        if (power.Contains("46") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookFKWarnClear.aspx";
                            c.text = "超期应付款报警";
                            clist.Add(c);
                        }
                        if (power.Contains("45") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookFKWarnClearSales.aspx";
                            c.text = "超期应收款报警";
                            clist.Add(c);
                        }
                    }
                    treelist.children = clist;
                    dicmod.Add(treelist);
                }

                act.MyObject5 = dicmod;
            }
            if (6 == 6)
            {
                List <treelist> dicmod = new List <treelist>();
                for (int i = 0; i < 2; i++)
                {
                    treelist treelist = new treelist();
                    if (i == 0)
                    {
                        treelist.text = "单据明细表";
                    }
                    else if (i == 1)
                    {
                        treelist.text = "单据统计表";
                    }
                    treelist.isexpand = true;
                    List <chlid> clist = new List <chlid>();
                    if (i == 0)
                    {
                        if (power.Contains("41") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookAdJustManage.aspx?moduid=80";
                            c.text = "库位调整查询";
                            clist.Add(c);
                        }
                        if (power.Contains("42") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookStockManage.aspx?moduid=80";
                            c.text = "库存调整查询";
                            clist.Add(c);
                        }
                    }
                    else if (i == 1)
                    {
                        if (power.Contains("80,") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/StockManage.aspx?moduid=81";
                            c.text = "库存统计";
                            clist.Add(c);
                        }
                        if (power.Contains("83") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/BookMonthClear.aspx";
                            c.text = "月结存";
                            clist.Add(c);
                        }
                        if (power.Contains("84") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Finance/salejxcClear.aspx?moduid=89";
                            c.text = "进销存变动表";
                            clist.Add(c);
                        }
                    }
                    treelist.children = clist;
                    dicmod.Add(treelist);
                }

                act.MyObject6 = dicmod;
            }
            if (7 == 7)
            {
                List <treelist> dicmod = new List <treelist>();
                for (int i = 0; i < 2; i++)
                {
                    treelist treelist = new treelist();
                    if (i == 0)
                    {
                        treelist.text = "单据明细表";
                    }
                    else if (i == 1)
                    {
                        treelist.text = "单据统计表";
                    }

                    treelist.isexpand = true;
                    List <chlid> clist = new List <chlid>();
                    if (i == 0)
                    {
                        if (power.Contains("68") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/StorageRecordsProcess.aspx?moduid=83";
                            c.text = "生产加工单查询";
                            clist.Add(c);
                        }
                        if (power.Contains("36") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/StorageRecordsReceipt.aspx?moduid=83";
                            c.text = "产成品入库单查询";
                            clist.Add(c);
                        }
                        if (power.Contains("38") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/StorageRecordsMaterial.aspx?moduid=83";
                            c.text = "材料出库单查询";
                            clist.Add(c);
                        }
                    }
                    else if (i == 1)
                    {
                        if (power.Contains("97") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Finance/materialcomClear.aspx?moduid=83";
                            c.text = "材料出库统计";
                            clist.Add(c);
                        }
                    }
                    treelist.children = clist;
                    dicmod.Add(treelist);
                }
                act.MyObject7 = dicmod;
            }
            if (8 == 8)
            {
                List <treelist> dicmod = new List <treelist>();
                for (int i = 0; i < 8; i++)
                {
                    treelist treelist = new treelist();
                    if (i == 0)
                    {
                        treelist.text = "企管部";
                    }
                    else if (i == 1)
                    {
                        treelist.text = "采购部";
                    }
                    else if (i == 2)
                    {
                        treelist.text = "营销部";
                    }
                    else if (i == 3)
                    {
                        treelist.text = "计划部";
                    }
                    else if (i == 4)
                    {
                        treelist.text = "仓储部";
                    }
                    else if (i == 5)
                    {
                        treelist.text = "生产部";
                    }
                    else if (i == 6)
                    {
                        treelist.text = "人力部";
                    }
                    else if (i == 7)
                    {
                        treelist.text = "财务部";
                    }

                    treelist.isexpand = true;
                    List <chlid> clist = new List <chlid>();
                    if (i == 0)
                    {
                        if (power.Contains("68") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/StorageRecordsProcess.aspx?moduid=83";
                            c.text = "表1";
                            clist.Add(c);
                        }
                        if (power.Contains("36") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Comod/StorageRecordsReceipt.aspx?moduid=83";
                            c.text = "表2";
                            clist.Add(c);
                        }
                    }
                    else if (i == 1)
                    {
                        if (power.Contains("97") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Finance/materialcomClear.aspx?moduid=83";
                            c.text = "表1";
                            clist.Add(c);
                        }
                    }
                    else if (i == 2)
                    {
                        if (power.Contains("97") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Finance/materialcomClear.aspx?moduid=83";
                            c.text = "表1";
                            clist.Add(c);
                        }
                    }
                    else if (i == 3)
                    {
                        if (power.Contains("97") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Finance/materialcomClear.aspx?moduid=83";
                            c.text = "表1";
                            clist.Add(c);
                        }
                    }
                    else if (i == 4)
                    {
                        if (power.Contains("97") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Finance/materialcomClear.aspx?moduid=83";
                            c.text = "表1";
                            clist.Add(c);
                        }
                    }
                    else if (i == 5)
                    {
                        if (power.Contains("97") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Finance/materialcomClear.aspx?moduid=83";
                            c.text = "表1";
                            clist.Add(c);
                        }
                    }
                    else if (i == 6)
                    {
                        if (power.Contains("97") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "../Finance/materialcomClear.aspx?moduid=83";
                            c.text = "表1";
                            clist.Add(c);
                        }
                    }
                    else if (i == 7)
                    {
                        if (power.Contains("97") == true)
                        {
                            chlid c = new chlid();
                            c.url  = "/pages/caiwu/jizhang.aspx";
                            c.text = "记账凭证";
                            clist.Add(c);
                        }
                    }
                    treelist.children = clist;
                    dicmod.Add(treelist);
                }
                act.MyObject11 = dicmod;
            }

            Response.Write(JsonConvert.SerializeObject(act));
        }