Example #1
0
def add_history(typeid,userid,type,update_content):
    history=History(
                    type_id=typeid,
                    userid=userid,
                    type=type,
                    update_time= now.strftime("%Y-%m-%d"),
                    update_content=update_content)
    session.add(history)
    session.commit()
Example #2
0
def adduser(username,itcode,department,team,email,role):
    user = User(name = username,
                role = role,
                itcode = itcode,
                department = department,
                team = team,
                email = email,
                password = md5(default_user_password))
    session.add(user)
    session.flush()
    session.commit()
Example #3
0
def addAnnouncement(announcement):
    new = Announcements(    
                    project_id = announcement["project_id"][0],
                    sub_seris = announcement["sub_seris"][0],
#                    cto_num = announcement["cto_num"],
                    launch_type = announcement["launch_type"],
                    web_cto_ad = announcement["web_cto_ad"],
                    tables = announcement["tables"],
                    lois_ial_eow = announcement["lois_ial_eow"],
                    lois_ial_ad = announcement["lois_ial_ad"],
                    sbb_account = announcement["sbb_account"],
                    lois_mtm_account = announcement["lois_mtm_account"][0],
                    ial_mtm_account = announcement["ial_mtm_account"][0],
                    ial_no = announcement['ial_no'],
                    bpl_no = announcement['bpl_no'],
                    overall_status = announcement["overall_status"],
                    note = announcement['note'],
#                    updateon = announcement['updateon'],
#                    updateby = announcement['updateby'],
                    )
    session.add(new)
                    #    session.execute(Announcements.__table__.insert(),project)
    session.commit()
    return new.id
Example #4
0
def add_brand(brand_name):
    brand = Brand(name = brand_name)
    session.add(brand)
    session.commit()
Example #5
0
def add_series(name):
    ser = Series(ser_name=name)
    session.add(ser)
    session.commit()
Example #6
0
def add_prostatus(status_name):
    sta = Pro_status(pro_type = status_name)
    session.add(sta)
    session.commit()
Example #7
0
def add_role(name):
    rol = User_role(role = name)
    session.add(rol)
    session.commit()
Example #8
0
def add_note(note_name):
    note = Note(note = note_name)
    session.add(note)
    session.commit()
Example #9
0
def add_status(status_name):
    sta = Overall_Status(status = status_name)
    session.add(sta)
    session.commit()
Example #10
0
def add_type(type_name):
    typ = Launch_Type(type=type_name)
    session.add(typ)
    session.commit()