Exemplo n.º 1
0
        public ActionResult WinCreateReport_ItemsSelRead(string PanelID, string sGxID, string SelOldItemIDs, string SelNowItemIDs, string SelectedStore)
        {
            string[] arrOldItemIDs = SelOldItemIDs.Split(CosValue.SPLITOPERATOR2);
            string[] arrNowItemIDs = SelNowItemIDs.Split(CosValue.SPLITOPERATOR2);
            int      num           = 0;

            foreach (string oldItemID in arrOldItemIDs) //如果某个老编号在新编号里面,保留
            {
                if (arrNowItemIDs.Contains(oldItemID))
                {
                    num++;
                }
            }

            object[][] arrObj = new object[num][];
            num = 0;
            int allnum = 0;

            foreach (string oldItemID in arrOldItemIDs) //如果某个老编号在新编号里面,保留
            {
                if (arrNowItemIDs.Contains(oldItemID))
                {
                    switch (oldItemID)
                    {
                    case "Department":
                        DepartmentInfoManage departmentMan = new DepartmentInfoManage();
                        arrObj[num] = departmentMan.GetNameStoreforSelection(sGxID, SelectedStore);    //获得院系
                        break;

                    case "Province":
                        dqdmTableManage dqMan = new dqdmTableManage();
                        arrObj[num] = dqMan.GetNameStoreforSelection(SelectedStore);
                        break;

                    default:
                        OriginTableManage tableMan = new OriginTableManage();
                        arrObj[num] = tableMan.GetNameStoreforSelection(oldItemID, SelectedStore, true);
                        break;
                    }
                    allnum += arrObj[num].Length;
                    num++;
                }
            }

            object[] returnObj = new object[allnum];
            int      k         = 0;

            for (int i = 0; i < num; i++)
            {
                for (int j = 0; j < arrObj[i].Length; j++)
                {
                    returnObj[k] = arrObj[i][j];
                    k++;
                }
            }
            return(this.Store(returnObj));
        }
Exemplo n.º 2
0
        public ActionResult WinCreateReport_ItemsAllRead(string ParentVariable, string sGxID, string SelOldItemIDs, string SelNowItemIDs, string SelectedStore)
        {
            //GetParentVariable(ParentVariable);
            string[] arrOldItemIDs = SelOldItemIDs.Split(CosValue.SPLITOPERATOR2);
            string[] arrNowItemIDs = SelNowItemIDs.Split(CosValue.SPLITOPERATOR2);

            if (arrNowItemIDs != null)
            {
                object[][] arrObj = new object[arrNowItemIDs.Length][];
                int        num    = 0;
                for (int i = 0; i < arrNowItemIDs.Length; i++)
                {
                    switch (arrNowItemIDs[i])
                    {
                    case "Department":
                        DepartmentInfoManage departmentMan = new DepartmentInfoManage();
                        arrObj[i] = departmentMan.GetNameStoreforSelection(sGxID, SelectedStore, false);    //获得院系
                        break;

                    case "Province":
                        dqdmTableManage dqMan = new dqdmTableManage();
                        arrObj[i] = dqMan.GetNameStoreforSelection(SelectedStore, false);
                        break;

                    default:
                        OriginTableManage tableMan = new OriginTableManage();
                        arrObj[i] = tableMan.GetNameStoreforSelection(arrNowItemIDs[i], SelectedStore, false);
                        break;
                    }
                    num += arrObj[i].Length;
                }
                object[] returnObj = new object[num];
                num = 0;
                for (int i = 0; i < arrNowItemIDs.Length; i++)
                {
                    for (int j = 0; j < arrObj[i].Length; j++)
                    {
                        returnObj[num] = arrObj[i][j];
                        num++;
                    }
                }
                return(this.Store(returnObj));
            }
            else
            {
                return(null);
            }
        }