Exemplo n.º 1
0
        public static FunctionUnit newDSFunction(string funName, Env env, CellExt1 cs, DataSet ds)
        {
            FunctionUnit unit3;

            try
            {
                if (ds == null)
                {
                    throw new ReportError("数据集未产生,可能因为未连接数据库");
                }
                Type         classType = (Type)hashtable_1[funName.ToLower()];
                FunctionUnit unit      = (FunctionUnit)SupportClass.CreateNewInstance(classType);
                unit.env = env;
                unit.ds  = ds;
                unit.cs  = cs;
                unit3    = unit;
            }
            catch (UnauthorizedAccessException exception)
            {
                throw new SystemException(exception.Message);
            }
            catch (Exception exception2)
            {
                throw new SystemException(exception2.Message);
            }
            return(unit3);
        }
Exemplo n.º 2
0
Arquivo: Class6.cs Projeto: ikvm/test
 internal Class6(CellExt1 cs, CellExt cell, CellExt1 subRpt)
 {
     this.cellExt1_0 = cs;
     this.cellExt_0  = cell;
     this.cellExt1_1 = subRpt;
     this.method_2();
 }
Exemplo n.º 3
0
Arquivo: Class3.cs Projeto: ikvm/test
        public static CellExt1 transfer(CellSet cs, CellExt1 ecs)
        {
            if (ecs == null)
            {
                return(null);
            }
            Parser parser = new Parser(cs);

            ecs.RowSize = cs.Row;
            ecs.ColSize = cs.Column;
            for (int i = 0; i < cs.Row; i++)
            {
                for (int j = 0; j < cs.Column; j++)
                {
                    if (parser.isMergedFirstCell(i, j))
                    {
                        int row    = parser.getMergedEndRow(i, j);
                        int column = parser.getMergedEndCol(i, j);
                        cs.setPropertyValue(i, j, 706, cs.getPropertyValue(i, column, 706));
                        cs.setPropertyValue(i, j, 704, cs.getPropertyValue(i, column, 704));
                        cs.setPropertyValue(i, j, 705, cs.getPropertyValue(i, column, 705));
                        cs.setPropertyValue(i, j, 712, cs.getPropertyValue(row, j, 712));
                        cs.setPropertyValue(i, j, 710, cs.getPropertyValue(row, j, 710));
                        cs.setPropertyValue(i, j, 711, cs.getPropertyValue(row, j, 711));
                    }
                    Cell    cell = cs.getCell(i, j);
                    CellExt ext2 = ecs.getCell(i, j);
                    if (cell != null)
                    {
                        if ((i == 0) && (j == 0))
                        {
                            object obj2 = null;
                            obj2 = cell.getValue(101);
                            if (obj2 != null)
                            {
                                ecs.object_0 = obj2;
                            }
                            obj2 = cell.getValue(109);
                            if (obj2 != null)
                            {
                                ecs.bool_0 = true.Equals(obj2);
                            }
                        }
                        if (ext2 == null)
                        {
                            ext2 = ecs.newCell(i, j);
                        }
                        ext2.PropValueTable = cell.getValuesMap();
                        ext2.PropExpTable   = cell.getExpressionsMap();
                        if (ecs.isMerged(i, j))
                        {
                            ecs.remove(i, j);
                        }
                    }
                }
            }
            ecs.addMergedCells();
            ecs.NewInput = cs.NewInputVersion;
            return(ecs);
        }
Exemplo n.º 4
0
 private ExpParse(CellExt1 cs, DataSet ds, Env env, string expStr, bool needCheckExtended)
 {
     this.bool_0    = false;
     this.bool_1    = false;
     this.filters_0 = null;
     if (env == null)
     {
         env = ConvertTool.Env;
     }
     this.cellExt1_0 = cs;
     this.env_0      = env;
     this.dataSet_0  = ds;
     this.string_0   = expStr;
     this.int_0      = 0;
     try
     {
         this.create();
         this.unit_0 = this.unit_0.optimize();
         if (needCheckExtended)
         {
             this.bool_0 = this.checkExtended();
         }
     }
     catch (ReportError error)
     {
         error.ErrorMsg = new StringBuilder("表达式").Append(expStr).Append("中").Append(error.ErrorMsg).ToString().ToString();
         throw error;
     }
     catch (Exception exception)
     {
         throw new ReportError(new StringBuilder("表达式").Append(expStr).Append("中").Append(exception.Message).ToString().ToString(), exception);
     }
 }
Exemplo n.º 5
0
Arquivo: CSVar.cs Projeto: ikvm/test
        public override object calculate()
        {
            CellExt current = null;

            if (this.cellExt_0 == null)
            {
                return(null);
            }
            CellExt1 cellSet = this.cellExt_0.CellSet;

            if (!this.bool_0)
            {
                current = cellSet.Current;
            }
            else
            {
                current = cellSet.SavedCurrent;
            }
            CellExt source = this.cellExt_0.getCommonLeftHead(current.Source);

            this.cellExt_1 = current.getLeftHead(source);
            CellExt ext4 = this.cellExt_0.getCommonTopHead(current.Source);

            this.cellExt_2 = current.getTopHead(ext4);
            return(this);
        }
Exemplo n.º 6
0
        public static void calcRpt(ReportDefine rDef, bool ifCoverUserDataSet, CellExt1 ecs)
        {
            Env env = ecs.Env;

            if (env.AutoCalcDataSet)
            {
                string str      = null;
                string rootPath = null;
                if (env.Request != null)
                {
                    str      = env.Request["e_setdataset"];
                    rootPath = env.Request.PhysicalApplicationPath;
                }
                else
                {
                    str      = env.getParameter("e_setdataset");
                    rootPath = FileAction.rootPath;
                }
                if ((str != null) && (str.Length > 0))
                {
                    Type type = Assembly.LoadFrom(rootPath + @"bin\LoadEbiao.dll").GetType("LoadEbiao.IDataSet");
                    if (type != null)
                    {
                        object[]     objArray3 = new object[0];
                        object       obj2      = Activator.CreateInstance(type, objArray3);
                        MethodInfo   method    = type.GetMethod("setDataSetConfigs");
                        BindingFlags flags     = (BindingFlags)20;
                        object[]     objArray  = new object[] { env, rDef.DataSetConfigs };
                        try
                        {
                            object obj3 = method.Invoke(obj2, flags, Type.DefaultBinder, objArray, null);
                            rDef.DataSetConfigs = (DataSetHelper)obj3;
                        }
                        catch (Exception exception)
                        {
                            throw new Exception(exception.InnerException.Message);
                        }
                    }
                }
                DataSetHelper dataSetConfigs = rDef.DataSetConfigs;
                string[]      dataSetNames   = dataSetConfigs.DataSetNames;
                for (int i = 0; i < dataSetNames.Length; i++)
                {
                    if ((env.getDataSet(dataSetNames[i]) == null) || ifCoverUserDataSet)
                    {
                        env.putDataSet(dataSetNames[i], dataSetConfigs.calcDataSet(env, dataSetNames[i], ecs));
                    }
                }
            }
            Logger.debug("取数完毕,开始计算......");
            ecs.calculate();
        }
Exemplo n.º 7
0
 public CellExt(CellExt1 cs, int row, int col)
 {
     object_1 = originObject;
     ExpMap   = new ExpParseMap();
     if (cs == null)
     {
         throw new SystemException();
     }
     if ((row < 0) || (col < 0))
     {
         throw new SystemException();
     }
     CellSet           = cs;
     Row               = row;
     Col               = col;
     RowMerge          = 1;
     ColMerge          = 1;
     Source            = this;
     int_4             = 0;
     ExpMap.Extensible = PropertyDefine.CEX_DEFAULT;
     ExpMap.SourceId   = CellExt1.getId(row, col).ToUpper();
 }
Exemplo n.º 8
0
        public static FunctionUnit newDSFunction(string funName, Env env, CellExt1 cs)
        {
            FunctionUnit unit3;

            try
            {
                Type         classType = (Type)hashtable_1[funName.ToLower()];
                FunctionUnit unit      = (FunctionUnit)SupportClass.CreateNewInstance(classType);
                unit.env = env;
                unit.cs  = cs;
                unit3    = unit;
            }
            catch (UnauthorizedAccessException exception)
            {
                throw new SystemException(exception.Message);
            }
            catch (Exception exception2)
            {
                throw new SystemException(exception2.Message);
            }
            return(unit3);
        }
Exemplo n.º 9
0
 public ExpParse(CellExt1 cs, DataSet ds, Env env, string expStr) : this(cs, ds, env, expStr, false)
 {
 }
Exemplo n.º 10
0
 public InputExp(CellExt1 ce1)
 {
     this.cellExt1_0 = ce1;
 }
Exemplo n.º 11
0
 public ExpParse(CellExt1 cs, DataSet ds, string expStr) : this(cs, ds, (cs == null) ? ConvertTool.Env : cs.Env, expStr, false)
 {
 }
Exemplo n.º 12
0
Arquivo: CSVar.cs Projeto: ikvm/test
 public CSVar(CellExt1 cs, string sourceId)
 {
     this.cellExt1_0 = cs;
     this.string_0   = sourceId;
 }
Exemplo n.º 13
0
Arquivo: Class3.cs Projeto: ikvm/test
 public static CellSet transfer(CellExt1 ecs, CellSet cs, bool only)
 {
     if (cs == null)
     {
         cs = new CellSet(ecs.RowSize, ecs.ColSize);
     }
     for (int i = 0; i < ecs.RowSize; i++)
     {
         for (int j = 0; j < ecs.ColSize; j++)
         {
             CellExt ext = ecs.getCell(i, j);
             if (ext != null)
             {
                 if (ecs.isMerged(i, j))
                 {
                     Cell cell = cs.getCell(ext.Row, ext.Col);
                     if (cell != null)
                     {
                         cell = (Cell)cell.Clone();
                     }
                     cs.setCell(i, j, cell);
                     if (((i <= 1) || (ecs.getCell(i - 1, j) == null)) || ecs.isMerged(i - 1, j))
                     {
                         cs.setPropertyValue(i, j, 707, ext.getPropValue(707));
                         cs.setPropertyValue(i, j, 709, ext.getPropValue(709));
                         cs.setPropertyValue(i, j, 708, ext.getPropValue(708));
                     }
                     if (((j <= 1) || (ecs.getCell(i, j - 1) == null)) || ecs.isMerged(i, j - 1))
                     {
                         cs.setPropertyValue(i, j, 701, ext.getPropValue(701));
                         cs.setPropertyValue(i, j, 703, ext.getPropValue(703));
                         cs.setPropertyValue(i, j, 702, ext.getPropValue(702));
                     }
                     if (((i + 1) == ecs.RowSize) || (ecs.getCell(i + 1, j) == null))
                     {
                         cs.setPropertyValue(i, j, 710, ext.getPropValue(710));
                         cs.setPropertyValue(i, j, 712, ext.getPropValue(712));
                         cs.setPropertyValue(i, j, 711, ext.getPropValue(711));
                     }
                     if (((j + 1) == ecs.ColSize) || (ecs.getCell(i, j + 1) == null))
                     {
                         cs.setPropertyValue(i, j, 704, ext.getPropValue(704));
                         cs.setPropertyValue(i, j, 706, ext.getPropValue(706));
                         cs.setPropertyValue(i, j, 705, ext.getPropValue(705));
                     }
                 }
                 else
                 {
                     Cell cell2 = new Cell();
                     cell2.setValuesMap(ext.PropTable);
                     cs.setCell(i, j, cell2);
                 }
             }
             if (only)
             {
                 ecs.vmethod_3(i, j, null);
             }
         }
     }
     return(cs);
 }
Exemplo n.º 14
0
Arquivo: Class3.cs Projeto: ikvm/test
 public static CellSet transfer(CellExt1 ecs, CellSet cs)
 {
     return(transfer(ecs, cs, false));
 }
Exemplo n.º 15
0
 public CellExt(CellExt1 cs, int row, int col, bool isNullCell) : this(cs, row, col)
 {
 }
Exemplo n.º 16
0
 public virtual void calculate()
 {
     if (((ExpMap != null) && (ExpMap.Exp != null)) && (object_1 == originObject))
     {
         //if (prevCell != null)
         //{
         //    prevCell.testValue();
         //}
         //if (nextCell != null)
         //{
         //    nextCell.testValue();
         //}
         fetchRow();
         object obj2       = ExpMap.Exp.calculate();
         int    extensible = Extensible;
         if ((ExpMap.PropGetMap == null) || !PropertyDefine.CDT_SUBREPORT.Equals(ExpMap.PropGetMap[PropertyDefine.GRID_DATA_TYPE /*301*/]))
         {
             if (PropertyDefine.CEX_VERTICAL != extensible && PropertyDefine.CEX_HORIZONTAL != extensible)
             {
                 setPropResult(PropertyDefine.GRID_DISPLAY_VALUE /*305*/, getDisplayValue(obj2));
                 object_1 = ConvertTool.getValue(obj2);
                 if (obj2 is Row)
                 {
                     row = (Row)obj2;
                 }
             }
             else if (!(obj2 is ArrayList))
             {
                 object_1 = ConvertTool.getValue(obj2);
                 setPropResult(PropertyDefine.GRID_DISPLAY_VALUE /*305*/, getDisplayValue(obj2));
                 ExtCells = new CellExt[] { this };
                 if (obj2 is Row)
                 {
                     row = (Row)obj2;
                 }
                 else if (obj2 is Group)
                 {
                     @group = (Group)obj2;
                     if (@group.RowCount > 0)
                     {
                         row = @group.getRow(0);
                     }
                 }
             }
             else
             {
                 ArrayList list  = (ArrayList)obj2;
                 int       count = list.Count;
                 if (count != 0)
                 {
                     object[] objArray2 = new object[count];
                     object[] objArray  = new object[count];
                     for (int i = 0; i < count; i++)
                     {
                         object o = list[i];
                         objArray2[i] = ConvertTool.getValue(o);
                         objArray[i]  = getDisplayValue(o);
                     }
                     if (PropertyDefine.CEX_VERTICAL.Equals(extensible))
                     {
                         CellSet.extendRow(this, count);
                     }
                     else
                     {
                         CellSet.extendCol(this, count);
                     }
                     for (int j = 0; j < count; j++)
                     {
                         ExtCells[j].object_1 = objArray2[j];
                         if (objArray[j] != null)
                         {
                             ExtCells[j].setPropResult(PropertyDefine.GRID_DISPLAY_VALUE /*305*/, objArray[j]);
                             ExtCells[j].setPropValue(PropertyDefine.GRID_DISPLAY_VALUE /*305*/, objArray[j]);
                         }
                         object obj3 = list[j];
                         if (obj3 is Row)
                         {
                             ExtCells[j].row = (Row)obj3;
                         }
                         else if (obj3 is Group)
                         {
                             Group group = (Group)obj3;
                             ExtCells[j].@group = group;
                             if (group.RowCount > 0)
                             {
                                 ExtCells[j].row = group.getRow(0);
                             }
                         }
                     }
                 }
                 else
                 {
                     object_1 = null;
                 }
             }
         }
         else
         {
             CellExt1 subRpt = (CellExt1)obj2;
             if (subRpt.SubRptType != CellExt1.SRT_IMPORT)
             {
                 object_1 = obj2;
             }
             else
             {
                 new Class6(CellSet, this, subRpt).vmethod_0();
             }
         }
     }
 }
Exemplo n.º 17
0
 public ExpParse(CellExt1 cs, string expStr, bool needCheckExtended) : this(cs, null, (cs == null) ? ConvertTool.Env : cs.Env, expStr, needCheckExtended)
 {
 }