Exemplo n.º 1
0
def getTrackDetails(sessid):
 trackTitle = ewd.getSelectediWDMenuValue("TrackList",sessid)
 trackName = ewd.double_up_quotes(trackTitle)
 artist = ewd.getSessionValue('cdArtist',sessid)
 mdb = ewd.mdb_connect('rob','1234567','127.0.0.1')
 query="SELECT * FROM itunes where Artist = '" + artist + "' and Name = '" + trackName +"'"
 items=mdb.select('itunes',query)
 ewd.setSessionValue("trackName",trackTitle,sessid)
 ewd.setSessionValue("albumName",items[0]["Album"],sessid)
 ewd.setSessionValue("composer",items[0]["Composer"],sessid)
 ewd.setSessionValue("trackNo",items[0]["Track Number"],sessid)
 ewd.setSessionValue("time",items[0]["Time"],sessid)
 return ""
Exemplo n.º 2
0
def getTrackDetails(sessid):
    trackTitle = ewd.getSelectediWDMenuValue("TrackList", sessid)
    trackName = ewd.double_up_quotes(trackTitle)
    artist = ewd.getSessionValue('cdArtist', sessid)
    mdb = ewd.mdb_connect('rob', '1234567', '127.0.0.1')
    query = "SELECT * FROM itunes where Artist = '" + artist + "' and Name = '" + trackName + "'"
    items = mdb.select('itunes', query)
    ewd.setSessionValue("trackName", trackTitle, sessid)
    ewd.setSessionValue("albumName", items[0]["Album"], sessid)
    ewd.setSessionValue("composer", items[0]["Composer"], sessid)
    ewd.setSessionValue("trackNo", items[0]["Track Number"], sessid)
    ewd.setSessionValue("time", items[0]["Time"], sessid)
    return ""
Exemplo n.º 3
0
def getItemList(sessid):
 selectedNo = ewd.getRequestValue('menuItemNo',sessid)
 if selectedNo != "":
   domainName = ewd.getSelectediWDMenuValue("domainList",sessid)
   ewd.setSessionValue("domainName",domainName,sessid)
 else:
   domainName = ewd.getSessionValue("domainName",sessid)
 username=ewd.getSessionValue("username",sessid)
 password=ewd.getSessionValue("password",sessid)
 mdb = ewd.mdb_connect(username,password,'127.0.0.1')
 query="select itemName() from " + domainName
 items=mdb.select(domainName,query)
 ewd.deleteFromSession("itemList",sessid)
 if items != []:
   ewd.createiWDMenuFromDictionary(items,"itemName()","itemList",sessid)
 return ""
Exemplo n.º 4
0
def getItemList(sessid):
    selectedNo = ewd.getRequestValue('menuItemNo', sessid)
    if selectedNo != "":
        domainName = ewd.getSelectediWDMenuValue("domainList", sessid)
        ewd.setSessionValue("domainName", domainName, sessid)
    else:
        domainName = ewd.getSessionValue("domainName", sessid)
    username = ewd.getSessionValue("username", sessid)
    password = ewd.getSessionValue("password", sessid)
    mdb = ewd.mdb_connect(username, password, '127.0.0.1')
    query = "select itemName() from " + domainName
    items = mdb.select(domainName, query)
    ewd.deleteFromSession("itemList", sessid)
    if items != []:
        ewd.createiWDMenuFromDictionary(items, "itemName()", "itemList",
                                        sessid)
    return ""
Exemplo n.º 5
0
def getAttributes(sessid):
 selectedNo = ewd.getRequestValue('menuItemNo',sessid)
 if selectedNo != "":
   itemName = ewd.getSelectediWDMenuValue("itemList",sessid)
   ewd.setSessionValue("itemName",itemName,sessid)
 else:
   itemName = ewd.getSessionValue("itemName",sessid)
 domainName=ewd.getSessionValue("domainName",sessid)
 username=ewd.getSessionValue("username",sessid)
 password=ewd.getSessionValue("password",sessid)
 mdb = ewd.mdb_connect(username,password,'127.0.0.1')
 query="select * from " + domainName + " where itemName() = '" + itemName + "'"
 items=mdb.select(domainName,query)
 dic = items[0]
 ewd.deleteFromSession("iwdTemp",sessid)
 ewd.deleteFromSession("attributeValues",sessid)
 ewd.mergeDictionaryToSession(dic,"iwdTemp",sessid)
 result = ewd.m_python.m_proc(0, "createAttrList^MDBMgr","attributeValues","iwdTemp",sessid)
 ewd.deleteFromSession("iwdTemp",sessid)
 return ""
Exemplo n.º 6
0
def getAttributes(sessid):
    selectedNo = ewd.getRequestValue('menuItemNo', sessid)
    if selectedNo != "":
        itemName = ewd.getSelectediWDMenuValue("itemList", sessid)
        ewd.setSessionValue("itemName", itemName, sessid)
    else:
        itemName = ewd.getSessionValue("itemName", sessid)
    domainName = ewd.getSessionValue("domainName", sessid)
    username = ewd.getSessionValue("username", sessid)
    password = ewd.getSessionValue("password", sessid)
    mdb = ewd.mdb_connect(username, password, '127.0.0.1')
    query = "select * from " + domainName + " where itemName() = '" + itemName + "'"
    items = mdb.select(domainName, query)
    dic = items[0]
    ewd.deleteFromSession("iwdTemp", sessid)
    ewd.deleteFromSession("attributeValues", sessid)
    ewd.mergeDictionaryToSession(dic, "iwdTemp", sessid)
    result = ewd.m_python.m_proc(0, "createAttrList^MDBMgr", "attributeValues",
                                 "iwdTemp", sessid)
    ewd.deleteFromSession("iwdTemp", sessid)
    return ""