Esempio n. 1
0
        public void Create()
        {
            //Variables
            SAPCLASS.UDO oUdo = new SAPCLASS.UDO();

            BoYesNoEnum                 pYes                     = BoYesNoEnum.tYES;
            BoYesNoEnum                 pNo                      = BoYesNoEnum.tNO;
            List <FormColumnValues>     pFormColumnList          = new List <FormColumnValues>();
            FormColumnValues            pFormColumnListValue     = new FormColumnValues();
            List <FindColumnValues>     pFindColumnList          = new List <FindColumnValues>();
            FindColumnValues            pFindColumnListValue     = new FindColumnValues();
            List <ChildTableValues>     pChildTableList          = new List <ChildTableValues>();
            ChildTableValues            pChildTableListValue     = new ChildTableValues();
            List <EnhancedColumnValues> pEnhancedColumnList      = new List <EnhancedColumnValues>();
            EnhancedColumnValues        pEnhancedColumnListValue = new EnhancedColumnValues();

            //Basic Setting
            string       pUdoCode = "BUDGET";
            string       pUdoName = "BUDGET";
            BoUDOObjType pUdoType = BoUDOObjType.boud_Document;
            string       pHeader  = "BUDGET";

            //Setting Services
            BoYesNoEnum pCanFind      = pYes;
            BoYesNoEnum pCanDelete    = pYes;
            BoYesNoEnum pCanCancel    = pYes;
            BoYesNoEnum pCanClose     = pYes;
            BoYesNoEnum pCanLog       = pNo;
            BoYesNoEnum pManageSeries = pNo;
            BoYesNoEnum pYearTransfer = pNo;
            BoYesNoEnum pCanArchive   = pNo;
            BoYesNoEnum pCanApprove   = pNo;

            //UI Setting
            BoYesNoEnum pCreateDeafaultForm = pYes;
            BoYesNoEnum pIsEnhancedForm     = pYes;
            BoYesNoEnum pIsMenuItem         = pNo;
            string      pMenuCaption        = "";
            int         pFathermenuID       = 0;
            int         paramPosition       = 0;
            string      pMenuUId            = "";

            //Setting the fields for Find Column
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "DocEntry", ColumnDescription = "DocEntry"
            });
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "DocNum", ColumnDescription = "DocNum"
            });
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "U_Office", ColumnDescription = "Office"
            });
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "U_Year", ColumnDescription = "Year"
            });
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "U_PrepBy", ColumnDescription = "Prepared By"
            });
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "U_ReqBy", ColumnDescription = "Requested By"
            });
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "U_DocDate", ColumnDescription = "Document Date"
            });
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "U_Remark", ColumnDescription = "Remark"
            });

            //Setting the fields for Form Column
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "DocEntry", ColumnDescription = "DocEntry"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "DocNum", ColumnDescription = "DocNum"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_TrType", ColumnDescription = "TrType"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_Office", ColumnDescription = "Office"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_Year", ColumnDescription = "Year"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_PrepBy", ColumnDescription = "Prepared By"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_ReqBy", ColumnDescription = "Requested By"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_DocDate", ColumnDescription = "Document Date"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_Remark", ColumnDescription = "Remark"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_EstBudget", ColumnDescription = "Total Estimated Budget"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_TotalUsed", ColumnDescription = "Total Used"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_Balance", ColumnDescription = "Balance"
            });

            //Linking child user tables
            pChildTableList.Add(new ChildTableValues {
                ObjectName = "BUDGET1", TableName = "BUDGET1"
            });
            pChildTableList.Add(new ChildTableValues {
                ObjectName = "BUDGET2", TableName = "BUDGET2"
            });
            pChildTableList.Add(new ChildTableValues {
                ObjectName = "BUDGET3", TableName = "BUDGET3"
            });

            //Setting the fields for Enhance Column

            //Budget Content
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_Type", ColumnDescription = "Type", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_Classification", ColumnDescription = "Classification", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_ItemDescription", ColumnDescription = "Budget Line Item", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_ItemCode", ColumnDescription = "Item Master Data", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_ItemDesc", ColumnDescription = "Description", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_EstBudgetQty", ColumnDescription = "Estimated Budget (Qty)", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_UoM", ColumnDescription = "UoM", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_EstBudgetAmnt", ColumnDescription = "Estimated Budget (Amount)", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_UsedBudgetQty", ColumnDescription = "Used Budget (Qty)", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_UsedBudgetAmnt", ColumnDescription = "Used Budget (Amount)", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_BalQty", ColumnDescription = "Balance (Qty)", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_BalAmnt", ColumnDescription = "Balance (Amount)", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_ModProc", ColumnDescription = "Mode of Procurement", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_StartDate", ColumnDescription = "Start Date", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_EndDate", ColumnDescription = "End Date", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_PpmpStat", ColumnDescription = "PPMP Budget Status", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_PpmpDate", ColumnDescription = "PPMP Approval Date", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_AppStat", ColumnDescription = "APP Budget Status", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_AppDate", ColumnDescription = "APP Approval Date", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_CobStat", ColumnDescription = "COB Budget Status", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_CobDate", ColumnDescription = "COB Approval Date", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_CreateDate", ColumnDescription = "Create Date", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_UpdateDate", ColumnDescription = "Last Update", ColumnIsUsed = pYes, Editable = pNo, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_PmoEndUser", ColumnDescription = "PMO/End-user", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_ModProc2", ColumnDescription = "Mode of Procurement", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_Advertisement", ColumnDescription = "Advertisement/Posting of IB/REI", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_Bids", ColumnDescription = "Submission/Opening of Bids", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_Notice", ColumnDescription = "Notice of Award", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_Contract", ColumnDescription = "Contract Signing", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_Source", ColumnDescription = "Source of Funds", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_Remarks", ColumnDescription = "Remarks", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_January", ColumnDescription = "January", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_February", ColumnDescription = "February", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_March", ColumnDescription = "March", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_April", ColumnDescription = "April", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_May", ColumnDescription = "May", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_June", ColumnDescription = "June", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_July", ColumnDescription = "July", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_August", ColumnDescription = "August", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_September", ColumnDescription = "September", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_October", ColumnDescription = "October", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_November", ColumnDescription = "November", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_December", ColumnDescription = "December", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_BudgetType", ColumnDescription = "Budget Type", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_EarlyProc", ColumnDescription = "Early Procurement", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 1
            });

            //Transactions
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_Row", ColumnDescription = "Budget Row", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 2
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_DocNum", ColumnDescription = "No.", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 2
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_Document", ColumnDescription = "Document", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 2
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_DocDate", ColumnDescription = "Date", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 2
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_DocTotal", ColumnDescription = "Total", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 2
            });

            //Attachments
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_Path", ColumnDescription = "Path", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 3
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_FileName", ColumnDescription = "FileName", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 3
            });
            pEnhancedColumnList.Add(new Models.EnhancedColumnValues
            {
                ColumnAlias = "U_Date", ColumnDescription = "Date", ColumnIsUsed = pYes, Editable = pYes, ChildNumber = 3
            });

            //Set enhanced Column service value
            BoYesNoEnum pIsUniqueForm = pYes;

            oUdo.Create(
                //Basic Setting
                pUdoCode, pUdoName, pUdoType, pHeader,
                //Setting Services
                pCanFind, pCanDelete, pCanCancel, pCanClose, pCanLog, pManageSeries, pYearTransfer, pCanArchive, pCanApprove,
                //UI Setting
                pCreateDeafaultForm, pIsEnhancedForm, pIsMenuItem, pMenuCaption, pFathermenuID, paramPosition, pMenuUId,
                //Setting the Fields for the form columns
                pFormColumnList,
                //Setting the Fields for the find columns
                pFindColumnList,
                //Linking child user tables
                pChildTableList,
                //Setting the fields for Enhance Column
                pEnhancedColumnList,
                //Set enhanced Column service value
                pIsUniqueForm
                );
        }
Esempio n. 2
0
        /// <summary>
        /// Create Budget Maintenance UDO
        /// </summary>
        public void Create()
        {
            //Variables
            SAPCLASS.UDO oUdo = new SAPCLASS.UDO();

            BoYesNoEnum                 pYes                     = BoYesNoEnum.tYES;
            BoYesNoEnum                 pNo                      = BoYesNoEnum.tNO;
            List <FormColumnValues>     pFormColumnList          = new List <FormColumnValues>();
            FormColumnValues            pFormColumnListValue     = new FormColumnValues();
            List <FindColumnValues>     pFindColumnList          = new List <FindColumnValues>();
            FindColumnValues            pFindColumnListValue     = new FindColumnValues();
            List <ChildTableValues>     pChildTableList          = new List <ChildTableValues>();
            ChildTableValues            pChildTableListValue     = new ChildTableValues();
            List <EnhancedColumnValues> pEnhancedColumnList      = new List <EnhancedColumnValues>();
            EnhancedColumnValues        pEnhancedColumnListValue = new EnhancedColumnValues();

            //Basic Setting
            string       pUdoCode = "BUDGETMAIN";
            string       pUdoName = "Budget Maintenance";
            BoUDOObjType pUdoType = BoUDOObjType.boud_Document;
            string       pHeader  = "BUDGETMAIN";

            //Setting Services
            BoYesNoEnum pCanFind      = pYes;
            BoYesNoEnum pCanDelete    = pYes;
            BoYesNoEnum pCanCancel    = pYes;
            BoYesNoEnum pCanClose     = pYes;
            BoYesNoEnum pCanLog       = pNo;
            BoYesNoEnum pManageSeries = pNo;
            BoYesNoEnum pYearTransfer = pNo;
            BoYesNoEnum pCanArchive   = pNo;
            BoYesNoEnum pCanApprove   = pNo;

            //UI Setting
            BoYesNoEnum pCreateDeafaultForm = pYes;
            BoYesNoEnum pIsEnhancedForm     = pNo;
            BoYesNoEnum pIsMenuItem         = pNo;
            string      pMenuCaption        = "";
            int         pFathermenuID       = 0;
            int         paramPosition       = 0;
            string      pMenuUId            = "";

            //Setting the fields for Find Column
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "DocEntry", ColumnDescription = "DocEntry"
            });
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "DocNum", ColumnDescription = "DocNum"
            });
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "U_BudgetCode", ColumnDescription = "Budget Code"
            });
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "U_BudgetDes", ColumnDescription = "Budget Description"
            });
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "U_NgasCode", ColumnDescription = "NGAS Code"
            });
            pFindColumnList.Add(new FindColumnValues {
                ColumnAlias = "U_NgasDesc", ColumnDescription = "NGAS Description"
            });

            //Setting the fields for Form Column
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "DocEntry", ColumnDescription = "DocEntry"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "DocNum", ColumnDescription = "DocNum"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_BudgetCode", ColumnDescription = "Budget Code"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_BudgetDes", ColumnDescription = "Budget Description"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_NgasCode", ColumnDescription = "NGAS Code"
            });
            pFormColumnList.Add(new FormColumnValues {
                ColumnAlias = "U_NgasDesc", ColumnDescription = "NGAS Description"
            });

            //Set enhanced Column service value
            BoYesNoEnum pIsUniqueForm = pYes;

            oUdo.Create(
                //Basic Setting
                pUdoCode, pUdoName, pUdoType, pHeader,
                //Setting Services
                pCanFind, pCanDelete, pCanCancel, pCanClose, pCanLog, pManageSeries, pYearTransfer, pCanArchive, pCanApprove,
                //UI Setting
                pCreateDeafaultForm, pIsEnhancedForm, pIsMenuItem, pMenuCaption, pFathermenuID, paramPosition, pMenuUId,
                //Setting the Fields for the form columns
                pFormColumnList,
                //Setting the Fields for the find columns
                pFindColumnList,
                //Linking child user tables
                pChildTableList,
                //Setting the fields for Enhance Column
                pEnhancedColumnList,
                //Set enhanced Column service value
                pIsUniqueForm
                );
        }