Ejemplo n.º 1
0
def get_res():
    #
    sql_where = ADMIN_OA.get_where_from_fs(fs)
    #
    res = dict()
    #
    try:
        conn, cur = ADMIN_OA.get_conn_for_mysql_oa()
        sql_delete = "delete from t_account_manager"
        #
        sql_delete += sql_where 
        #
        #print sql_delete
        TE_CUSTOM.run_sql(cur, sql_delete)
        #
        cur.close()
        conn.close()
        #
        UTIL.append_result_ok(res)
    except Exception, e:
        #
        UTIL.append_result_error(res, e)
Ejemplo n.º 2
0
def get_res():
    #
    insert_details = ADMIN_OA.get_insert_details_from_fs(fs)
    #
    res = dict()
    #
    try:
        conn, cur = ADMIN_OA.get_conn_for_mysql_oa()
        insert_sql = "insert into t_account_manager"
        #
        insert_sql += insert_details 
        #
        #print insert_sql
        TE_CUSTOM.run_sql(cur, insert_sql)
        #
        cur.close()
        conn.close()
        #
        UTIL.append_result_ok(res)
    except Exception, e:
        #
        UTIL.append_result_error(res, e)