Example #1
0
app.NoneDisplay = ""
# Set up a global connection to the database that all bizobjs will share:
app.dbConnectionName = "monro_user"
app.dbConnection = app.getConnectionByName(app.dbConnectionName)
#app.dbConnection.LogEvents = ['All']


# Open one or more of the defined forms. A default one was picked by the app
# generator, but you can change that here. Additionally, if form names were
# passed on the command line, they will be opened instead of the default one
# as long as they exist.
app.ui.AnswersForm = dabo.ui.createClass("ui" + os.sep + "AnswersForm.cdxml")
app.ui.AttachmentsForm = dabo.ui.createClass("ui" + os.sep + "AttachmentsForm.cdxml")
app.ui.CommentsForm = dabo.ui.createClass("ui" + os.sep + "CommentsForm.cdxml")
app.ui.ContactsForm = dabo.ui.createClass("ui" + os.sep + "ContactsForm.cdxml")
app.ui.GetFilesForContactForm = dabo.ui.createClass("ui" + os.sep + "GetFilesForContactForm.cdxml")
app.ui.GradesForm = dabo.ui.createClass("ui" + os.sep + "GradesForm.cdxml")
app.ui.LessonsForm = dabo.ui.createClass("ui" + os.sep + "LessonsForm.cdxml")
app.ui.StudentsForm = dabo.ui.createClass("ui" + os.sep + "StudentsForm.cdxml")
app.ui.TeachersForm = dabo.ui.createClass("ui" + os.sep + "TeachersForm.cdxml")
app.ui.PrintOrPreviewForm = dabo.ui.createClass("ui" + os.sep + "PrintOrPreviewForm.cdxml")
app.ui.LessonSelector = dabo.ui.createClass("ui" + os.sep + "LessonSelector.cdxml")
app.ui.CommentSelectorForm = dabo.ui.createClass("ui" + os.sep + "CommentSelectorForm.cdxml")
app.DefaultForm = app.ui.StudentsForm
app.FormsToOpen = [app.DefaultForm]
app.startupForms()
if app.MainForm != None:
	app.MainForm.Caption = 'WBSTools version ' + str(app.getAppInfo('appVersion') + ' user = ' + str(app.dbConnectionName))
# Start the application event loop:
app.start()
import biz
import ui

from App import App
app = App(SourceURL=remotehost)

app.db = db
app.biz = biz
app.ui = ui

# Make it easy to find any images or other files you put in the resources
# directory.
sys.path.append(os.path.join(app.HomeDirectory, "resources"))

# Set the BasePrefKey for the app
app.BasePrefKey = "librarymanager"
app.setup()

# Set up a global connection to the database that all bizobjs will share:
app.dbConnection = app.getConnectionByName("library")

# Open one or more of the defined forms. A default one was picked by the app
# generator, but you can change that here. Additionally, if form names were
# passed on the command line, they will be opened instead of the default one
# as long as they exist.
app.DefaultForm = ui.FrmParts
app.startupForms()

# Start the application event loop:
app.start()