Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="axPrinter"></param>
        /// <param name="objectName"></param>
        /// <param name="propertName"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        protected static object getAliasValue(AxTePrinter axPrinter, string objectName, string propertName, object value)
        {
            object result = null;

            TeComPrinterLib.LAYOUT_TYPES objType;
            objType = axPrinter.getLayoutObjectType(objectName);

            switch (objType)
            {
            case TeComPrinterLib.LAYOUT_TYPES.LT_DATABASE:
            {
                if (propertName == "Provider")
                {
                    switch (Convert.ToInt32(value))
                    {
                    case 1: result = "Sql Server";
                        break;

                    case 2: result = "Oracle";
                        break;

                    case 3: result = "FireBird";
                        break;

                    case 4: result = "Postgres";
                        break;
                    }
                }
            } break;
            }
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="axPrinter"></param>
        /// <param name="objectName"></param>
        /// <param name="propertyName"></param>
        /// <returns></returns>
        public static string getRealPropertyName(AxTePrinter axPrinter, string objectName, string propertyName)
        {
            TeComPrinterLib.LAYOUT_TYPES objType;

            objType = axPrinter.getLayoutObjectType(objectName);
            switch (objType)
            {
            case TeComPrinterLib.LAYOUT_TYPES.LT_LINE: return(getRealPropertyNameFromLine(_lineType, propertyName));

            case TeComPrinterLib.LAYOUT_TYPES.LT_RECTANGLE: return(getRealPropertyNameFromLine(_rectangleType, propertyName));

            case TeComPrinterLib.LAYOUT_TYPES.LT_ELLIPSE: return(getRealPropertyNameFromLine(_ellipseType, propertyName));

            case TeComPrinterLib.LAYOUT_TYPES.LT_IMAGE: return(getRealPropertyNameFromLine(_imageType, propertyName));

            case TeComPrinterLib.LAYOUT_TYPES.LT_TEXT: return(getRealPropertyNameFromLine(_textType, propertyName));

            case TeComPrinterLib.LAYOUT_TYPES.LT_SCALE: return(getRealPropertyNameFromLine(_scaleType, propertyName));

            case TeComPrinterLib.LAYOUT_TYPES.LT_NORTH: return(getRealPropertyNameFromLine(_northType, propertyName));

            case TeComPrinterLib.LAYOUT_TYPES.LT_MAP: return(getRealPropertyNameFromLine(_mapType, propertyName));

            case TeComPrinterLib.LAYOUT_TYPES.LT_DATABASE: return(getRealPropertyNameFromLine(_databaseType, propertyName));
            }
            return("");
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="objectName"></param>
        /// <param name="axPrinter"></param>
        /// <param name="propertyName"></param>
        /// <returns></returns>
        protected static string getAlias(string objectName, AxTePrinter axPrinter, string propertyName)
        {
            TeComPrinterLib.LAYOUT_TYPES objType;
            if (_lineType == null)
            {
                init();
            }
            objType = axPrinter.getLayoutObjectType(objectName);
            switch (objType)
            {
            case TeComPrinterLib.LAYOUT_TYPES.LT_LINE: return(_lineType[propertyName]);

            case TeComPrinterLib.LAYOUT_TYPES.LT_RECTANGLE: return(_rectangleType[propertyName]);

            case TeComPrinterLib.LAYOUT_TYPES.LT_ELLIPSE: return(_ellipseType[propertyName]);

            case TeComPrinterLib.LAYOUT_TYPES.LT_IMAGE: return(_imageType[propertyName]);

            case TeComPrinterLib.LAYOUT_TYPES.LT_TEXT: return(_textType[propertyName]);

            case TeComPrinterLib.LAYOUT_TYPES.LT_SCALE: return(_scaleType[propertyName]);

            case TeComPrinterLib.LAYOUT_TYPES.LT_NORTH: return(_northType[propertyName]);

            case TeComPrinterLib.LAYOUT_TYPES.LT_MAP: return(_mapType[propertyName]);

            case TeComPrinterLib.LAYOUT_TYPES.LT_DATABASE: return(_databaseType[propertyName]);
            }
            return("");
        }