Ejemplo n.º 1
0
def branch():
    message = T('支行管理')
    table_name = 'branch'
    vars = dict(request.vars)
    sql = utils.build_sql(bankdb, table_name, vars)
    table_values, column_name_list, primary_key_list, column_type_list = utils.get_table_info(bankdb, table_name)
    if sql is not None:
        try:
            table_values = bankdb.executesql(sql, as_dict=True)
        except Exception as e:
            response.flash = T('操作失败,请检查参数。' + str(e))
    if not 'select' in vars:
        table_values, column_name_list, primary_key_list, column_type_list = utils.get_table_info(bankdb, table_name)
    operations = ['select', 'insert', 'update', 'delete']
    return dict(locals())
Ejemplo n.º 2
0
def loaninfo():
    message = T('贷款状态查询')
    table_name = 'loaninfo'
    response.view = 'default/branch.html'
    vars = dict(request.vars)
    sql = utils.build_sql(bankdb, table_name, vars)
    table_values, column_name_list, primary_key_list, column_type_list = utils.get_table_info(bankdb, table_name)
    if sql is not None:
        try:
            table_values = bankdb.executesql(sql, as_dict=True)
        except Exception as e:
            response.flash = T('操作失败,请检查参数。' + str(e))
    if not 'select' in vars:
        table_values, column_name_list, primary_key_list, column_type_list = utils.get_table_info(bankdb, table_name)
    operations = ['select']
    return dict(locals())