示例#1
0
        public virtual ReportInterfaceParameterList GetReportInterfaceList()
        {
            ReportInterfaceParameterList parameterList = new ReportInterfaceParameterList();

            parameterList.AddRange(GetUserDefinedInterfaceParameterList());
            parameterList.AddRange(GetStaticInterfaceParameterList());

            return(parameterList);
        }
示例#2
0
        public virtual ReportInterfaceParameterList GetUserDefinedInterfaceParameterList()
        {
            ReportInterfaceParameterList parameterList = new ReportInterfaceParameterList();

            foreach (MappedProperty mappedProperty in this.RequestMap.MappedProperties.OrderBy(p => p.Sequence))
            {
                parameterList.Add(mappedProperty.Name, DataModelImporter.GetDbType(mappedProperty));
            }

            return(parameterList);
        }
示例#3
0
        public virtual ReportInterfaceParameterList GetStaticInterfaceParameterList(WarehouseReportType warehouseReportType, bool isABCEnabled)
        {
            ReportInterfaceParameterList parameterList = new ReportInterfaceParameterList();

            // Check if this is a Warehouse report
            bool isDefinedWarehouseReport = this.Application.Name == "Warehouse" &&
                                            warehouseReportType != WarehouseReportType.NotApplicable;

            if (isDefinedWarehouseReport)
            {
                // First add CHECK parameters used for calling the "IsDefined..." procedures.
                if (warehouseReportType == WarehouseReportType.WarehouseReport)
                {
                    parameterList.Add("CHECK_WHID_I", "WH.WHID%type");
                }
                else if (warehouseReportType == WarehouseReportType.DeliveryReport)
                {
                    parameterList.Add("CHECK_DLVRYMETH_ID_I", "DMDOC.DLVRYMETH_ID%type");
                    parameterList.Add("CHECK_COMPANY_ID_I", "DMDOC.COMPANY_ID%type");
                }
                else if (warehouseReportType == WarehouseReportType.FreighterReport)
                {
                    parameterList.Add("CHECK_FREID_I", "FREDMDOC.FREID%type");
                    parameterList.Add("CHECK_DLVRYMETH_ID_I", "FREDMDOC.DLVRYMETH_ID%type");
                }
            }

            if (isABCEnabled)
            {
                // Add ACTLOG parameters used for adding a row to the Activity Log (ABC).
                parameterList.Add("ACTLOG_WHID_I", "ACTLOG.WHID%type");
                parameterList.Add("ACTLOG_COMPANY_ID_I", "ACTLOG.COMPANY_ID%type");
            }

            // Add META parameters including their default value since they don't have to be set.
            parameterList.Add("META_DOCSUBTYPE_I", "varchar2", "null");
            parameterList.Add("META_TERID_I", "varchar2", "null");
            parameterList.Add("META_PRTID_I", "varchar2", "null");
            parameterList.Add("META_EMPID_I", "varchar2", "null");
            parameterList.Add("META_NO_COPIES_I", "number", "null");

            if (isDefinedWarehouseReport)
            {
                // Add additional parameter to be able to skip the check if needed
                parameterList.Add("SKIP_CHECK_I", "varchar2", "Def.No");
            }

            // Add OUT parameter
            parameterList.Add("ALMID_O", "ALM.ALMID%type", ReportInterfaceParameterDirection.Out);

            return(parameterList);
        }