Esempio n. 1
0
        public void createTables()
        {
            try
            {
                //Procedimentos de Aprovacao
                oDBFacade.CreateTable("SB1_APPROVAL", "Approval Procedure", BoUTBTableType.bott_NoObject);
                //oDBFacade.CreateField("SB1_APPROVAL", "ApprovalCode", "Approval", BoFieldTypes.db_Numeric, 11);
                oDBFacade.CreateField("SB1_APPROVAL", "isActive", "Active", BoFieldTypes.db_Alpha, 5);
                oDBFacade.CreateField("SB1_APPROVAL", "ApprovalStatus", "Approval Status", BoFieldTypes.db_Alpha, 30);

                //Estágios de Aprovacao
                oDBFacade.CreateTable("SB1_APPROVAL_STAGES", "Approval Stages", BoUTBTableType.bott_NoObject);
                oDBFacade.CreateField("SB1_APPROVAL_STAGES", "ApprovalCode", "Approval Procedure", BoFieldTypes.db_Numeric, 11);
                oDBFacade.CreateField("SB1_APPROVAL_STAGES", "WstCode", "Stage", BoFieldTypes.db_Numeric, 11);
                oDBFacade.CreateField("SB1_APPROVAL_STAGES", "ApprovalStatus", "Approval Status", BoFieldTypes.db_Alpha, 30);

                //Condicoes de Aprovacao
                oDBFacade.CreateTable("SB1_APPROVAL_CONDITION", "Approval Conditions", BoUTBTableType.bott_NoObject);
                oDBFacade.CreateField("SB1_APPROVAL_CONDITION", "ApprovalCode", "Approval Procedure", BoFieldTypes.db_Numeric, 11);
                oDBFacade.CreateField("SB1_APPROVAL_CONDITION", "Condition", "Approval Condition", BoFieldTypes.db_Memo, 5000);

                //Documentos para aprovacao
                oDBFacade.CreateTable("SB1_APPROVAL_DOCS", "Approval Stages", BoUTBTableType.bott_NoObject);
                oDBFacade.CreateField("SB1_APPROVAL_DOCS", "DocEntry", "Document", BoFieldTypes.db_Numeric, 11);
                oDBFacade.CreateField("SB1_APPROVAL_DOCS", "ApprovalCode", "Approval Procedure", BoFieldTypes.db_Numeric, 11);
                oDBFacade.CreateField("SB1_APPROVAL_DOCS", "ApprovalStatus", "Approval Status", BoFieldTypes.db_Alpha, 30);
            }
            catch (Exception e)
            {
            }
        }
Esempio n. 2
0
        private void initAddon()
        {
            try
            {
                //Cria tabela de configuracao do addon
                oDBFacade.CreateTable("SB1_ADDON_CONFIG", "Configuração", BoUTBTableType.bott_NoObject);
                oDBFacade.CreateField("@SB1_ADDON_CONFIG", "Value", "Valor", BoFieldTypes.db_Memo, 255);

                oDBFacade.CreateTable("SB1_ADDON_LOG", "Log", BoUTBTableType.bott_NoObject);
                oDBFacade.CreateField("@SB1_ADDON_LOG", "LogType", "LogType", BoFieldTypes.db_Alpha, 50);
                oDBFacade.CreateField("@SB1_ADDON_LOG", "Text", "Text", BoFieldTypes.db_Memo, 3000);
                oDBFacade.CreateField("@SB1_ADDON_LOG", "Date", "Date", BoFieldTypes.db_Date, 12);
                oDBFacade.CreateField("@SB1_ADDON_LOG", "Time", "Time", BoFieldTypes.db_Alpha, 12);
                oDBFacade.CreateField("@SB1_ADDON_LOG", "User", "User", BoFieldTypes.db_Alpha, 20);
                oDBFacade.CreateField("@SB1_ADDON_LOG", "CompanyVersion", "Company Version", BoFieldTypes.db_Alpha, 20);
                oDBFacade.CreateField("@SB1_ADDON_LOG", "AddonVersion", "Addon Version", BoFieldTypes.db_Alpha, 20);
                oDBFacade.CreateField("@SB1_ADDON_LOG", "AddonName", "Addon Name", BoFieldTypes.db_Alpha, 50);
                oDBFacade.CreateField("@SB1_ADDON_LOG", "LibVersion", "Library Version", BoFieldTypes.db_Alpha, 20);
                oDBFacade.CreateField("@SB1_ADDON_LOG", "FormID", "Form", BoFieldTypes.db_Alpha, 20);
                oDBFacade.CreateField("@SB1_ADDON_LOG", "XMLException", "Internal Exception", BoFieldTypes.db_Memo, sizeof(int));
                oDBFacade.CreateField("@SB1_ADDON_LOG", "Operation", "Operation", BoFieldTypes.db_Memo, 100);

                //Remessas
                //campo para configurar a conta do estorno na remessa
                oDBFacade.CreateField("ODLN", "ShmtJE", "Lanc. de Remessa", BoFieldTypes.db_Alpha, 11, BoFldSubTypes.st_None);
                oDBFacade.CreateField("OUSG", "CstAcctCode", "Conta Substituta ao CPV", BoFieldTypes.db_Alpha, 20, BoFldSubTypes.st_None);
                oDBFacade.CreateField("OUSG", "Shipment", "Remessa", BoFieldTypes.db_Numeric, 11, BoFldSubTypes.st_None, "0", new string[] { "0|Não", "1|Sim" });
            }
            catch (Exception e)
            {
                //Logger.logCaos("Erro na inicializacao basica. ", e);
                SB1ControlException.SB1ControlException.Save(e);
            }
        }